Nodeclasses

The nodeclasses object is a container for the Nodeclass object. It is the starting point for creating new nodeclasses.

By default, iterating the collection returns Nodeclass objects for both the user defined and built in system classes (on file system version 3.5 these are):

  • aixNodes
  • all
  • clientLicense
  • clientNodes
  • cnfsNodes
  • disabledCnfsNodes
  • enabledCnfsNodes
  • linuxNodes
  • managerNodes
  • nonAixNodes
  • nonCnfsNodes
  • nonLinuxNodes
  • nonNsdNodes
  • nonQuorumNodes
  • nonWindowsNodes
  • nsdNodes
  • quorumNodes
  • serverLicense
  • windowsNodes

This behaviour can be changed by calling setNonAllNodeClasses, after which only user node classes will be returned.

Description

class arcapix.fs.gpfs.nodeclasses.Nodeclasses

Make a collection of nodeclasses.

new(nodeclassName, initialMembers, **kwargs)

Create a nodeclass object and add it to GPFS

Parameters:
  • nodeclassName – Name of the nodeclasses that you want to create in GPFS
  • initialMembers – Name of the nodes that you want to add to the nodeclass
Return type:

nodeclass

destroy(nodeclassName)

Remove a nodeclass from the GPFS and this collection

Parameters:nodeclassName – Name of the nodeclasses that you want to remove from nodeclasses
Return type:Nothing

Example

Using Nodeclasses directly

>>> from arcapix.fs.gpfs.nodeclasses import Nodeclasses
>>>
>>> # create a nodeclasses instance and load existing Nodeclasses from PixStor
... n = Nodeclasses()
>>>
>>> # Create a new nodeclass in PixStor
... n.new("myNewNodeclass", ['node01'])
>>>
>>> # Delete a nodeclass from within Nodeclasses container
... n.delete('myNewNodeclass')

Using Nodeclasses via Cluster

>>> from arcapix.fs.gpfs.cluster  import Cluster
>>>
>>> # create a cluster object
... mycluster = Cluster()
>>>
>>> # get the node object to add to the nodeclass
... node06 = myCluster.nodes['node06']
>>>
>>> # add node06 to the nodeclass "storageNodes"
... myCluster.nodeclasses['storageNodes'].add(node06)