Commit c545cb6e authored by Spiros Koulouzis's avatar Spiros Koulouzis

added docker Orchestrator requirement

parent b11f9e1e
description: TOSCA example
imports:
- nodes: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/nodes.yaml
- data: https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/TOSCA/types/data.yml
- capabilities: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/capabilities.yaml
- policies: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/policies.yaml
- interfaces: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/interfaces.yml
- nodes: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/nodes.yaml
- data: https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/TOSCA/types/data.yml
- capabilities: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/capabilities.yaml
- policies: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/policies.yaml
- interfaces: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/interfaces.yml
topology_template:
node_templates:
compute:
......
......@@ -141,8 +141,8 @@ topology_template:
type: "tosca.policies.ARTICONF.FaultTolerance"
description: "TOSCA example"
imports:
- nodes: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/nodes.yaml"
- data: "https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/TOSCA/types/data.yml"
- capabilities: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/capabilities.yaml"
- policies: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/policies.yaml"
- interfaces: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/interfaces.yml"
- nodes: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/nodes.yaml
- data: https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/TOSCA/types/data.yml
- capabilities: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/capabilities.yaml
- policies: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/policies.yaml
- interfaces: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/interfaces.yml
......@@ -157,8 +157,8 @@ topology_template:
type: "tosca.policies.ARTICONF.FaultTolerance"
description: "TOSCA example"
imports:
- nodes: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/nodes.yaml"
- data: "https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/TOSCA/types/data.yml"
- capabilities: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/capabilities.yaml"
- policies: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/policies.yaml"
- interfaces: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/interfaces.yml"
- nodes: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/nodes.yaml
- data: https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/TOSCA/types/data.yml
- capabilities: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/capabilities.yaml
- policies: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/policies.yaml
- interfaces: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/interfaces.yml
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- nodes: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/nodes.yaml
- nodes: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/nodes.yaml
- data: https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/TOSCA/types/data.yml
- capabilities: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/capabilities.yaml
- policies: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/policies.yaml
- interfaces: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/interfaces.yml
- capabilities: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/capabilities.yaml
- policies: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/policies.yaml
- interfaces: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/interfaces.yml
repositories:
docker_hub: https://hub.docker.com/
......
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- nodes: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/nodes.yaml
- nodes: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/nodes.yaml
- data: https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/TOSCA/types/data.yml
- capabilities: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/capabilities.yaml
- policies: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/policies.yaml
- interfaces: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/interfaces.yml
- capabilities: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/capabilities.yaml
- policies: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/policies.yaml
- interfaces: https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/interfaces.yml
repositories:
docker_hub: https://hub.docker.com/
......@@ -35,3 +35,9 @@ topology_template:
properties:
accepted_providers:
- ExoGENI
- docker_orchestrator:
type: tosca.policies.ARTICONF.Requirement.docker.Orchestrator
targets: [ ws-pema-lifewatch ]
properties:
accepted_orchestrator_types:
- tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes
......@@ -31,11 +31,11 @@ node_types:
required: false
requirements:
- host:
capability: tosca.capabilities.ARTICONF.Orchestrator
node: tosca.nodes.ARTICONF.Orchestrator
capability: tosca.capabilities.ARTICONF.docker.Orchestrator
node: tosca.nodes.ARTICONF.docker.Orchestrator
relationship: tosca.relationships.HostedOn
tosca.nodes.ARTICONF.Orchestrator:
tosca.nodes.ARTICONF.docker.Orchestrator:
derived_from: tosca.nodes.ARTICONF.Root
description: a container orchestrator
requirements:
......@@ -45,7 +45,7 @@ node_types:
relationship: tosca.relationships.HostedOn
capabilities:
orchestrator:
type: tosca.capabilities.ARTICONF.Orchestrator
type: tosca.capabilities.ARTICONF.docker.Orchestrator
host:
type: tosca.capabilities.Container.Docker
container:
......@@ -65,8 +65,8 @@ node_types:
- greater_or_equal: 1
tosca.nodes.ARTICONF.Orchestrator.Kubernetes:
derived_from: tosca.nodes.ARTICONF.Orchestrator
tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes:
derived_from: tosca.nodes.ARTICONF.docker.Orchestrator
description: Kubernetes orchestrator
attributes:
tokens:
......@@ -93,12 +93,12 @@ node_types:
playbook: https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/ansible_playbooks/dashboard.yaml
#tosca.nodes.ARTICONF.Orchestrator.Swarm:
#derived_from: tosca.nodes.ARTICONF.Orchestrator
#description: swarm orchestrator
#interfaces:
#Standard:
#create: interfaces/playbooks/docker_swarm_install.yaml
tosca.nodes.ARTICONF.docker.Orchestrator.Swarm:
derived_from: tosca.nodes.ARTICONF.docker.Orchestrator
description: swarm orchestrator
interfaces:
Standard:
create: interfaces/playbooks/docker_swarm_install.yaml
tosca.nodes.ARTICONF.VM.topology:
derived_from: tosca.nodes.ARTICONF.Infrastructure
......
......@@ -41,12 +41,22 @@ policy_types:
description: the minimum acceptable value
tosca.policies.ARTICONF.Placement.Requirement.Provider:
derived_from: tosca.policies.Placement
description: defines cloud providr where vm topology can be deployed
tosca.policies.ARTICONF.Requirement.Provider:
derived_from: tosca.policies.Root
description: defines cloud provider where vm topology can be deployed
properties:
accepted_providers:
type: list
description: list of the acceptable providers
schema_entry:
type: string
tosca.policies.ARTICONF.Requirement.docker.Orchestrator:
derived_from: tosca.policies.Root
description: defines type of docker.Orchestrator
properties:
accepted_orchestrator_types:
type: list
description: list of the acceptable orchestrator types e.g. tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes
schema_entry:
type: string
......@@ -52,9 +52,7 @@ class MyTestCase(unittest.TestCase):
# print("Output message:" + json.dumps(response))
# self.assertEqual(True, True)
def test_planner2(self):
def test_planner_policies(self):
logger = logging.getLogger(__name__)
input_tosca_file_path = get_tosca_files_path('lifeWatch_vre1.yaml')
......@@ -70,12 +68,13 @@ class MyTestCase(unittest.TestCase):
template_dict = tosca_helper.get_tosca_template_2_topology_template_dictionary(test_tosca_template)
logger.info("template ----: \n" + yaml.dump(template_dict))
ToscaTemplate(yaml_dict_tpl=copy.deepcopy(template_dict))
print(yaml.dump(template_dict))
test_response = {'toscaTemplate': template_dict}
response = {'toscaTemplate': template_dict}
output_current_milli_time = int(round(time.time() * 1000))
response["creationDate"] = output_current_milli_time
response["parameters"] = []
print("Output message:" + json.dumps(response))
# print("Output message:" + json.dumps(response))
self.assertEqual(True, True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment