class Controller(object): def __init__(self, conf): LOG.debug("[NFVToplogy api] NFVToplogy Manager controller with config:" "loadkulclouds.py %s", conf) self.conf = conf self.create_schema = NFVTopology_schema() self.name = 'NFVTopologyMgr' @utils.verify_version def show(self, req, version, name): LOG.debug("[NFVTopology api] info request. Request: %s", req) result = core_api.show_nfvtopo(self.conf, version, name) return result @utils.verify_version def index(self, req, version): LOG.debug("[NFVTopology api] Show list of switches. Request: %s", req) result = core_api.index_nfvtopo(self.conf, version) return result @utils.http_success_code(202) @utils.verify_version_argument def create(self, req, version, body): LOG.debug("[NFVTopology api] Got create request. Request: %s", req) params = self.create_schema.deserialize(body) LOG.debug("Headers: %s", req.headers) result = core_api.create_nfvtopo(self.conf, version, body) return result @utils.http_success_code(202) @utils.verify_version def delete(self, req, version, name): LOG.debug("[NFVTopology api] Got delete request. Request: %s", req) result=core_api.delete_nfvtopo(self.conf, version,name) return result @utils.http_success_code(202) @utils.verify_version_argument def update(self, req, version, name, body): LOG.debug("[NFVTopologyapi] Got update request. Request: %s", req) params = self.create_schema.deserialize(body) result = core_api.update_nfvtopo(self.conf, version, name, params) return result def get_nfvtopology_sync(self, req, version): LOG.debug("[ServiceChain api] Makdi synchronization request. Request: %s", req) result = core_api.sync_nfvtopology(self.conf, version) return result
def __init__(self, conf): LOG.debug("[NFVToplogy api] NFVToplogy Manager controller with config:" "loadkulclouds.py %s", conf) self.conf = conf self.create_schema = NFVTopology_schema() self.name = 'NFVTopologyMgr'