diff options
author | Fu Jinhua <fu.jinhua@zte.com.cn> | 2018-10-16 02:25:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-10-16 02:25:58 +0000 |
commit | 964af2c8ae89a39a245463d27f4f69772b49b5bc (patch) | |
tree | 545fae15d4c2179796f8ee4ca1d153939a668917 | |
parent | a816f74d797cfe8118c122d4f1b053c864dcf0ac (diff) | |
parent | be0a294e955b64328a38ce06f3d5a169b910ba05 (diff) |
Merge "add VNF,VL,PNF task"
-rw-r--r-- | lcm/ns_pnfs/__init__.py | 18 | ||||
-rw-r--r-- | lcm/ns_vls/__init__.py | 18 | ||||
-rw-r--r-- | lcm/ns_vnfs/__init__.py | 18 |
3 files changed, 54 insertions, 0 deletions
diff --git a/lcm/ns_pnfs/__init__.py b/lcm/ns_pnfs/__init__.py index 342c2a8c..2c3379b3 100644 --- a/lcm/ns_pnfs/__init__.py +++ b/lcm/ns_pnfs/__init__.py @@ -11,3 +11,21 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from lcm.workflows.graphflow.task.lcm_sync_rest_task import LcmSyncRestTask + + +class CreatePnf(LcmSyncRestTask): + def __init__(self, *args): + super(CreatePnf, self).__init__(*args) + self.url = "/api/nslcm/v1/pnfs" + self.method = self.POST + self.timeout = 10 + + +class DeletePnf(LcmSyncRestTask): + def __init__(self, *args): + super(DeletePnf, self).__init__(*args) + self.url = "/api/nslcm/v1/pnfs/%s" + self.method = self.DELETE + self.timeout = 10 diff --git a/lcm/ns_vls/__init__.py b/lcm/ns_vls/__init__.py index 5580cc3d..7200ef77 100644 --- a/lcm/ns_vls/__init__.py +++ b/lcm/ns_vls/__init__.py @@ -11,3 +11,21 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from lcm.workflows.graphflow.task.lcm_sync_rest_task import LcmSyncRestTask + + +class CreateVl(LcmSyncRestTask): + def __init__(self, *args): + super(CreateVl, self).__init__(*args) + self.url = "/api/nslcm/v1/ns/vls" + self.method = self.POST + self.timeout = 10 + + +class DeleteVl(LcmSyncRestTask): + def __init__(self, *args): + super(DeleteVl, self).__init__(*args) + self.url = "/api/nslcm/v1/ns/vls/%s" + self.method = self.DELETE + self.timeout = 10 diff --git a/lcm/ns_vnfs/__init__.py b/lcm/ns_vnfs/__init__.py index 5580cc3d..51598b7b 100644 --- a/lcm/ns_vnfs/__init__.py +++ b/lcm/ns_vnfs/__init__.py @@ -11,3 +11,21 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from lcm.workflows.graphflow.task.lcm_async_rest_task import LcmASyncRestTask + + +class CreateVnf(LcmASyncRestTask): + def __init__(self, *args): + super(CreateVnf, self).__init__(*args) + self.url = "/api/nslcm/v1/ns/vnfs" + self.method = self.POST + self.timeout = 10 + + +class DeleteVnf(LcmASyncRestTask): + def __init__(self, *args): + super(DeleteVnf, self).__init__(*args) + self.url = "/api/nslcm/v1/ns/vnfs/%s" + self.method = self.DELETE + self.timeout = 10 |