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

change some attributes back to properties

parent fcc5dfab
......@@ -50,14 +50,14 @@ node_types:
type: tosca.capabilities.Container.Docker
container:
type: tosca.capabilities.Container
attributes:
masters_num:
properties:
min_masters_num:
type: integer
required: true
default: 1
constraints:
- greater_or_equal: 1
workers_num:
min_workers_num:
type: integer
required: true
default: 1
......@@ -102,20 +102,20 @@ node_types:
type: string
required: false
description: The subnet of the VMs this topology e.g. 192.168.10.10/24
attributes:
domain:
type: string
required: true
default: "UvA (Amsterdam, The Netherlands) XO Rack"
description: the domain of this topology e.g. California, UvA, etc
credential:
type: tosca.datatypes.Credential
required: false
description: the domain of this topology e.g. California, UvA, etc
provider:
type: string
required: true
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:
Standard:
create: dumy.yaml
......
#!/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 ../
......
......@@ -2,12 +2,13 @@
<project version="4">
<component name="ChangeListManager">
<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$/../drip-manager/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../build.sh" beforeDir="false" afterPath="$PROJECT_DIR$/../build.sh" 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$/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$/../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>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
......@@ -200,4 +201,25 @@
<MESSAGE value="added matplotlib" />
<option name="LAST_COMMIT_MESSAGE" value="added matplotlib" />
</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>
\ No newline at end of file
......@@ -3,5 +3,4 @@ names==0.3.0
networkx==2.4
pyyaml==5.1.2
tosca-parser ==1.6.1
matplotlib==3.0.3
networkx==2.4
\ No newline at end of file
matplotlib==3.0.3
\ No newline at end of file
......@@ -23,14 +23,12 @@ class SimpleAnalyzer(SpecificationAnalyzer):
self.tosca_template.nodetemplates, self.all_node_types,
self.all_custom_def)
if 'properties' in orchestrator_nodes[0].entity_tpl:
if 'masters_num' in orchestrator_nodes[0].entity_tpl['properties']:
masters_num = orchestrator_nodes[0].entity_tpl['properties']['masters_num']
if 'workers_num' in orchestrator_nodes[0].entity_tpl['properties']:
workers_num = orchestrator_nodes[0].entity_tpl['properties']['workers_num']
else:
masters_num = orchestrator_nodes[0].get_property_value('masters_num')
workers_num = orchestrator_nodes[0].get_property_value('workers_num')
orchestrator_nodes[0].type_definition
if 'attributes' in orchestrator_nodes[0].entity_tpl:
if 'masters_num' in orchestrator_nodes[0].entity_tpl['attributes']:
masters_num = orchestrator_nodes[0].entity_tpl['attributes']['masters_num']
if 'workers_num' in orchestrator_nodes[0].entity_tpl['attributes']:
workers_num = orchestrator_nodes[0].entity_tpl['attributes']['workers_num']
topology_nodes = tosca_helper.get_nodes_by_type('tosca.nodes.ARTICONF.VM.topology',
self.tosca_template.nodetemplates, self.all_node_types,
......
......@@ -12,16 +12,18 @@ pipeline {
steps {
echo 'Building'
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 ../"
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') {
steps {
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') {
......
......@@ -2,5 +2,4 @@ flask-testing==0.7.1
coverage==4.5.4
nose>=1.3.7
pluggy>=0.13.0
#py>=1.4.31
randomize>=0.14
#!/bin/bash
mvn test
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