Package com.morpheusdata.model
Class NetworkPool
- java.lang.Object
-
- com.morpheusdata.model.MorpheusModel
-
- com.morpheusdata.model.projection.NetworkPoolIdentityProjection
-
- com.morpheusdata.model.NetworkPool
-
public class NetworkPool extends NetworkPoolIdentityProjection
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 relevantIPAMProvider
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:
IPAMProvider
-
-
Field Summary
Fields Modifier and Type Field Description Account
account
protected java.lang.String
cidr
protected java.lang.String
configuration
protected java.lang.Boolean
dhcpServer
protected java.lang.String
displayName
protected java.lang.String
dnsDomain
protected java.lang.String
dnsSearchPath
protected java.util.List<java.lang.String>
dnsServers
protected java.util.List<java.lang.String>
dnsSuffixList
protected java.lang.String
externalId
protected java.lang.String
gateway
protected java.lang.String
hostPrefix
protected java.lang.String
httpProxy
protected java.lang.String
internalId
protected java.math.BigInteger
ipCount
protected java.math.BigInteger
ipFreeCount
java.util.List<NetworkPoolRange>
ipRanges
protected java.lang.String
name
protected java.lang.String
netmask
Account
owner
java.lang.String
parentId
java.lang.String
parentType
protected java.lang.Boolean
poolEnabled
NetworkPoolServer
poolServer
protected java.lang.String
refId
protected java.lang.String
refType
protected java.lang.String
subnetAddress
NetworkPoolType
type
-
Fields inherited from class com.morpheusdata.model.projection.NetworkPoolIdentityProjection
accountId, category, typeCode
-
Fields inherited from class com.morpheusdata.model.MorpheusModel
config, id
-
-
Constructor Summary
Constructors Constructor Description NetworkPool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToIpRanges(NetworkPoolRange range)
java.lang.String
getCidr()
Gets the CIDR Representation of the network Pool being synced.java.lang.String
getConfiguration()
Gets the Configuration name this pool is associated with.java.lang.Boolean
getDhcpServer()
java.lang.String
getDisplayName()
Gets the display name of the current Network Pool.java.lang.String
getDnsDomain()
Gets the Primary DNS Domain for searching for relative hostnames within the network.java.lang.String
getDnsSearchPath()
java.util.List<java.lang.String>
getDnsServers()
Gets a list of ip addresses of nameservers that are assigned to the relevant Network Pool.java.util.List<java.lang.String>
getDnsSuffixList()
Gets a list of DNS Search suffixes.java.lang.String
getExternalId()
Gets the external unique identifier.java.lang.String
getGateway()
Gets the Gateway ip address related to the current Network Block.java.lang.String
getHostPrefix()
Gets the Host Prefix associated with this Pool.java.lang.String
getHttpProxy()
Gets the Proxy Url for the current Pool.java.lang.String
getInternalId()
Gets an optional alternative reference id field.java.math.BigInteger
getIpCount()
Gets the Total number of ip addresses in the current block range based on the CIDR.java.math.BigInteger
getIpFreeCount()
Gets the Total Number of free ip addresses in the Block that can still be allocated.java.lang.String
getName()
Gets the Human readable name of the Network Pool this record represents.java.lang.String
getNetmask()
Gets the subnet mask qualifier as defined by the IPAM Provider for the current pool.java.lang.Boolean
getPoolEnabled()
Gets the flag representing whether or not the current Network Pool is enabled or disabled.java.lang.String
getRefId()
Get the unique qualification id for the polymorphic association to the relevant integration.java.lang.String
getRefType()
Get the String form of the Model class name that this Pool Record is related to.java.lang.String
getSubnetAddress()
void
setAccountId(java.lang.Long id)
Sets the account ID of the network pool.void
setCidr(java.lang.String cidr)
Sets the CIDR Block representation of the Network Pool being synced.void
setConfiguration(java.lang.String configuration)
Sets the Configuration name this pool is associated with.void
setDhcpServer(java.lang.Boolean dhcpServer)
void
setDisplayName(java.lang.String displayName)
Sets the display name of the current Network Pool.void
setDnsDomain(java.lang.String dnsDomain)
Sets the Primary DNS Domain for searching for relative hostnames within the network.void
setDnsSearchPath(java.lang.String dnsSearchPath)
void
setDnsServers(java.util.List<java.lang.String> dnsServers)
Sets a list of ip addresses of nameservers that are assigned to the relevant Network Pool.void
setDnsSuffixList(java.util.List<java.lang.String> dnsSuffixList)
Sets a list of DNS Search suffixes.void
setExternalId(java.lang.String externalId)
Sets the external unique identifer as it relates to the integration provider.void
setGateway(java.lang.String gateway)
Sets the Gateway ip address related to the current Network Block.void
setHostPrefix(java.lang.String hostPrefix)
Sets the Host Prefix associated with this Pool.void
setHttpProxy(java.lang.String httpProxy)
Sets the Proxy Url for the current Pool.void
setInternalId(java.lang.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(java.math.BigInteger ipCount)
Sets the Total number of ip addresses in the current block range based on the CIDR.void
setIpFreeCount(java.math.BigInteger ipFreeCount)
Sets the Total Number of free ip addresses in the Block that can still be allocated.void
setName(java.lang.String name)
Sets the human readable name of the network pool this record represents.void
setNetmask(java.lang.String netmask)
Sets the subnet mask qualifier as defined by the IPAM Integration in question.void
setOwnerId(java.lang.Long id)
void
setPoolEnabled(java.lang.Boolean poolEnabled)
Sets the flag representing whether or not the current Network Pool is enabled or disabled.void
setPoolServerId(java.lang.Long id)
void
setRefId(java.lang.String refId)
Set the unique qualification id for the polymorphic association to the relevant integration.void
setRefType(java.lang.String refType)
Set the String form of the Model class name that this Pool Record is related to.void
setSubnetAddress(java.lang.String subnetAddress)
-
Methods inherited from class com.morpheusdata.model.projection.NetworkPoolIdentityProjection
getAccountId, getCategory, getTypeCode, setCategory, setTypeCode
-
Methods inherited from class com.morpheusdata.model.MorpheusModel
getConfig, getConfigMap, getConfigProperty, getDirtyProperties, getDirtyPropertyValues, getId, getProperties, isDirty, markClean, markDirty, markDirty, setConfig, setConfigMap, setConfigProperty, setId
-
-
-
-
Field Detail
-
name
protected java.lang.String name
-
displayName
protected java.lang.String displayName
-
internalId
protected java.lang.String internalId
-
externalId
protected java.lang.String externalId
-
dnsDomain
protected java.lang.String dnsDomain
-
hostPrefix
protected java.lang.String hostPrefix
-
httpProxy
protected java.lang.String httpProxy
-
dnsServers
protected java.util.List<java.lang.String> dnsServers
-
dnsSuffixList
protected java.util.List<java.lang.String> dnsSuffixList
-
gateway
protected java.lang.String gateway
-
netmask
protected java.lang.String netmask
-
dnsSearchPath
protected java.lang.String dnsSearchPath
-
dhcpServer
protected java.lang.Boolean dhcpServer
-
subnetAddress
protected java.lang.String subnetAddress
-
ipCount
protected java.math.BigInteger ipCount
-
ipFreeCount
protected java.math.BigInteger ipFreeCount
-
poolEnabled
protected java.lang.Boolean poolEnabled
-
refType
protected java.lang.String refType
-
refId
protected java.lang.String refId
-
configuration
protected java.lang.String configuration
-
cidr
protected java.lang.String cidr
-
poolServer
public NetworkPoolServer poolServer
-
account
public Account account
-
owner
public Account owner
-
type
public NetworkPoolType type
-
parentType
public java.lang.String parentType
-
parentId
public java.lang.String parentId
-
ipRanges
public java.util.List<NetworkPoolRange> ipRanges
-
-
Method Detail
-
getName
public java.lang.String 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
public void setName(java.lang.String name)
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
public java.lang.String 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
public void setDisplayName(java.lang.String displayName)
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
public java.lang.String 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
public void setInternalId(java.lang.String internalId)
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
public java.lang.String 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
public void setExternalId(java.lang.String externalId)
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
public java.lang.String 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
public void setDnsDomain(java.lang.String dnsDomain)
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
public java.lang.String getHostPrefix()
Gets the Host Prefix associated with this Pool.- Returns:
- a host prefix qualifier
-
setHostPrefix
public void setHostPrefix(java.lang.String hostPrefix)
Sets the Host Prefix associated with this Pool.- Parameters:
hostPrefix
- a host prefix qualifier
-
getHttpProxy
public java.lang.String 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
public void setHttpProxy(java.lang.String httpProxy)
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
public java.util.List<java.lang.String> 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
public void setDnsServers(java.util.List<java.lang.String> dnsServers)
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
public java.util.List<java.lang.String> 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
public void setDnsSuffixList(java.util.List<java.lang.String> dnsSuffixList)
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
public java.lang.String 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
public void setGateway(java.lang.String gateway)
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
public java.lang.String 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
public void setNetmask(java.lang.String netmask)
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
public java.math.BigInteger 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
public void setIpCount(java.math.BigInteger ipCount)
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
public java.math.BigInteger 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
public void setIpFreeCount(java.math.BigInteger ipFreeCount)
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
public java.lang.Boolean 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
public void setPoolEnabled(java.lang.Boolean poolEnabled)
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
public java.lang.String 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
public void setRefType(java.lang.String refType)
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
public java.lang.String 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
public void setRefId(java.lang.String refId)
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
public java.lang.String 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
public void setConfiguration(java.lang.String configuration)
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
public java.lang.String 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
public void setCidr(java.lang.String cidr)
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.
-
addToIpRanges
public void addToIpRanges(NetworkPoolRange range)
-
setPoolServerId
public void setPoolServerId(java.lang.Long id)
-
setAccountId
public void setAccountId(java.lang.Long id)
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
public void setOwnerId(java.lang.Long id)
-
getDnsSearchPath
public java.lang.String getDnsSearchPath()
-
setDnsSearchPath
public void setDnsSearchPath(java.lang.String dnsSearchPath)
-
getDhcpServer
public java.lang.Boolean getDhcpServer()
-
setDhcpServer
public void setDhcpServer(java.lang.Boolean dhcpServer)
-
getSubnetAddress
public java.lang.String getSubnetAddress()
-
setSubnetAddress
public void setSubnetAddress(java.lang.String subnetAddress)
-
-