print "detail_iface <tenant-id> <net-id> <port-id>"
print "list_iface <tenant-id> <net-id>\n"
-if len(sys.argv) < 2 or len(sys.argv) > 6:
+if len(sys.argv) < 2 or len(sys.argv) > 6:
usage()
exit(1)
elif sys.argv[1] == "unplug_iface" and len(sys.argv) == 5:
manager.unplug_interface(sys.argv[2], sys.argv[3], sys.argv[4])
print "UnPlugged remote interface " \
- "from Virtual Port:%s Virtual Network:%s" % (sys.argv[4],
+ "from Virtual Port:%s Virtual Network:%s" % (sys.argv[4],
sys.argv[3])
elif sys.argv[1] == "detail_iface" and len(sys.argv) == 5:
- remote_iface = manager.get_interface_details(sys.argv[2],
+ remote_iface = manager.get_interface_details(sys.argv[2],
sys.argv[3], sys.argv[4])
print "Remote interface on Virtual Port:%s " \
- "Virtual Network:%s is %s" % (sys.argv[4],
+ "Virtual Network:%s is %s" % (sys.argv[4],
sys.argv[3], remote_iface)
elif sys.argv[1] == "list_iface" and len(sys.argv) == 4:
iface_list = manager.get_all_attached_interfaces(sys.argv[2], sys.argv[3])
else:
print "invalid arguments: %s" % str(sys.argv)
usage()
-
Returns a dictionary containing all
<network_uuid, network_name> for
the specified tenant.
-
:returns: a list of mapping sequences with the following signature:
- [ {'net-id': uuid that uniquely identifies the particular quantum network,
- 'net-name': a human-readable name associated with network referenced by net-id
+ [ {'net-id': uuid that uniquely identifies
+ the particular quantum network,
+ 'net-name': a human-readable name associated
+ with network referenced by net-id
},
....
- {'net-id': uuid that uniquely identifies the particular quantum network,
- 'net-name': a human-readable name associated with network referenced by net-id
+ {'net-id': uuid that uniquely identifies the
+ particular quantum network,
+ 'net-name': a human-readable name associated
+ with network referenced by net-id
}
- ]
+ ]
:raises: None
"""
pass
-
-
@abstractmethod
def create_network(self, tenant_id, net_name):
"""
Creates a new Virtual Network, and assigns it
a symbolic name.
-
+
:returns: a sequence of mappings with the following signature:
- {'net-id': uuid that uniquely identifies the particular quantum network,
- 'net-name': a human-readable name associated with network referenced by net-id
+ {'net-id': uuid that uniquely identifies the
+ particular quantum network,
+ 'net-name': a human-readable name associated
+ with network referenced by net-id
}
:raises:
"""
"""
Deletes the network with the specified network identifier
belonging to the specified tenant.
-
+
:returns: a sequence of mappings with the following signature:
- {'net-id': uuid that uniquely identifies the particular quantum network
+ {'net-id': uuid that uniquely identifies the
+ particular quantum network
}
:raises: exception.NetworkInUse
:raises: exception.NetworkNotFound
"""
Retrieves a list of all the remote vifs that
are attached to the network.
-
+
:returns: a sequence of mappings with the following signature:
- {'net-id': uuid that uniquely identifies the particular quantum network
- 'net-name': a human-readable name associated with network referenced by net-id
- 'net-ifaces': ['vif1_on_network_uuid', 'vif2_on_network_uuid',...,'vifn_uuid']
+ {'net-id': uuid that uniquely identifies the
+ particular quantum network
+ 'net-name': a human-readable name associated
+ with network referenced by net-id
+ 'net-ifaces': ['vif1_on_network_uuid',
+ 'vif2_on_network_uuid',...,'vifn_uuid']
}
:raises: exception.NetworkNotFound
"""
"""
Updates the symbolic name belonging to a particular
Virtual Network.
-
- :returns: a sequence of mappings representing the new network attributes, with the following signature:
- {'net-id': uuid that uniquely identifies the particular quantum network
- 'net-name': the new human-readable name associated with network referenced by net-id
+
+ :returns: a sequence of mappings representing the new network
+ attributes, with the following signature:
+ {'net-id': uuid that uniquely identifies the
+ particular quantum network
+ 'net-name': the new human-readable name
+ associated with network referenced by net-id
}
:raises: exception.NetworkNotFound
"""
"""
Retrieves all port identifiers belonging to the
specified Virtual Network.
-
+
:returns: a list of mapping sequences with the following signature:
- [ {'port-id': uuid representing a particular port on the specified quantum network
+ [ {'port-id': uuid representing a particular port
+ on the specified quantum network
},
....
- {'port-id': uuid representing a particular port on the specified quantum network
+ {'port-id': uuid representing a particular port
+ on the specified quantum network
}
- ]
+ ]
:raises: exception.NetworkNotFound
"""
pass
def create_port(self, tenant_id, net_id, port_state=None):
"""
Creates a port on the specified Virtual Network.
-
+
:returns: a mapping sequence with the following signature:
- {'port-id': uuid representing the created port on specified quantum network
+ {'port-id': uuid representing the created port
+ on specified quantum network
}
:raises: exception.NetworkNotFound
:raises: exception.StateInvalid
"""
Updates the state of a specific port on the
specified Virtual Network.
-
+
:returns: a mapping sequence with the following signature:
- {'port-id': uuid representing the updated port on specified quantum network
+ {'port-id': uuid representing the
+ updated port on specified quantum network
'port-state': update port state( UP or DOWN)
}
:raises: exception.StateInvalid
if the port contains a remote interface attachment,
the remote interface is first un-plugged and then the port
is deleted.
-
+
:returns: a mapping sequence with the following signature:
- {'port-id': uuid representing the deleted port on specified quantum network
+ {'port-id': uuid representing the deleted port
+ on specified quantum network
}
:raises: exception.PortInUse
:raises: exception.PortNotFound
"""
This method allows the user to retrieve a remote interface
that is attached to this particular port.
-
+
:returns: a mapping sequence with the following signature:
- {'port-id': uuid representing the port on specified quantum network
- 'net-id': uuid representing the particular quantum network
- 'attachment': uuid of the virtual interface bound to the port, None otherwise
+ {'port-id': uuid representing the port on
+ specified quantum network
+ 'net-id': uuid representing the particular
+ quantum network
+ 'attachment': uuid of the virtual interface
+ bound to the port, None otherwise
}
:raises: exception.PortNotFound
:raises: exception.NetworkNotFound
"""
Attaches a remote interface to the specified port on the
specified Virtual Network.
-
+
:returns: None
:raises: exception.NetworkNotFound
:raises: exception.PortNotFound
- :raises: exception.AlreadyAttached (? should the network automatically unplug/replug)
+ :raises: exception.AlreadyAttached
+ (? should the network automatically unplug/replug)
"""
pass
"""
Detaches a remote interface from the specified port on the
specified Virtual Network.
-
+
:returns: None
:raises: exception.NetworkNotFound
:raises: exception.PortNotFound
"""
pass
-
@classmethod
def __subclasshook__(cls, klass):
"""