Package modules :: Package machinery :: Module physical :: Class Physical
[hide private]
[frames] | no frames]

Class Physical

source code

                           object --+    
                                    |    
lib.cuckoo.common.abstracts.Machinery --+
                                        |
                                       Physical

Manage physical sandboxes.

Instance Methods [hide private]
 
_initialize_check(self)
Ensures that credentials have been entered into the config file.
source code
 
_get_machine(self, label)
Retrieve all machine info given a machine's name.
source code
 
start(self, label, task)
Start a physical machine.
source code
 
stop(self, label)
Stops a physical machine.
source code
 
_list(self)
Lists physical machines installed.
source code
 
_status(self, label)
Gets current status of a physical machine.
source code
 
fog_query(self, uri, data={})
Wrapper around requests for simplifying FOG API access.
source code
 
fog_init(self)
Initiate by indexing FOG regarding all available machines.
source code
 
fog_queue_task(self, hostname)
Queues a task with FOG to deploy the given machine after reboot.
source code
 
wake_on_lan(self, hostname)
Start a machine that's currently shutdown.
source code

Inherited from lib.cuckoo.common.abstracts.Machinery: __init__, acquire, availables, dump_memory, initialize, machines, pcap_path, release, running, set_options, set_status, shutdown

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

Class Variables [hide private]
  RUNNING = "running"
  STOPPED = "stopped"
  ERROR = "error"

Inherited from lib.cuckoo.common.abstracts.Machinery: LABEL

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_initialize_check(self)

source code 

Ensures that credentials have been entered into the config file.

Raises:
  • CuckooCriticalError - if no credentials were provided or if one or more physical machines are offline.
Overrides: lib.cuckoo.common.abstracts.Machinery._initialize_check

_get_machine(self, label)

source code 

Retrieve all machine info given a machine's name.

Parameters:
  • label - machine name.
Returns:
machine dictionary (id, ip, platform, ...).
Raises:

start(self, label, task)

source code 

Start a physical machine.

Parameters:
  • label - physical machine name.
  • task - task object.
Raises:
Overrides: lib.cuckoo.common.abstracts.Machinery.start

stop(self, label)

source code 

Stops a physical machine.

Parameters:
  • label - physical machine name.
Raises:
Overrides: lib.cuckoo.common.abstracts.Machinery.stop

_list(self)

source code 

Lists physical machines installed.

Returns:
physical machine names list.
Raises:
  • NotImplementedError - this method is abstract.
Overrides: lib.cuckoo.common.abstracts.Machinery._list

_status(self, label)

source code 

Gets current status of a physical machine.

Parameters:
  • label - physical machine name.
Returns:
status string.

fog_query(self, uri, data={})

source code 

Wrapper around requests for simplifying FOG API access. Assuming you can call what FOG is providing an API.