IP groups - create

Use this command to create an IP group.

You can use admin.ipgroups.create command to create a new resource or new resources and place them in this collection. Use help(admin.ipgroups.create) to show what parameters to enter.

Example:


admin.ipgroups << {
"subnet": "172.16.64.0",
"mask": "255.255.240.0",
"gateway": "172.16.64.1",
"dns": "172.16.248.2",
"purpose": "data",
"vlan_id": "667"}

The attributes for the new resources can be specified in several ways:

As a dict object with the required keys. For example:

>>> admin.ipgroups.create({'name': 'ipgroup-name', ...})

As the name of a file containing a Jython expression that evaluates to one of the values in this list.

The value deployer.wizard or a wizard instance created by calling deployer.wizard(). If either of these values is supplied, the CLI will prompt interactively for the values needed to create the resource.

As a list of any of the above, in which case multiple resources are created.  For example:

>>> admin.ipgroups.create([{'name': 'ipgroup-name', ...},'file_containing_jython_dict'])
This method returns a resource object for the newly-created resource, or a list of resource objects if multiple resources were created. When passing a dict object to this method you must supply values for the following keys:
subnet
 Subnet address associated with the IP group, represented as a string in dotted decimal notation (for example, '192.168.98.0').
mask
Network mask associated with the IP group's subnet address, represented as a string in dotted decimal notation (for example, '255.255.255.0').
gateway
Default gateway associated with the IP group represented as a string in dotted decimal notation (for example, '192.168.98.1').
dns
Primary DNS server used for the IP group, represented as a string in dotted decimal notation (for example, '192.168.98.2').
purpose
Purpose of the IP group, set to one of 'data', 'public-management', 'private-management'. This value cannot be changed.
vlan_id
ID of the VLAN that this ip group is associated to. This value cannot be changed.
You may also supply values for the following keys:
name
Display name associated with this IP group. If not specified, defaults to the subnet address.
ip_version
Version of IP addresses for the IP group. Valid values are 'ipv4', and 'ipv6'. The default is 'ipv4'.
secondary_dns
Secondary DNS server used for the IP group, represented as a string in dotted decimal notation (for example, '192.168.98.3').