fgcp.design
index
design.py

VSystem Design for the Fujitsu Global Cloud Platform (FGCP)
 
Example: [see tests/test_resource.py for more examples]
 
# Connect with your client certificate to region 'uk'
from fgcp.resource import FGCPVDataCenter
vdc = FGCPVDataCenter('client.pem', 'uk')
 
# Get VSystem Design from an existing vsystem or file, and build a new vsystem with it (TODO)
design = vdc.get_vsystem_design('Demo System')
#design.load_file('fgcp_demo_system.txt')
#design.build_vsystem('My New Demo System')
#design.load_vsystem('Demo System')
design.save_file('new_demo_system.txt')

 
Modules
       
sys
time

 
Classes
       
fgcp.FGCPError(exceptions.Exception)
FGCPDesignError
fgcp.resource.FGCPResource(fgcp.resource.FGCPElement)
FGCPDesign
FGCPVisual

 
class FGCPDesign(fgcp.resource.FGCPResource)
    FGCP VSystem Design
 
 
Method resolution order:
FGCPDesign
fgcp.resource.FGCPResource
fgcp.resource.FGCPElement
future.types.newobject.newobject
__builtin__.object

Methods defined here:
build_vsystem(self, vsysName=None, filePath=None)
Build new VSystem based on loaded VSystem Design
from_code(self, lines)
from_json(self, lines, parent=None)
from_var(self, what, parent=None)
from_yaml(self, lines, parent=None)
load_file(self, filePath)
Load VSystem Design from file
load_vdc(self, filePath='vdc.json')
load_vsystem(self, vsystem)
Load VSystem Design from vsystem
save_file(self, filePath, format='json', replaceIps=True)
Save VSystem Design to file
save_vdc(self, filePath='vdc.json')
to_code(self, what)
to_json(self, what, indent=None)
to_var(self, what)
to_yaml(self, what, depth=0, suffix='')

Data and other attributes defined here:
filePath = None
vsysName = None
vsystem = None

Methods inherited from fgcp.resource.FGCPResource:
__init__(self, **kwargs)
__repr__(self)
check_status(self, in_state=[], out_state=[])
create(self, wait=None)
destroy(self)
getid(self)
getparentid(self)
getproxy(self)
merge_attr(self, partial)
retrieve(self, refresh=None)
setparent(self, parent)
show_output(self, text='')
update(self)
wait_for_status(self, in_state=[], out_state=[], timeout=900)

Methods inherited from fgcp.resource.FGCPElement:
get_attr(self, attrlist=None, required=False, default=None)
pformat(self, what, depth=0)
pprint(self)
Show dump of the FGCP Element for development
reset_attr(self, what)

Methods inherited from future.types.newobject.newobject:
__long__(self)
__native__(self)
Hook for the future.utils.native() function
__nonzero__(self)
__unicode__(self)
next(self)

Data descriptors inherited from future.types.newobject.newobject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class FGCPDesignError(fgcp.FGCPError)
    Exception class for FGCP Design Errors
 
 
Method resolution order:
FGCPDesignError
fgcp.FGCPError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
__init__(self, status, message, resource=None)
__str__(self)

Data descriptors inherited from fgcp.FGCPError:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class FGCPVisual(FGCPDesign)
    FGCP Visual for use with vis.js and other visualisation tools
 
 
Method resolution order:
FGCPVisual
FGCPDesign
fgcp.resource.FGCPResource
fgcp.resource.FGCPElement
future.types.newobject.newobject
__builtin__.object

Methods defined here:
add_firewall(self, firewall)
add_fw_rule(self, fw_rule)
add_loadbalancer(self, loadbalancer)
add_node(self, label, color=None, shape=None, group=None, descr=None, unique=True)
add_port(self, port)
add_ports(self, port1, port2=None)
add_publicip(self, publicip)
add_unknown(self, unknown)
add_vnet(self, vnet)
add_vserver(self, vserver)
add_zone(self, zone)
get_fw_rules(self, vsystem=None)
get_fw_slb_match(self, vsystem=None)
get_node_idx(self, label)
get_vis_json(self, layout=None, direction=None)
get_zones(self, vsystem=None)
link_nodes(self, from_idx, to_idx, arrows=False, label=None)
save_fw_rules(self, vsystem=None)
save_fw_slb_match(self, vsystem=None)
save_zones(self, vsystem=None)
start(self, vsystem=None)
write_vis(self, filePath=None, layout=None, direction=None)
write_vis_js(self)
write_vis_json(self)

Data and other attributes defined here:
direction = None
edges = []
header = []
layout = None
node_idx = 0
nodes = []
table = []
target_idx = {}

Methods inherited from FGCPDesign:
build_vsystem(self, vsysName=None, filePath=None)
Build new VSystem based on loaded VSystem Design
from_code(self, lines)
from_json(self, lines, parent=None)
from_var(self, what, parent=None)
from_yaml(self, lines, parent=None)
load_file(self, filePath)
Load VSystem Design from file
load_vdc(self, filePath='vdc.json')
load_vsystem(self, vsystem)
Load VSystem Design from vsystem
save_file(self, filePath, format='json', replaceIps=True)
Save VSystem Design to file
save_vdc(self, filePath='vdc.json')
to_code(self, what)
to_json(self, what, indent=None)
to_var(self, what)
to_yaml(self, what, depth=0, suffix='')

Data and other attributes inherited from FGCPDesign:
filePath = None
vsysName = None
vsystem = None

Methods inherited from fgcp.resource.FGCPResource:
__init__(self, **kwargs)
__repr__(self)
check_status(self, in_state=[], out_state=[])
create(self, wait=None)
destroy(self)
getid(self)
getparentid(self)
getproxy(self)
merge_attr(self, partial)
retrieve(self, refresh=None)
setparent(self, parent)
show_output(self, text='')
update(self)
wait_for_status(self, in_state=[], out_state=[], timeout=900)

Methods inherited from fgcp.resource.FGCPElement:
get_attr(self, attrlist=None, required=False, default=None)
pformat(self, what, depth=0)
pprint(self)
Show dump of the FGCP Element for development
reset_attr(self, what)

Methods inherited from future.types.newobject.newobject:
__long__(self)
__native__(self)
Hook for the future.utils.native() function
__nonzero__(self)
__unicode__(self)
next(self)

Data descriptors inherited from future.types.newobject.newobject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        print_function = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536)