Package com.morpheusdata.model
Class NetworkPool
Provides a Model representation of a Network Pool typically provided or synced from an IPAM Provider. Some Providers
call these Subnets/Networks or IP Blocks. These should be synced via the relevant
IPAMProvider
implementation.
A Pool typically has a list of host record associated with it and keeps track of reservations that have been made on the particular pool.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
protected String
protected Boolean
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected BigInteger
protected BigInteger
protected String
protected String
protected Boolean
protected String
protected String
protected String
Fields inherited from class com.morpheusdata.model.projection.NetworkPoolIdentityProjection
accountId, category, typeCode
Fields inherited from class com.morpheusdata.model.MorpheusModel
config, id
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToIpRanges
(NetworkPoolRange range) getCidr()
Gets the CIDR Representation of the network Pool being synced.Gets the IPv6 CIDR Representation of the network Pool being synced.Gets the Configuration name this pool is associated with.Gets the display name of the current Network Pool.Gets the Primary DNS Domain for searching for relative hostnames within the network.Gets a list of ip addresses of nameservers that are assigned to the relevant Network Pool.Gets a list of DNS Search suffixes.Gets the external unique identifier.Gets the Gateway ip address related to the current Network Block.Gets the Host Prefix associated with this Pool.Gets the Proxy Url for the current Pool.Gets an optional alternative reference id field.Gets the Total number of ip addresses in the current block range based on the CIDR.Gets the Total Number of free ip addresses in the Block that can still be allocated.getName()
Gets the Human readable name of the Network Pool this record represents.Gets the subnet mask qualifier as defined by the IPAM Provider for the current pool.Gets the flag representing whether or not the current Network Pool is enabled or disabled.getRefId()
Get the unique qualification id for the polymorphic association to the relevant integration.Get the String form of the Model class name that this Pool Record is related to.void
setAccountId
(Long id) Sets the account ID of the network pool.void
Sets the CIDR Block representation of the Network Pool being synced.void
setCidrIPv6
(String cidr) Sets the IPv6 CIDR Block representation of the Network Pool being synced.void
setConfiguration
(String configuration) Sets the Configuration name this pool is associated with.void
setDhcpServer
(Boolean dhcpServer) void
setDisplayName
(String displayName) Sets the display name of the current Network Pool.void
setDnsDomain
(String dnsDomain) Sets the Primary DNS Domain for searching for relative hostnames within the network.void
setDnsSearchPath
(String dnsSearchPath) void
setDnsServers
(List<String> dnsServers) Sets a list of ip addresses of nameservers that are assigned to the relevant Network Pool.void
setDnsSuffixList
(List<String> dnsSuffixList) Sets a list of DNS Search suffixes.void
setExternalId
(String externalId) Sets the external unique identifer as it relates to the integration provider.void
setGateway
(String gateway) Sets the Gateway ip address related to the current Network Block.void
setHostPrefix
(String hostPrefix) Sets the Host Prefix associated with this Pool.void
setHttpProxy
(String httpProxy) Sets the Proxy Url for the current Pool.void
setInternalId
(String internalId) Sets an alternative reference id that can be used by the relevantIPAMProvider
implementation for whatever purposes are needed during sync operations.void
setIpCount
(BigInteger ipCount) Sets the Total number of ip addresses in the current block range based on the CIDR.void
setIpFreeCount
(BigInteger ipFreeCount) Sets the Total Number of free ip addresses in the Block that can still be allocated.void
Sets the human readable name of the network pool this record represents.void
setNetmask
(String netmask) Sets the subnet mask qualifier as defined by the IPAM Integration in question.void
setOwnerId
(Long id) void
setPoolEnabled
(Boolean poolEnabled) Sets the flag representing whether or not the current Network Pool is enabled or disabled.void
setPoolServerId
(Long id) void
Set the unique qualification id for the polymorphic association to the relevant integration.void
setRefType
(String refType) Set the String form of the Model class name that this Pool Record is related to.void
setSubnetAddress
(String subnetAddress) Methods inherited from class com.morpheusdata.model.projection.NetworkPoolIdentityProjection
getAccountId, getCategory, getTypeCode, setCategory, setTypeCode
Methods inherited from class com.morpheusdata.model.projection.MorpheusIdentityModel
getIdentityProperties
Methods inherited from class com.morpheusdata.model.MorpheusModel
getConfig, getConfigMap, getConfigProperty, getDirtyProperties, getDirtyPropertyValues, getId, getProperties, isDirty, markClean, markDirty, markDirty, setConfig, setConfigMap, setConfigProperty, setId
-
Field Details
-
name
-
displayName
-
internalId
-
externalId
-
dnsDomain
-
hostPrefix
-
httpProxy
-
dnsServers
-
dnsSuffixList
-
gateway
-
netmask
-
dnsSearchPath
-
dhcpServer
-
subnetAddress
-
ipCount
-
ipFreeCount
-
poolEnabled
-
refType
-
refId
-
configuration
-
cidr
-
cidrIPv6
-
poolServer
-
account
-
owner
-
type
-
parentType
-
parentId
-
ipRanges
-
-
Constructor Details
-
NetworkPool
public NetworkPool()
-
-
Method Details
-
getName
Gets the Human readable name of the Network Pool this record represents. Some integrations represent this as the CIDR name if there is no available descriptive name provided. However, if there is the name should be provided via the sync services- Returns:
- a string representation of the human readable name of the current network pool.
-
setName
Sets the human readable name of the network pool this record represents. Some integrations may set this value to the CIDR name if there is no such thing as a humane readable name to represent the current block.- Parameters:
name
- a String representation of the human readable name of the current network pool.
-
getDisplayName
Gets the display name of the current Network Pool. Pools can have a display name for situations where the name of the pool is not easily consumable by its users.- Returns:
- the user friendly display name of the current Pool
-
setDisplayName
Sets the display name of the current Network Pool. Pools can have a display name for situations where the name of the pool is not easily consumable by its users.- Parameters:
displayName
- String representing the user friendly name of the pool.
-
getInternalId
Gets an optional alternative reference id field. This use can vary from provider to provider and may be used for storing alternative ids of the same object or a correlating id of the pool as it relates to a Network it may belong to depending on theIPAMProvider
implementation.- Returns:
- an alternative identifier used for sync purposes dependent on implementation.
-
setInternalId
Sets an alternative reference id that can be used by the relevantIPAMProvider
implementation for whatever purposes are needed during sync operations.- Parameters:
internalId
- an alternative identifier used for sync purposes dependent on implementation.
-
getExternalId
Gets the external unique identifier. The externalId is available on most sync related Models and is the unique identifier used by the external integration of the correlating object. Whenever syncing something like a Domain record, the unique identifier provided by the third party vendor should be stored here for cross referencing during sync.- Overrides:
getExternalId
in classNetworkPoolIdentityProjection
- Returns:
- the external unique identifier representation of this pool from the external integration.
-
setExternalId
Sets the external unique identifer as it relates to the integration provider. Whenever syncing something like a Pool record, the unique identifier provided by the third party vendor should be stored here for cross referencing during sync.- Overrides:
setExternalId
in classNetworkPoolIdentityProjection
- Parameters:
externalId
- the external unique identifier representation of this cloud from the external integration.
-
getDnsDomain
Gets the Primary DNS Domain for searching for relative hostnames within the network. This information is normally on the network but is also on the Block if the releventIPAMProvider
syncs this data.- Returns:
- The Primary DNS Domain for this network
-
setDnsDomain
Sets the Primary DNS Domain for searching for relative hostnames within the network. This information is normally on the network but is also on the Block if the releventIPAMProvider
syncs this data.- Parameters:
dnsDomain
- The Primary DNS Domain for this network
-
getHostPrefix
Gets the Host Prefix associated with this Pool.- Returns:
- a host prefix qualifier
-
setHostPrefix
Sets the Host Prefix associated with this Pool.- Parameters:
hostPrefix
- a host prefix qualifier
-
getHttpProxy
Gets the Proxy Url for the current Pool. Some Network Pools have information corresponding to a proxy server that may exist on the network. This information is typically not used by Morpheus and configured elsewhere but it is otherwise synced into the Pool record for reference.- Returns:
- the Proxy URL for the specified Network Pool
-
setHttpProxy
Sets the Proxy Url for the current Pool. Some Network Pools have information corresponding to a proxy server that may exist on the network. This information is typically not used by Morpheus and configured elsewhere but it is otherwise synced into the Pool record for reference.- Parameters:
httpProxy
- the Proxy URL for the specified Network Pool
-
getDnsServers
Gets a list of ip addresses of nameservers that are assigned to the relevant Network Pool. Typically this data is grabbed off of theNetwork
during IP Allocation but if that data has not been entered, it could be grabbed from the pool data- Returns:
- a List of ip addresses in priority order of nameservers.
-
setDnsServers
Sets a list of ip addresses of nameservers that are assigned to the relevant Network Pool. Typically this data is grabbed off of theNetwork
during IP Allocation but if that data has not been entered, it could be grabbed from the pool data- Parameters:
dnsServers
- a List of ip addresses in priority order of nameservers.
-
getDnsSuffixList
Gets a list of DNS Search suffixes. SomeIPAMProvider
blocks provide network detail information. If that information is not defined on theNetwork
that the pool is used for within Morpheus, this information is utilized- Returns:
- a List of DNS Search Suffixes
-
setDnsSuffixList
Sets a list of DNS Search suffixes. SomeIPAMProvider
blocks provide network detail information. If that information is not defined on theNetwork
that the pool is used for within Morpheus, this information is utilized- Parameters:
dnsSuffixList
- a List of DNS Search Suffixes
-
getGateway
Gets the Gateway ip address related to the current Network Block. In most cases this information is unavailable and stored on theNetwork
object during IP Allocation. However, if that information has not been specified by the user, then this property will be checked to see if an available Gateway IP Address can be assigned to the Server being provisioned.- Returns:
- the gateway ip address of the current pool
-
setGateway
Sets the Gateway ip address related to the current Network Block. In most cases this information is unavailable and stored on theNetwork
object during IP Allocation. However, if that information has not been specified by the user, then this property will be checked to see if an available Gateway IP Address can be assigned to the Server being provisioned.- Parameters:
gateway
- the gateway ip address of the current pool
-
getNetmask
Gets the subnet mask qualifier as defined by the IPAM Provider for the current pool. In most cases this data is not used by Morpheus but is typically provided simply for reference as most of the information is redundant to the Network that the pool is correlated to.- Returns:
- the subnet mask of the current Network Pool
-
setNetmask
Sets the subnet mask qualifier as defined by the IPAM Integration in question. In some cases , if this information does not exist on the correspondingNetwork
object during IP allocation, this information will be used if it is available.- Parameters:
netmask
- the subnet mask of the current Network Pool
-
getIpCount
Gets the Total number of ip addresses in the current block range based on the CIDR. This is not factoring in existing reservations.- Returns:
- numerical count of number of ip addresses available within the current block.
-
setIpCount
Sets the Total number of ip addresses in the current block range based on the CIDR. This is not factoring in existing reservations.- Parameters:
ipCount
- numerical count of number of ip addresses available within the current block.
-
getIpFreeCount
Gets the Total Number of free ip addresses in the Block that can still be allocated. SomeIPAMProvider
implementations set this directly based on information from the target API, and others have to calculate this based on synced IP records.- Returns:
- total number of free ip addresses that can be allocated on this Network Pool
-
setIpFreeCount
Sets the Total Number of free ip addresses in the Block that can still be allocated. SomeIPAMProvider
implementations set this directly based on information from the target API, and others have to calculate this based on synced IP records.- Parameters:
ipFreeCount
- total number of free ip addresses that can be allocated on this Network Pool
-
getPoolEnabled
Gets the flag representing whether or not the current Network Pool is enabled or disabled. Some IPAM Providers have the option to selectively disable pools for allocation. This flag informs Morpheus as to the status of those pools.- Returns:
- enabled state of the current pool
-
setPoolEnabled
Sets the flag representing whether or not the current Network Pool is enabled or disabled. Some IPAM Providers have the option to selectively disable pools for allocation. This flag informs Morpheus as to the status of those pools.- Parameters:
poolEnabled
- enabled state of the current pool
-
getRefType
Get the String form of the Model class name that this Pool Record is related to. Typically via most Integrations the value of this field should be blank since its associated with a poolServer, however some scenarios exist where this may get synced or created via an alternative means (perhaps from a CloudProvider). In the event of this being synced by a cloud provider setting the refType to 'ComputeZone' and refId to correlate to the target cloud is recommended.- Returns:
- the Reference Type class name of the associated integration, typically NULL for this use case
-
setRefType
Set the String form of the Model class name that this Pool Record is related to. Typically via most Integrations the value of this field should be blank since its associated with a poolServer, however some scenarios exist where this may get synced or created via an alternative means (perhaps from a CloudProvider). In the event of this being synced by a cloud provider setting the refType to 'ComputeZone' and refId to correlate to the target cloud is recommended.- Parameters:
refType
- the Reference Type class name of the associated integration, typically NULL for this use case
-
getRefId
Get the unique qualification id for the polymorphic association to the relevant integration. For most IPAM implementations a Pool Server is associated and this is not necessary, however some pool types are synced via a cloud provider and in that scenario a reference to the 'ComputeZone' is typically stored here- Returns:
- the reference id to the associated CloudProvider in the event this pool is synced from a CloudProvider.
-
setRefId
Set the unique qualification id for the polymorphic association to the relevant integration. For most IPAM implementations a Pool Server is associated and this is not necessary, however some pool types are synced via a cloud provider and in that scenario a reference to the 'ComputeZone' is typically stored here- Parameters:
refId
- the reference id to the associated CloudProvider in the event this pool is synced from a CloudProvider.
-
getConfiguration
Gets the Configuration name this pool is associated with. Some IPAM Providers have a concept of scoping of Blocks and DNS. These are called Configurations. This is useful for isolating various departments of large enterprises. The Primary vendor that has the concept of Configuration scoping is Bluecat.- Returns:
- a String representation of the configuration name.
-
setConfiguration
Sets the Configuration name this pool is associated with. Some IPAM Providers have a concept of scoping of Blocks and DNS. These are called Configurations. This is useful for isolating various departments of large enterprises. The Primary vendor that has the concept of Configuration scoping is Bluecat.- Parameters:
configuration
- a String representation of the configuration name.
-
getCidr
Gets the CIDR Representation of the network Pool being synced. Typically this may look like a 192.168.0.0/24 format. See CIDR Specifications for more information on how to properly form a CIDR Block.- Returns:
- the CIDR block represented by the current pool.
-
setCidr
Sets the CIDR Block representation of the Network Pool being synced. Typically this may look like '192.168.0.0/24' format. See CIDR Specifications for more information on how to properly form a CIDR Block.- Parameters:
cidr
- the CIDR block represented by the current pool.
-
getCidrIPv6
Gets the IPv6 CIDR Representation of the network Pool being synced. Typically this may look like a '2001:db8::' format. See CIDR Specifications for more information on how to properly form a CIDR Block.- Returns:
- the IPv6 CIDR block represented by the current pool.
-
setCidrIPv6
Sets the IPv6 CIDR Block representation of the Network Pool being synced. Typically this may look like '2001:db8::' format. See CIDR Specifications for more information on how to properly form a CIDR Block.- Parameters:
cidr
- the IPv6 CIDR block represented by the current pool.
-
addToIpRanges
-
setPoolServerId
-
setAccountId
Description copied from class:NetworkPoolIdentityProjection
Sets the account ID of the network pool. In this class this should not be called directly- Overrides:
setAccountId
in classNetworkPoolIdentityProjection
- Parameters:
id
- account ID of the current record
-
setOwnerId
-
getDnsSearchPath
-
setDnsSearchPath
-
getDhcpServer
-
setDhcpServer
-
getSubnetAddress
-
setSubnetAddress
-