Naming Pool Objects#

Naming Pools provide a mechanism to tie groups of nodes together through a common naming scheme, like n001 through n100. There is a default naming scheme that nodes will be assigned into; alternatively, when creating a node, it can be directly inserted into an existing Naming Pool.

In addition to naming the nodes according to a pattern, the Naming Pool can also provide offsets to IP addresses or include nodes into specified network segments.

When issuing requests, the UID field in the URL can be either the actual UID of the object or the name of the object as given in the "name" field.

Data Fields#

The Naming Pool fields are:

name
     Required: The name for the Dynamic Group

pattern
     Required: A string representing a naming pattern; a pattern may have one or more
               letters followed by a set of curly-braces followed by another one or
               more letters (see below)

description
     Optional: A text string with descriptive information

first_index
     Optional: Sets the first index for nodes added to this pool; default is 0

ip_base
     Optional: Sets a base IP address for the first node in the pool; default is empty
               (use the next available address in the default network)

ip_offset
     Optional: Sets an offset for the IP address of the first node in the pool; default
               is empty (use the next available address in the default network)

network
     Optional: Sets the Network to use when setting IP addresses

group
     Optional: Sets an Attribute Group object that all nodes in this pool will inherit
               from; any node added to the pool will automatically be assigned the
               attributes of this group (unless other Attribute Groups are assigned)

parent
     Optional: Sets a parent Naming Pool for nested pools

     There are several options for how naming pool patterns may be constructed:

pattern=”n{}”
     This is the default, and indicates that nodes will be named “n0” and up; note
     that in such a pattern, the name length is not constant which may lead to output
     formatting errors (i.e. “n0” versus “n100” will lead to a 2 character offset)

pattern=”gpu{:03d}”
     Will give names like gpu000, gpu001, gpu002, etc.; the “:03d” is formatted,
     zero-padded, 3 digits

Additional Endpoints#

Several additional endpoints are available:

GET /namingpools/info/<NODE>
     For a given node, NODE, the system will reply with the naming pool information
     used when naming that node

PUT /namingpool/<UID>/push
     Used to push node names to be updated; this is an advanced feature, please contact
     Penguin Solutions for more information.

Example#

Create a naming pool:

curl -X POST https://head1.cluster.local/api/v1/namingpools --data \
    '{"name":"gpu","pattern":"gpu{}"}' -H "Authorization: Bearer eyJhbGciOiJIUzI1Ni…"
{"success": true, "data": "1049f3b2f2d744f088a4ee6cc3ecfc91"}

Check on a node’s naming pool:

curl -X GET https://head1.cluster.local/api/v1/namingpools/info/gpu0 \
    -H "Authorization: Bearer eyJhbGciOiJIUzI1Ni…"
{"success": true, "data": {"index": 0, "pattern": "gpu{}"}}