Separating tosca driver out from VNFM

This patch is expected to have the separation of tosca driver
in the future.

Implements blueprint: #tosca-engine

Change-Id: Ieab0964f9a5936611a9b2288f2d6d44a42a725de
This commit is contained in:
doantungbk 2017-03-28 10:49:23 -07:00
parent 8d6d76ff98
commit 72d7af1d6a
15 changed files with 24 additions and 20 deletions

View File

@ -6,8 +6,8 @@
"template": { "template": {
"vnffgd": { "vnffgd": {
"imports": [ "imports": [
"/opt/stack/tacker/tacker/vnfm/tosca/lib/tacker_defs.yaml", "/opt/stack/tacker/tacker/tosca/lib/tacker_defs.yaml",
"/opt/stack/tacker/tacker/vnfm/tosca/lib/tacker_nfv_defs.yaml" "/opt/stack/tacker/tacker/tosca/lib/tacker_nfv_defs.yaml"
], ],
"description": "Sample VNFFG template", "description": "Sample VNFFG template",
"topology_template": { "topology_template": {

View File

@ -8,8 +8,8 @@
"vnffgd": { "vnffgd": {
"tosca_definitions_version": "tosca_simple_profile_for_nfv_1_0_0", "tosca_definitions_version": "tosca_simple_profile_for_nfv_1_0_0",
"imports": [ "imports": [
"/opt/stack/tacker/tacker/vnfm/tosca/lib/tacker_defs.yaml", "/opt/stack/tacker/tacker/tosca/lib/tacker_defs.yaml",
"/opt/stack/tacker/tacker/vnfm/tosca/lib/tacker_nfv_defs.yaml" "/opt/stack/tacker/tacker/tosca/lib/tacker_nfv_defs.yaml"
], ],
"description": "Sample VNFFG template", "description": "Sample VNFFG template",
"topology_template": { "topology_template": {

View File

@ -7,8 +7,8 @@
"vnffgd": { "vnffgd": {
"tosca_definitions_version": "tosca_simple_profile_for_nfv_1_0_0", "tosca_definitions_version": "tosca_simple_profile_for_nfv_1_0_0",
"imports": [ "imports": [
"/opt/stack/tacker/tacker/vnfm/tosca/lib/tacker_defs.yaml", "/opt/stack/tacker/tacker/tosca/lib/tacker_defs.yaml",
"/opt/stack/tacker/tacker/vnfm/tosca/lib/tacker_nfv_defs.yaml" "/opt/stack/tacker/tacker/tosca/lib/tacker_nfv_defs.yaml"
], ],
"description": "Sample VNFFG template", "description": "Sample VNFFG template",
"topology_template": { "topology_template": {

View File

@ -64,7 +64,7 @@ through a set of VNFs.
(traffic match policy to flow through the path), and path (chain of (traffic match policy to flow through the path), and path (chain of
VNFs/Connection Points). A complete list of VNFFG properties currently VNFs/Connection Points). A complete list of VNFFG properties currently
supported by Tacker are listed `here <https://github supported by Tacker are listed `here <https://github
.com/openstack/tacker/blob/master/tacker/vnfm/ .com/openstack/tacker/blob/master/tacker/
tosca/lib/tacker_nfv_defs.yaml>`_ under **properties** section of tosca/lib/tacker_nfv_defs.yaml>`_ under **properties** section of
**tosca.nodes.nfv.FP.Tacker** field. **tosca.nodes.nfv.FP.Tacker** field.
@ -106,7 +106,7 @@ Policy defines the type of match policy that will be used to distinguish
which traffic should enter this Forwarding Path. The only currently which traffic should enter this Forwarding Path. The only currently
supported type is ACL (access-list). supported type is ACL (access-list).
Please reference `tosca.nfv.datatypes.aclType Please reference `tosca.nfv.datatypes.aclType
<https://github.com/openstack/tacker/blob/master/tacker/vnfm/tosca/lib/ <https://github.com/openstack/tacker/blob/master/tacker/tosca/lib/
tacker_nfv_defs.yaml>`_ under **properties** section for more information on tacker_nfv_defs.yaml>`_ under **properties** section for more information on
supported match criteria. supported match criteria.

View File

@ -43,10 +43,10 @@ from tacker.extensions import common_services as cs
from tacker.extensions import nfvo from tacker.extensions import nfvo
from tacker import manager from tacker import manager
from tacker.plugins.common import constants from tacker.plugins.common import constants
from tacker.vnfm.tosca import utils as toscautils
from tacker.vnfm import vim_client from tacker.vnfm import vim_client
from toscaparser import tosca_template
from tacker.tosca import utils as toscautils
from toscaparser import tosca_template
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -20,7 +20,7 @@ from tacker.plugins.common import constants as evt_constants
from tacker.tests import constants from tacker.tests import constants
from tacker.tests.functional import base from tacker.tests.functional import base
from tacker.tests.utils import read_file from tacker.tests.utils import read_file
from tacker.vnfm.tosca import utils as toscautils from tacker.tosca import utils as toscautils
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -11,17 +11,19 @@
# under the License. # under the License.
import os import os
from oslo_config import cfg from oslo_config import cfg
from toscaparser import tosca_template from toscaparser import tosca_template
import unittest import unittest
import yaml import yaml
from tacker.common import utils from tacker.common import utils
from tacker.plugins.common import constants as evt_constants from tacker.plugins.common import constants as evt_constants
from tacker.tests import constants from tacker.tests import constants
from tacker.tests.functional import base from tacker.tests.functional import base
from tacker.tests.utils import read_file from tacker.tests.utils import read_file
from tacker.vnfm.tosca import utils as toscautils from tacker.tosca import utils as toscautils
CONF = cfg.CONF CONF = cfg.CONF
SOFTWARE_DEPLOYMENT = 'OS::Heat::SoftwareDeployment' SOFTWARE_DEPLOYMENT = 'OS::Heat::SoftwareDeployment'

View File

@ -13,14 +13,14 @@
# under the License. # under the License.
import os import os
import testtools
import testtools
from toscaparser import tosca_template from toscaparser import tosca_template
from toscaparser.utils import yamlparser from toscaparser.utils import yamlparser
from tacker.vnfm.tosca import utils
from translator.hot import tosca_translator from translator.hot import tosca_translator
from tacker.tosca import utils
class TestSamples(testtools.TestCase): class TestSamples(testtools.TestCase):
"""Sample tosca validation. """Sample tosca validation.

View File

@ -13,10 +13,11 @@
import codecs import codecs
import os import os
import testtools import testtools
import yaml import yaml
from tacker.vnfm.tosca import utils as toscautils from tacker.tosca import utils as toscautils
from toscaparser import tosca_template from toscaparser import tosca_template
from translator.hot import tosca_translator from translator.hot import tosca_translator
@ -41,7 +42,7 @@ class TestToscaUtils(testtools.TestCase):
super(TestToscaUtils, self).setUp() super(TestToscaUtils, self).setUp()
def test_updateimport(self): def test_updateimport(self):
importspath = os.path.abspath('./tacker/vnfm/tosca/lib/') importspath = os.path.abspath('./tacker/tosca/lib/')
file1 = importspath + '/tacker_defs.yaml' file1 = importspath + '/tacker_defs.yaml'
file2 = importspath + '/tacker_nfv_defs.yaml' file2 = importspath + '/tacker_nfv_defs.yaml'
expected_imports = [file1, file2] expected_imports = [file1, file2]

View File

@ -9,6 +9,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import copy import copy
from oslo_config import cfg from oslo_config import cfg
@ -23,11 +24,10 @@ import yaml
from tacker.common import log from tacker.common import log
from tacker.extensions import common_services as cs from tacker.extensions import common_services as cs
from tacker.extensions import vnfm from tacker.extensions import vnfm
from tacker.vnfm.tosca import utils as toscautils from tacker.tosca import utils as toscautils
from collections import OrderedDict from collections import OrderedDict
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -34,9 +34,10 @@ from tacker.extensions import vnfm
from tacker.plugins.common import constants from tacker.plugins.common import constants
from tacker.vnfm.mgmt_drivers import constants as mgmt_constants from tacker.vnfm.mgmt_drivers import constants as mgmt_constants
from tacker.vnfm import monitor from tacker.vnfm import monitor
from tacker.vnfm.tosca import utils as toscautils
from tacker.vnfm import vim_client from tacker.vnfm import vim_client
from tacker.tosca import utils as toscautils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
CONF = cfg.CONF CONF = cfg.CONF