예제 #1
0
    def post(self, ws_id, catalogue_id):
        """Create a new Service

        Publishes a new Service in the catalogue"""

        vnf_data = get_json(request)
        service = catalogue_servicesimpl.create_in_catalogue(catalogue_id, vnf_data['id'], False)
        return prepare_response(service)
    def post(self, ws_id, catalogue_id):
        """Creates a new function

        Creates a new function in the project or catalogue"""

        vnf_data = get_json(request)
        vnf_data = catalogue_servicesimpl.create_in_catalogue(catalogue_id, vnf_data['id'],
                                                              True)
        return prepare_response(vnf_data, 201)
예제 #3
0
    def post(self, ws_id, catalogue_id):
        """Creates a new function

        Creates a new function in the project or catalogue"""

        vnf_data = get_json(request)
        vnf_data = catalogue_servicesimpl.create_in_catalogue(
            catalogue_id, vnf_data['id'], True)
        return prepare_response(vnf_data, 201)
    def post(self, ws_id, parent_id):
        """Creates a new function

        Creates a new function in the project or catalogue"""
        if get_parent(request) is Category.project:
            vnf_data = get_json(request)
            vnf_data = functionsimpl.create_function(ws_id, parent_id, vnf_data)
            return prepare_response(vnf_data, 201)
        if get_parent(request) is Category.catalogue:
            vnf_data = get_json(request)
            vnf_data = catalogue_servicesimpl.create_in_catalogue(parent_id, vnf_data['id'],
                                                                  True)
            return prepare_response(vnf_data, 201)
        # TODO implement for catalog and platform
        return prepare_response("not implemented yet")
    def post(self, ws_id, parent_id):
        """Create a new Service

        Creates a new Service in this project or
        publishes it in the catalogue or platform"""
        if get_parent(request) is Category.project:
            service = servicesimpl.create_service(ws_id, parent_id, get_json(request))
            return prepare_response(service, 201)
        elif get_parent(request) is Category.platform:
            result = platform_connector.create_service_on_platform(ws_id, parent_id, get_json(request))
            return prepare_response(result, 201)
        if get_parent(request) is Category.catalogue:
            vnf_data = get_json(request)
            service = catalogue_servicesimpl.create_in_catalogue(parent_id, vnf_data['id'], False)
            return prepare_response(service)
        return prepare_response("not yet implemented")
예제 #6
0
    def post(self, ws_id, parent_id):
        """Creates a new function

        Creates a new function in the project or catalogue"""
        if get_parent(request) is Category.project:
            vnf_data = get_json(request)
            vnf_data = functionsimpl.create_function(ws_id, parent_id,
                                                     vnf_data)
            return prepare_response(vnf_data, 201)
        if get_parent(request) is Category.catalogue:
            vnf_data = get_json(request)
            vnf_data = catalogue_servicesimpl.create_in_catalogue(
                parent_id, vnf_data['id'], True)
            return prepare_response(vnf_data, 201)
        # TODO implement for catalog and platform
        return prepare_response("not implemented yet")
    def post(self, ws_id, parent_id):
        """Create a new Service

        Creates a new Service in this project or
        publishes it in the catalogue or platform"""
        if get_parent(request) is Category.project:
            service = servicesimpl.create_service(ws_id, parent_id,
                                                  get_json(request))
            return prepare_response(service, 201)
        elif get_parent(request) is Category.platform:
            result = platform_connector.create_service_on_platform(
                ws_id, parent_id, get_json(request))
            return prepare_response(result, 201)
        if get_parent(request) is Category.catalogue:
            vnf_data = get_json(request)
            service = catalogue_servicesimpl.create_in_catalogue(
                parent_id, vnf_data['id'], False)
            return prepare_response(service)
        return prepare_response("not yet implemented")