models.subnet module

class models.subnet.Subnet(component=None, description=None, id=None, ip=None, netmask_bits=None, netmask_ip_4=None, nfs_access=None, nfs_all_squash=None, nfs_root_squash=None, smb_access=None)[source]

Bases: object

Implementation of the ‘Subnet’ model.

Defines a Subnet (Subnetwork). The netmask can be specified by setting netmaskBits or netmaskIp4. The netmask can only be set using netmaskIp4 if the IP address is an IPv4 address.

Attributes:

component (string): Component that has reserved the subnet. description (string): Description of the subnet. id (int): ID of the subnet. ip (string): Specifies either an IPv6 address or an IPv4 address. netmask_bits (int): Specifies the netmask using bits. netmask_ip_4 (string): Specifies the netmask using an IP4 address. The

netmask can only be set using netmaskIp4 if the IP address is an IPv4 address.

nfs_access (NfsAccessEnum): Specifies whether clients from this subnet

can mount using NFS protocol. Protocol access level. ‘kDisabled’ indicates Protocol access level ‘Disabled’ ‘kReadOnly’ indicates Protocol access level ‘ReadOnly’ ‘kReadWrite’ indicates Protocol access level ‘ReadWrite’

nfs_all_squash (bool): Specifies whether all clients from this subnet

can map view with view_all_squash_uid/view_all_squash_gid configured in the view.

nfs_root_squash (bool): Specifies whether clients from this subnet can

mount as root on NFS.

smb_access (SmbAccessEnum): Specifies whether clients from this subnet

can mount using SMB protocol. Protocol access level. ‘kDisabled’ indicates Protocol access level ‘Disabled’ ‘kReadOnly’ indicates Protocol access level ‘ReadOnly’ ‘kReadWrite’ indicates Protocol access level ‘ReadWrite’

classmethod from_dictionary(dictionary)[source]

Creates an instance of this model from a dictionary

Args:

dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server’s response. The keys MUST match property names in the API description.

Returns:

object: An instance of this structure class.