global dcs
- def get(self, dc_label):
+ def get(self, dc_label=None):
logging.debug("API CALL: compute list")
try:
- if dc_label == 'None':
+ if dc_label is None:
# return list with all compute nodes in all DCs
all_containers = []
for dc in dcs.itervalues():
:param match: OpenFlow match format of the flow entry
:param bidirectional: boolean value if the link needs to be implemented from src to dst and back
:param cookie: cookie value, identifier of the flow entry to be installed.
+ :param priority: integer indicating the priority of the flow entry
:return: message string indicating if the chain action is succesful or not
"""
self.api = Api(self.app)
# setup endpoints
- self.api.add_resource(ComputeList, "/restapi/compute/<dc_label>")
+ self.api.add_resource(ComputeList,
+ "/restapi/compute",
+ "/restapi/compute/<dc_label>")
self.api.add_resource(ComputeStart, "/restapi/compute/<dc_label>/<compute_name>/start")
self.api.add_resource(ComputeStop, "/restapi/compute/<dc_label>/<compute_name>/stop")
self.api.add_resource(ComputeStatus, "/restapi/compute/<dc_label>/<compute_name>")