Class 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 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 Details

    • name

      protected String name
    • displayName

      protected String displayName
    • internalId

      protected String internalId
    • externalId

      protected String externalId
    • dnsDomain

      protected String dnsDomain
    • hostPrefix

      protected String hostPrefix
    • httpProxy

      protected String httpProxy
    • dnsServers

      protected List<String> dnsServers
    • dnsSuffixList

      protected List<String> dnsSuffixList
    • gateway

      protected String gateway
    • netmask

      protected String netmask
    • dnsSearchPath

      protected String dnsSearchPath
    • dhcpServer

      protected Boolean dhcpServer
    • subnetAddress

      protected String subnetAddress
    • ipCount

      protected BigInteger ipCount
    • ipFreeCount

      protected BigInteger ipFreeCount
    • poolEnabled

      protected Boolean poolEnabled
    • refType

      protected String refType
    • refId

      protected String refId
    • configuration

      protected String configuration
    • cidr

      protected String cidr
    • poolServer

      public NetworkPoolServer poolServer
    • account

      public Account account
    • owner

      public Account owner
    • type

      public NetworkPoolType type
    • parentType

      public String parentType
    • parentId

      public String parentId
    • ipRanges

      public List<NetworkPoolRange> ipRanges
  • Constructor Details

    • NetworkPool

      public NetworkPool()
  • Method Details

    • getName

      public 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(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 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(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 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 the IPAMProvider implementation.
      Returns:
      an alternative identifier used for sync purposes dependent on implementation.
    • setInternalId

      public void setInternalId(String internalId)
      Sets an alternative reference id that can be used by the relevant IPAMProvider implementation for whatever purposes are needed during sync operations.
      Parameters:
      internalId - an alternative identifier used for sync purposes dependent on implementation.
    • getExternalId

      public 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 class NetworkPoolIdentityProjection
      Returns:
      the external unique identifier representation of this pool from the external integration.
    • setExternalId

      public void setExternalId(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 class NetworkPoolIdentityProjection
      Parameters:
      externalId - the external unique identifier representation of this cloud from the external integration.
    • getDnsDomain

      public 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 relevent IPAMProvider syncs this data.
      Returns:
      The Primary DNS Domain for this network
    • setDnsDomain

      public void setDnsDomain(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 relevent IPAMProvider syncs this data.
      Parameters:
      dnsDomain - The Primary DNS Domain for this network
    • getHostPrefix

      public String getHostPrefix()
      Gets the Host Prefix associated with this Pool.
      Returns:
      a host prefix qualifier
    • setHostPrefix

      public void setHostPrefix(String hostPrefix)
      Sets the Host Prefix associated with this Pool.
      Parameters:
      hostPrefix - a host prefix qualifier
    • getHttpProxy

      public 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(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 List<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 the Network 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(List<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 the Network 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 List<String> getDnsSuffixList()
      Gets a list of DNS Search suffixes. Some IPAMProvider blocks provide network detail information. If that information is not defined on the Network that the pool is used for within Morpheus, this information is utilized
      Returns:
      a List of DNS Search Suffixes
    • setDnsSuffixList

      public void setDnsSuffixList(List<String> dnsSuffixList)
      Sets a list of DNS Search suffixes. Some IPAMProvider blocks provide network detail information. If that information is not defined on the Network that the pool is used for within Morpheus, this information is utilized
      Parameters:
      dnsSuffixList - a List of DNS Search Suffixes
    • getGateway

      public String getGateway()
      Gets the Gateway ip address related to the current Network Block. In most cases this information is unavailable and stored on the Network 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(String gateway)
      Sets the Gateway ip address related to the current Network Block. In most cases this information is unavailable and stored on the Network 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 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(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 corresponding Network 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 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(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 BigInteger getIpFreeCount()
      Gets the Total Number of free ip addresses in the Block that can still be allocated. Some IPAMProvider 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(BigInteger ipFreeCount)
      Sets the Total Number of free ip addresses in the Block that can still be allocated. Some IPAMProvider 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 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(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 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(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 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(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 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(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 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(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(Long id)
    • setAccountId

      public void setAccountId(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 class NetworkPoolIdentityProjection
      Parameters:
      id - account ID of the current record
    • setOwnerId

      public void setOwnerId(Long id)
    • getDnsSearchPath

      public String getDnsSearchPath()
    • setDnsSearchPath

      public void setDnsSearchPath(String dnsSearchPath)
    • getDhcpServer

      public Boolean getDhcpServer()
    • setDhcpServer

      public void setDhcpServer(Boolean dhcpServer)
    • getSubnetAddress

      public String getSubnetAddress()
    • setSubnetAddress

      public void setSubnetAddress(String subnetAddress)