diff options
author | evasquez <eric.vasquez@calxeda.com> | 2013-07-11 10:43:38 -0500 |
---|---|---|
committer | evasquez <eric.vasquez@calxeda.com> | 2013-07-11 10:43:38 -0500 |
commit | f8d6b408331489e6b81ff275f409cfe063e9e333 (patch) | |
tree | 4dbc3084a650c8aa4ca52e1cb6152de18fbc2ff6 | |
parent | cc654adb409a9565c96ee4586d1e0e4996e9c1ac (diff) | |
download | cxmanage-f8d6b408331489e6b81ff275f409cfe063e9e333.tar.gz |
Added examples for get_linkmap() and get_routing_table().
Fixed set_uplink() example to be more verbose.
-rw-r--r-- | cxmanage_api/fabric.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cxmanage_api/fabric.py b/cxmanage_api/fabric.py index cad5bc6..fd71fdc 100644 --- a/cxmanage_api/fabric.py +++ b/cxmanage_api/fabric.py @@ -815,7 +815,7 @@ class Fabric(object): def set_uplink(self, uplink=0, iface=0): """Set the uplink for an interface to xmit a packet out of the cluster. - >>> fabric.set_uplink(0,0) + >>> fabric.set_uplink(uplink=0,iface=0) :param uplink: The uplink to set. :type uplink: integer @@ -872,6 +872,9 @@ class Fabric(object): def get_linkmap(self, async=False): """Get the linkmap for each node in the fabric. + >>> fabric.get_linkmap() + {0: {1: 2, 3: 1, 4: 3}, 1: {3: 0}, 2: {3: 0, 4: 3}, 3: {3: 0, 4: 2}} + :param async: Flag that determines if the command result (dictionary) is returned or a Task object (can get status, etc.). :type async: boolean @@ -885,6 +888,12 @@ class Fabric(object): def get_routing_table(self, async=False): """Get the routing_table for the fabric. + >>> fabric.get_routing_table() + {0: {1: [0, 0, 0, 3, 0], 2: [0, 3, 0, 0, 2], 3: [0, 2, 0, 0, 3]}, + 1: {0: [0, 0, 0, 3, 0], 2: [0, 0, 0, 2, 0], 3: [0, 0, 0, 2, 0]}, + 2: {0: [0, 0, 0, 3, 2], 1: [0, 0, 0, 2, 0], 3: [0, 0, 0, 2, 3]}, + 3: {0: [0, 0, 0, 3, 2], 1: [0, 0, 0, 2, 0], 2: [0, 0, 0, 2, 3]}} + :param async: Flag that determines if the command result (dictionary) is returned or a Task object (can get status, etc.). :type async: boolean |