"""JSON is common resource for simple json helper keywords.
"""
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
JSONKeywords(),
class Kafka(HybridCore):
""" Utilities useful for Kafka consuming and producing """
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
KafkaKeywords()
"""MUSIC is an ONAP testing library for Robot Framework that provides functionality for interacting with the music
component. """
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
MUSICKeywords()
"""OOF is an ONAP testing library for Robot Framework that provides functionality for interacting with the
optimiztion framework. """
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
SNIROKeywords()
"""SO is an ONAP testing library for Robot Framework that provides functionality for interacting with the serivce
orchestrator. """
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
BaseOpenstackKeywords(),
"""PreloadData is an ONAP testing library for Robot Framework that enables the use of a preload_data.json
to dynamically add preload data to a robot test suite with out changing robot code"""
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
PreloadDataKeywords()
class Protobuf(HybridCore):
""" Utilities useful for Protobuf manipulation """
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
ProtobufKeywords()
"""SDC is an ONAP testing library for Robot Framework that provides functionality for interacting with the serivce
orchestrator. """
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
BaseSDCKeywords()
"""SDNC is an ONAP testing library for Robot Framework that provides functionality for interacting with the network
controller. """
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
BaseSDNCKeywords(),
"""SO is an ONAP testing library for Robot Framework that provides functionality for interacting with the serivce
orchestrator. """
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
BaseSOKeywords(),
"""ServiceMapping is an ONAP testing library for Robot Framework that enables the use of a service_mapping.json
to dynamically add services to a robot test suite with out changing robot code"""
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
ServiceMappingKeywords()
templating engine
"""
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
TemplatingKeywords()
class Utilities(HybridCore):
""" Keywords are useful for helper functions requests """
+ ROBOT_LIBRARY_SCOPE = "GLOBAL"
+
def __init__(self):
self.keyword_implementors = [
DNSKeywords(),
--- /dev/null
+# Copyright 2019 AT&T Intellectual Property. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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 robot.api.deco import keyword
+import os.path
+from unittest import TestCase
+from ONAPLibrary.ServiceMappingKeywords import ServiceMappingKeywords
+
+
+class ServiceMappingKeywordsTests(TestCase):
+
+ @staticmethod
+ def _get_location():
+ path = os.path.realpath(
+ os.path.join(os.getcwd(), os.path.dirname(__file__)))
+ return path
+
+ @keyword
+ def test(self):
+ sm = ServiceMappingKeywords()
+ sm.set_directory("default", self._get_location())
+ self.assertEqual(['vFW'], sm.get_service_folder_mapping("default", "vFW"))
--- /dev/null
+{
+ "GLOBAL_SERVICE_FOLDER_MAPPING": {
+ "vFW" : ["vFW"]
+ },
+ "GLOBAL_SERVICE_VNF_MAPPING": {
+ "vFW" : ["vFW"]
+ },
+ "GLOBAL_SERVICE_GEN_NEUTRON_NETWORK_MAPPING": {
+ "vFW" :[]
+ },
+ "GLOBAL_SERVICE_DEPLOYMENT_ARTIFACT_MAPPING": {
+ "vFW" :[]
+ },
+ "GLOBAL_SERVICE_TEMPLATE_MAPPING": {
+ "vFW" : [{"isBase" : "true", "template" : "vfw_preload.template", "vnf_index": "0", "name_pattern": "base_vfw"}]
+ },
+ "GLOBAL_VALIDATE_NAME_MAPPING": {
+ "vFW" : "vfw_name_0"
+ }
+}
from tests.vcpeutils.SoUtils_test import SoUtilsTest
from tests.ONAPLibrary.ProtobufKeywordsTest import ProtobufKeywordsTest
from tests.ONAPLibrary.UUIDKeywordsTest import UUIDKeywordsTest
+from tests.ONAPLibrary.ServiceMappingKeywordsTests import ServiceMappingKeywordsTests
# initialize the test suite
loader = TestLoader()
suite.addTests(loader.loadTestsFromTestCase(ProtobufKeywordsTest))
suite.addTests(loader.loadTestsFromTestCase(SoUtilsTest))
suite.addTests(loader.loadTestsFromTestCase(UUIDKeywordsTest))
+suite.addTests(loader.loadTestsFromTestCase(ServiceMappingKeywordsTests))
# initialize a runner, pass it your suite and run it
runner = TextTestRunner(verbosity=3)