Package enomalism2 :: Package modules :: Package static_networks :: Module model
[hide private]

Module model

Defines the core abstractions used by static_networks.


Requires:

Status: Stable

Classes [hide private]
  StaticNetwork
Abstraction representing a static network.
  StaticIPRange
Abstraction representing a range of IP addresses.
  StaticIPUsed
Abstraction representing an IP address that is being used by some machine.
  StaticNetworkTools
Utility functionality required for managing networks.
  StaticNetworkNotFound
This exception is raised when Enomalism cannot find a particular static network.
  StaticIPRangeNotFound
This exception is raised when Enomalism cannot find a perticular static ip range.
Functions [hide private]
enomalism2.installer.installer.install
hook_install(fn, self)
Hook that is invoked when the Enomalism installer is run.
List
hook_by_prefix(fn, cls, filter='', **kw)
Hook that will add static network objects to the results returned by UUIDSearch.by_prefix().
Variables [hide private]
  hub = PackageHub('enomalism2')
  __connection__ = PackageHub('enomalism2')
  uuid = '55ec1bd2-56f1-46b2-a44c-c951fb5e7401'
  unused_query = ...
Function Details [hide private]

hook_install(fn, self)

 

Hook that is invoked when the Enomalism installer is run. This will create the required static network tables if they do not already exist.

Parameters:
Returns: enomalism2.installer.installer.install
The orginal method invocation.
Decorators:
  • @model.hook(installer.installer, installer.installer.install)
Raises:
  • None - No exceptions are raised by this method.

Status: Stable

hook_by_prefix(fn, cls, filter='', **kw)

 

Hook that will add static network objects to the results returned by UUIDSearch.by_prefix().

Parameters:
  • fn (Function) - The class method we are hooking into.
  • cls (enomalism2.model.UUIDSearch) - The method's class.
  • filter (String) - The object filter.
Returns: List
The extended result of the original method invocation.
Decorators:
  • @model.hook(model.UUIDSearch, model.UUIDSearch.by_prefix)
Raises:
  • None - No exceptions are raised by this method.

Variables Details [hide private]

unused_query

Value:
"""
select  u.ip first,
        r.ip as second,
        u.ip+1 as usable ,
        u.static_ip_range_id ,
        r.static_ip_range_id from static_ip_used as u
left join static_ip_used as r on
        r.ip=u.ip+1
...