Package lib :: Package cuckoo :: Package core :: Module database :: Class Machine
[hide private]
[frames] | no frames]

Class Machine

source code

object --+    
         |    
      Base --+
             |
            Machine

Configured virtual machines to be used as guests.

Instance Methods [hide private]
 
__repr__(self)
repr(x)
source code
 
to_dict(self)
Converts object to dict.
source code
 
to_json(self)
Converts object to JSON.
source code
 
__init__(self, name, label, ip, platform, interface, snapshot, resultserver_ip, resultserver_port)
A simple constructor that allows initialization from kwargs.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __tablename__ = 'machines'
  id = Column(Integer(), primary_key= True)
  name = Column(String(255), nullable= False)
  label = Column(String(255), nullable= False)
  ip = Column(String(255), nullable= False)
  platform = Column(String(255), nullable= False)
  tags = relationship("Tag", secondary= machines_tags, cascade= ...
  interface = Column(String(255), nullable= True)
  snapshot = Column(String(255), nullable= True)
  locked = Column(Boolean(), nullable= False, default= False)
  locked_changed_on = Column(DateTime(timezone= False), nullable...
  status = Column(String(255), nullable= True)
  status_changed_on = Column(DateTime(timezone= False), nullable...
  resultserver_ip = Column(String(255), nullable= False)
  resultserver_port = Column(String(255), nullable= False)
  __mapper__ = <Mapper at 0x7f86b8194110; Machine>
  __table__ = Table('machines', MetaData(bind=None), Column('id'...
  _sa_class_manager = <ClassManager of <class 'lib.cuckoo.core.d...

Inherited from Base: metadata

Inherited from Base (private): _decl_class_registry

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

to_dict(self)

source code 

Converts object to dict.

Returns:
dict

to_json(self)

source code 

Converts object to JSON.

Returns:
JSON data

__init__(self, name, label, ip, platform, interface, snapshot, resultserver_ip, resultserver_port)
(Constructor)

source code 

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in ``kwargs``.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

Overrides: object.__init__
(inherited documentation)

Class Variable Details [hide private]

tags

Value:
relationship("Tag", secondary= machines_tags, cascade= "all, delete", \
single_parent= True, backref= backref("machine", cascade= "all"))

locked_changed_on

Value:
Column(DateTime(timezone= False), nullable= True)

status_changed_on

Value:
Column(DateTime(timezone= False), nullable= True)

__table__

Value:
Table('machines', MetaData(bind=None), Column('id', Integer(), table=<\
machines>, primary_key=True, nullable=False), Column('name', String(le\
ngth=255), table=<machines>, nullable=False), Column('label', String(l\
ength=255), table=<machines>, nullable=False), Column('ip', String(len\
gth=255), table=<machines>, nullable=False), Column('platform', String\
(length=255), table=<machines>, nullable=False), Column('interface', S\
tring(length=255), table=<machines>), Column('snapshot', String(length\
=255), table=<machines>), Column('locked', Boolean(), table=<machines>\
...

_sa_class_manager

Value:
<ClassManager of <class 'lib.cuckoo.core.database.Machine'> at 7f86b81\
f9990>