def __init__(self, mac=None, name=None, system_name=None, comment=None): self.mac = mac self.name = name self.system_name = system_name self.comment = comment self.constraints ImpulseObject.__init__(self)
def __init__(self, name=None, first_ip=None, last_ip=None, subnet=None, use=None, inp_class=None, comment=None): """ Description: Instantiate an IPRange object, does not require parameters to be given. """ self.name = name self.first_ip = first_ip self.last_ip = last_ip self.subnet = subnet self.use = use setattr(self, 'class', inp_class) self.comment = comment ImpulseObject.__init__(self)
def __init__(self, subnet=None, name=None, comment=None, autogen=None, dhcp=None, zone=None, owner=None): """ Description: Create a Subnet object, can accept arguments or not """ self.subnet = subnet self.name = name self.comment = comment self.autogen = autogen self.dhcp = dhcp self.zone = zone self.owner = owner self.constraints ImpulseObject.__init__(self)
def __init__(self, mac=None, name=None, family=None, address_class=None, config=None, comment=None): """ Description: Create an Address object, can accept arguments or not """ self.mac = mac setattr(self, 'class', address_class) if not address_class: setattr(self, 'class', 'default') self.name = name self.family = family self.config = config self.comment = comment self.constraints ImpulseObject.__init__(self)
def __init__(self, name=None, sys_type=None, osname=None, comment=None): """ Description: The constructor for System. Passing in parameters is allowed, but not required. Properties are only required when System.put() is used, as that is when the object is stored in the Impulse database """ self.system_name = name self.type = sys_type self.os_name = osname self.comment = comment self.owner = get_username() self.constraints ImpulseObject.__init__(self) if name and self.type and osname: self.create()