summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INFO.yaml93
-rw-r--r--docs/specs/multicloud_infra_workload.rst8
-rw-r--r--multivimbroker/multivimbroker/forwarder/urls.py8
-rw-r--r--multivimbroker/multivimbroker/forwarder/views.py18
-rw-r--r--multivimbroker/multivimbroker/swagger/multivim.server.swagger.json82
5 files changed, 203 insertions, 6 deletions
diff --git a/INFO.yaml b/INFO.yaml
new file mode 100644
index 0000000..9d2d635
--- /dev/null
+++ b/INFO.yaml
@@ -0,0 +1,93 @@
+---
+project: 'multicloud-framework'
+project_creation_date: '2017-02-21'
+project_category: ''
+lifecycle_state: 'Incubation'
+project_lead: &onap_multicloud_ptl
+ name: 'Bin Yang'
+ email: 'bin.yang@windriver.com'
+ company: 'Windriver'
+ id: 'biny993'
+ timezone: 'China/Beijing'
+primary_contact: *onap_multicloud_ptl
+issue_tracking:
+ type: 'jira'
+ url: 'https://jira.onap.org/projects/MULTICLOUD'
+ key: 'MULTICLOUD'
+mailing_list:
+ type: 'groups.io'
+ url: 'lists.onap.org'
+ tag: '<[sub-project_name]>'
+realtime_discussion: ''
+meetings:
+ - type: 'zoom'
+ agenda: 'https://wiki.onap.org/pages/viewpage.action?pageId=6591499'
+ url: 'https://wiki.onap.org/pages/viewpage.action?pageId=6591499'
+ server: 'n/a'
+ channel: 'n/a'
+ repeats: 'weekly'
+ time: '13:00 UTC'
+repositories:
+ - 'multicloud-framework'
+ - 'multicloud-openstack'
+ - 'multicloud-openstack-vmware'
+ - 'multicloud-openstack-windriver'
+ - 'multicloud-azure'
+ - 'multicloud-k8s'
+committers:
+ - <<: *onap_multicloud_ptl
+ - name: 'Anbing Zhang'
+ email: 'zhanganbing@chinamobile.com'
+ company: 'China Mobile'
+ id: 'zhangab'
+ timezone: ''
+ - name: 'Xinhui Li'
+ email: 'lxinhui@vmware.com'
+ id: 'xinhuili'
+ company: 'VMware'
+ timezone: 'China/Beijing'
+ - name: 'Bin Hu'
+ email: 'bh526r@att.com'
+ company: 'ATT'
+ id: 'bh526r'
+ timezone: 'America/Palo Alto'
+ - name: 'Liang Ke'
+ email: 'lokyse@163.com'
+ company: 'VMWare'
+ id: 'liangke'
+ timezone: 'China/Beijing'
+ - name: 'yun huang'
+ email: 'yun.huang@windriver.com'
+ company: 'Windriver'
+ id: 'cloudhuang'
+ timezone: ''
+ - name: 'Victor Morales'
+ email: 'victor.morales@intel.com'
+ company: 'Intel'
+ id: 'electrocucaracha'
+ timezone: ''
+ - name: 'Ethan Lynn'
+ email: 'ethanlynnl@vmware.com'
+ company: 'VMWare'
+ id: 'ethanlynnl'
+ timezone: ''
+ - name: 'Huang Haibin'
+ email: 'haibin.huang@intel.com'
+ company: 'Intel'
+ id: 'haibin'
+ timezone: ''
+ - name: 'Sudhakar Reddy'
+ email: 'Sudhakar.Reddy@amdocs.com'
+ company: 'Amdocs'
+ id: 'SudhakarReddy'
+ timezone: ''
+tsc:
+ approval: 'https://lists.onap.org/pipermail/onap-tsc'
+ changes:
+ - type: 'Addition'
+ name: 'yun huang'
+ name: 'Victor Morales'
+ name: 'Ethan Lynn'
+ name: 'Huang Haibin'
+ name: 'Sudhakar Reddy'
+ link: 'http://ircbot.wl.linuxfoundation.org/meetings/onap-meeting/2018/onap-meeting.2018-08-16-13.45.html'
diff --git a/docs/specs/multicloud_infra_workload.rst b/docs/specs/multicloud_infra_workload.rst
index 71fd234..82bf9df 100644
--- a/docs/specs/multicloud_infra_workload.rst
+++ b/docs/specs/multicloud_infra_workload.rst
@@ -15,8 +15,8 @@ we have two purposes for this API:
Problem Description
===================
-Currently HPA flavors are returned by OOF  to SO and SO copies these flavors in
-the Heat template before sending the Heat template to Multicloud.  In Casablanca
+Currently HPA flavors are returned by OOF to SO and SO copies these flavors in
+the Heat template before sending the Heat template to Multicloud. In Casablanca
instead of SO making changes in the Heat template the flavor information will be
provided to Multicloud and Multicloud will pass these as parameters to HEAT
command line.
@@ -32,8 +32,6 @@ Add infrastructure workload API
API URL: http://{msb IP}:{msb port}/api/multicloud /v1/{cloud-owner}/{cloud-region-id}/infra_workload
Request Body:
-
-
::
{
@@ -84,6 +82,7 @@ oof_directives:
Heat examples
=============
+::
"template_type":"heat",
"template_data":{
@@ -132,4 +131,3 @@ Tests
#. Unit Tests with tox
#. CSIT Tests, the input/ouput of broker and each plugin see API design above.
-
diff --git a/multivimbroker/multivimbroker/forwarder/urls.py b/multivimbroker/multivimbroker/forwarder/urls.py
index 5e1320e..b14333f 100644
--- a/multivimbroker/multivimbroker/forwarder/urls.py
+++ b/multivimbroker/multivimbroker/forwarder/urls.py
@@ -16,6 +16,7 @@
from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
+# API v0
from multivimbroker.forwarder.views import CheckCapacity
from multivimbroker.forwarder.views import Extension
from multivimbroker.forwarder.views import Forward
@@ -34,8 +35,10 @@ from multivimbroker.forwarder.views import APIv1Registry
from multivimbroker.forwarder.views import APIv1UnRegistry
from multivimbroker.forwarder.views import APIv1VIMTypes
from multivimbroker.forwarder.views import APIv1MultiPartView
+from multivimbroker.forwarder.views import APIv1InfraWorkload
urlpatterns = [
+ # API v0
url(r'^api/multicloud/v0/vim_types$',
VIMTypes.as_view()),
url(r'^api/multicloud/v0/check_vim_capacity$',
@@ -69,7 +72,7 @@ urlpatterns = [
url(r'^api/multicloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)'
r'/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/registry$',
APIv1Registry.as_view()),
- url(r'^api/multicloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)i'
+ url(r'^api/multicloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)'
r'/(?P<cloud_region_id>[0-9a-zA-Z_-]+)$',
APIv1UnRegistry.as_view()),
url(r'^api/multicloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)'
@@ -81,6 +84,9 @@ urlpatterns = [
url(r'^api/multicloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)'
r'/(?P<cloud_region_id>[0-9a-zA-Z_-]+)',
APIv1Forward.as_view()),
+ url(r'^api/multicloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)'
+ r'/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/infra_workload',
+ APIv1InfraWorkload.as_view()),
]
urlpatterns = format_suffix_patterns(urlpatterns)
diff --git a/multivimbroker/multivimbroker/forwarder/views.py b/multivimbroker/multivimbroker/forwarder/views.py
index ef7ab95..264692e 100644
--- a/multivimbroker/multivimbroker/forwarder/views.py
+++ b/multivimbroker/multivimbroker/forwarder/views.py
@@ -307,3 +307,21 @@ class APIv1MultiPartView(MultiPartView):
vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
return super(APIv1MultiPartView, self).post(request, vimid)
+
+
+class APIv1InfraWorkload(BaseServer):
+
+ def post(self, request, cloud_owner, cloud_region_id):
+ vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
+ return self.send(vimid, request.get_full_path(), request.body, "POST",
+ headers=originHeaders(request))
+
+ def get(self, request, cloud_owner, cloud_region_id):
+ vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
+ return self.send(vimid, request.get_full_path(), request.body, "GET",
+ headers=originHeaders(request))
+
+ def delete(self, request, cloud_owner, cloud_region_id):
+ vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id)
+ return self.send(vimid, request.get_full_path(), request.body,
+ "DELETE", headers=originHeaders(request))
diff --git a/multivimbroker/multivimbroker/swagger/multivim.server.swagger.json b/multivimbroker/multivimbroker/swagger/multivim.server.swagger.json
index f54b481..7f949aa 100644
--- a/multivimbroker/multivimbroker/swagger/multivim.server.swagger.json
+++ b/multivimbroker/multivimbroker/swagger/multivim.server.swagger.json
@@ -231,6 +231,65 @@
}
}
}
+ },
+ "/{vimid}/{tenantid}/servers/{serverid}/action": {
+ "post": {
+ "tags": [
+ "vim servers action"
+ ],
+ "summary": "operate a server",
+ "description": "operate a server",
+ "operationId": "operate_vim_server",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "vimid",
+ "in": "path",
+ "description": "vim instance id",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "tenantid",
+ "in": "path",
+ "description": "tenant UUID",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "serverid",
+ "in": "path",
+ "description": "vim server id",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "body",
+ "name": "body",
+ "description": "operate vim server request param",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/OperateVimServer"
+ }
+ }
+ ],
+ "responses": {
+ "202": {
+ "description": "successful operation"
+ },
+ "404": {
+ "description": "the vim id, tenant UUID or server id is wrong"
+ },
+ "500": {
+ "description": "the vim server is not accessable"
+ }
+ }
+ }
}
},
"definitions": {
@@ -483,6 +542,29 @@
"description": "0: Already exist 1: Newly created"
}
}
+ },
+ "OperateVimServer": {
+ "type": "object",
+ "properties": {
+ "os-start": {
+ "type": "null",
+ "description": "the action to start a stopped server"
+ },
+ "os-stop": {
+ "type": "null",
+ "description": "the action to stop a running server"
+ },
+ "reboot": {
+ "type": "object",
+ "description": "The action to reboot a server",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "the type of the reboot action: the valid values are HARD and SOFT"
+ }
+ }
+ }
+ }
}
}
}