Commit 5b6644ae authored by Spiros Koulouzis's avatar Spiros Koulouzis

change some attributes back to properties

parent fcc5dfab
...@@ -50,14 +50,14 @@ node_types: ...@@ -50,14 +50,14 @@ node_types:
type: tosca.capabilities.Container.Docker type: tosca.capabilities.Container.Docker
container: container:
type: tosca.capabilities.Container type: tosca.capabilities.Container
attributes: properties:
masters_num: min_masters_num:
type: integer type: integer
required: true required: true
default: 1 default: 1
constraints: constraints:
- greater_or_equal: 1 - greater_or_equal: 1
workers_num: min_workers_num:
type: integer type: integer
required: true required: true
default: 1 default: 1
...@@ -102,20 +102,20 @@ node_types: ...@@ -102,20 +102,20 @@ node_types:
type: string type: string
required: false required: false
description: The subnet of the VMs this topology e.g. 192.168.10.10/24 description: The subnet of the VMs this topology e.g. 192.168.10.10/24
attributes:
domain: domain:
type: string type: string
required: true required: true
default: "UvA (Amsterdam, The Netherlands) XO Rack" default: "UvA (Amsterdam, The Netherlands) XO Rack"
description: the domain of this topology e.g. California, UvA, etc description: the domain of this topology e.g. California, UvA, etc
credential:
type: tosca.datatypes.Credential
required: false
provider: provider:
type: string type: string
required: true required: true
default: "ExoGeni" default: "ExoGeni"
description: The name of the provider e.g. EC2, ExoGeni etc. description: The name of the provider e.g. EC2, ExoGeni etc.
attributes:
credential:
type: tosca.datatypes.Credential
required: false
interfaces: interfaces:
Standard: Standard:
create: dumy.yaml create: dumy.yaml
......
#!/bin/bash #!/bin/bash
mvn clean install mvn -Dmaven.test.skip=true install
cd drip-planner && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt cd drip-planner && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt
cd ../ cd ../
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e478ccae-5352-4e8e-9efb-3f5cda44e877" name="Default Changelist" comment="added matplotlib"> <list default="true" id="e478ccae-5352-4e8e-9efb-3f5cda44e877" name="Default Changelist" comment="added matplotlib">
<change beforePath="$PROJECT_DIR$/../.jenkins_pipeline.kate-swp" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/../build.sh" beforeDir="false" afterPath="$PROJECT_DIR$/../build.sh" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/requirements.txt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/requirements.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/service/simple_spec_alayzer.py" beforeDir="false" afterPath="$PROJECT_DIR$/service/simple_spec_alayzer.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../jenkins_pipeline" beforeDir="false" afterPath="$PROJECT_DIR$/../jenkins_pipeline" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../jenkins_pipeline" beforeDir="false" afterPath="$PROJECT_DIR$/../jenkins_pipeline" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../sure_tosca-flask-server/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/../sure_tosca-flask-server/requirements.txt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../sure_tosca-flask-server/test-requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/../sure_tosca-flask-server/test-requirements.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../test.sh" beforeDir="false" afterPath="$PROJECT_DIR$/../test.sh" afterDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -200,4 +201,25 @@ ...@@ -200,4 +201,25 @@
<MESSAGE value="added matplotlib" /> <MESSAGE value="added matplotlib" />
<option name="LAST_COMMIT_MESSAGE" value="added matplotlib" /> <option name="LAST_COMMIT_MESSAGE" value="added matplotlib" />
</component> </component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/service/simple_spec_alayzer.py</url>
<line>45</line>
<option name="timeStamp" value="1" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/planner/planner.py</url>
<line>36</line>
<option name="timeStamp" value="3" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/service/simple_spec_alayzer.py</url>
<line>26</line>
<option name="timeStamp" value="5" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
</project> </project>
\ No newline at end of file
...@@ -4,4 +4,3 @@ networkx==2.4 ...@@ -4,4 +4,3 @@ networkx==2.4
pyyaml==5.1.2 pyyaml==5.1.2
tosca-parser ==1.6.1 tosca-parser ==1.6.1
matplotlib==3.0.3 matplotlib==3.0.3
networkx==2.4
\ No newline at end of file
...@@ -23,14 +23,12 @@ class SimpleAnalyzer(SpecificationAnalyzer): ...@@ -23,14 +23,12 @@ class SimpleAnalyzer(SpecificationAnalyzer):
self.tosca_template.nodetemplates, self.all_node_types, self.tosca_template.nodetemplates, self.all_node_types,
self.all_custom_def) self.all_custom_def)
if 'properties' in orchestrator_nodes[0].entity_tpl: orchestrator_nodes[0].type_definition
if 'masters_num' in orchestrator_nodes[0].entity_tpl['properties']: if 'attributes' in orchestrator_nodes[0].entity_tpl:
masters_num = orchestrator_nodes[0].entity_tpl['properties']['masters_num'] if 'masters_num' in orchestrator_nodes[0].entity_tpl['attributes']:
if 'workers_num' in orchestrator_nodes[0].entity_tpl['properties']: masters_num = orchestrator_nodes[0].entity_tpl['attributes']['masters_num']
workers_num = orchestrator_nodes[0].entity_tpl['properties']['workers_num'] if 'workers_num' in orchestrator_nodes[0].entity_tpl['attributes']:
else: workers_num = orchestrator_nodes[0].entity_tpl['attributes']['workers_num']
masters_num = orchestrator_nodes[0].get_property_value('masters_num')
workers_num = orchestrator_nodes[0].get_property_value('workers_num')
topology_nodes = tosca_helper.get_nodes_by_type('tosca.nodes.ARTICONF.VM.topology', topology_nodes = tosca_helper.get_nodes_by_type('tosca.nodes.ARTICONF.VM.topology',
self.tosca_template.nodetemplates, self.all_node_types, self.tosca_template.nodetemplates, self.all_node_types,
......
...@@ -12,16 +12,18 @@ pipeline { ...@@ -12,16 +12,18 @@ pipeline {
steps { steps {
echo 'Building' echo 'Building'
git branch: 'DRIP_3.0', url: 'https://github.com/skoulouzis/DRIP.git' git branch: 'DRIP_3.0', url: 'https://github.com/skoulouzis/DRIP.git'
sh "mvn clean install" sh "mvn -Dmaven.test.skip=true install"
sh "cd drip-planner && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt" sh "cd drip-planner && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt"
sh "cd ../" sh "cd ../"
sh "cd sure_tosca-flask-server && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt" sh "cd sure_tosca-flask-server && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt && venv/bin/pip3 install -r test-requirements.txt"
sh "pwd && ls"
} }
} }
stage('Test') { stage('Test') {
steps { steps {
echo 'Testing' echo 'Testing'
sh "cd drip-planner && python3 -m unittest test/test_planner.py" sh "mvn test"
sh "cd drip-planner && venv/bin/python3 -m unittest test/test_planner.py"
} }
} }
stage('Deploy') { stage('Deploy') {
......
...@@ -2,5 +2,4 @@ flask-testing==0.7.1 ...@@ -2,5 +2,4 @@ flask-testing==0.7.1
coverage==4.5.4 coverage==4.5.4
nose>=1.3.7 nose>=1.3.7
pluggy>=0.13.0 pluggy>=0.13.0
#py>=1.4.31
randomize>=0.14 randomize>=0.14
#!/bin/bash #!/bin/bash
mvn test
cd drip-planner && python3 -m unittest test/test_planner.py cd drip-planner && python3 -m unittest test/test_planner.py
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