Table of Contents

Class: Network pyVC/Networks/Base.py

This object defines the base class for a Network object.

Base Classes   
object
Methods   
__init__
__repr__
__str__
_get_cables
_get_dns_servers
_get_helpers
_get_lanname
_get_realmachine
_get_realmachines
_get_status
_get_subnet
_get_vms
add_helper
add_ip
add_realmachine
add_vm
interface
ips
pid
start
stop
  __init__ 
__init__ (
        self,
        realmachines,
        lanname,
        subnet="",
        dns_servers="",
        **keywords,
        )

  __repr__ 
__repr__ ( self )

Exceptions   
NotImplementedError
  __str__ 
__str__ ( self )

Exceptions   
NotImplementedError
  _get_cables 
_get_cables ( self )

Returns a list of cables associated with the Network.

>>> self._get_cables()

  _get_dns_servers 
_get_dns_servers ( self )

Returns a list of the DNS Servers associated with the Network.

>>> self._get_dns_servers()

  _get_helpers 
_get_helpers ( self )

Returns a list of the Helpers associated with the Network.

>>> self._get_helpers()

  _get_lanname 
_get_lanname ( self )

Returns the name of the Network.

>>> self._get_lanname()

  _get_realmachine 
_get_realmachine ( self )

Returns the primary real Machine associated with the Network.

>>> self._get_realmachine()

  _get_realmachines 
_get_realmachines ( self )

Returns a list of real Machines associated with the Network.

>>> self._get_realmachines()

  _get_status 
_get_status ( self )

Returns the status of the Network.

>>> self._get_status()

  _get_subnet 
_get_subnet ( self )

Returns the subnet of the Network.

>>> self._get_subnet()

  _get_vms 
_get_vms ( self )

Returns a list of VMs associated with the Network.

>>> self._get_vms()

  add_helper 
add_helper ( self,  helper )

Associates a Helper with the Network.

>>> self.add_helper(helper) helper = Helper

Exceptions   
TypeError, ('Got %s for first argument to add_helper, expected subclass of %s' %( type( helper ), Helper ) )
  add_ip 
add_ip (
        self,
        vm,
        ip,
        )

Associates a VM to IP address mapping with the Network.

>>> self.add_ip(vm, ip) vm = VM ip is a string containing a single IP address, in the form xxx.xxx.xxx.xxx.

Exceptions   
TypeError, ('Got %s for first argument to add_ip, expected subclass of %s' %( type( vm ), VM ) )
  add_realmachine 
add_realmachine ( self,  realmachine )

Associates a real Machine with the Network.

>>> self.add_realmachine(realmachine) realmachine = Machine

  add_vm 
add_vm ( self,  vm )

Associates a VM object with the Network.

>>> self.add_vm(vm) vm = VM

Exceptions   
TypeError, ('Got %s for first argument to add_vm, expected subclass of %s' %( type( vm ), VM ) )
  interface 
interface ( self,  realmachine )

Returns an interface associated with a Machine.

>>> self.interface(realmachine) realmachine = Machine

Exceptions   
KeyError, ("Can't find interface for %s on %s" %( realmachine.hostname, self.lanname ) )
  ips 
ips ( self,  vm )

Returns a list of IPs corresponding to a VM.

>>> self.ips(vm) vm = VM

Exceptions   
AttributeError
TypeError, ('Got %s for first argument to ip, expected subclass of %s' %( type( vm ), IP ) )
  pid 
pid ( self,  realmachine )

Returns a pid associated with a real Machine.

>>> self.pid(realmachine) realmachine = Machine

  start 
start ( self )

Abstract method to start the Network object.

>>> self.start()

Exceptions   
NotImplementedError
  stop 
stop ( self )

Abstract method to stop the Network object.

>>> self.stop()

Exceptions   
NotImplementedError

Table of Contents

This document was automatically generated on Thu Jan 18 11:28:09 2007 by HappyDoc version 2.1