Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
b2b61ce3
Commit
b2b61ce3
authored
Feb 18, 2021
by
Alfonso Orta
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'staging'
Develop See merge request
!9
parents
bb0e67be
4f75266a
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
141 additions
and
43 deletions
+141
-43
output
bin/output
+104
-0
test.sh
bin/test.sh
+19
-13
requirements.txt
deployer/requirements.txt
+2
-1
ansible_service.cpython-38.pyc
deployer/service/__pycache__/ansible_service.cpython-38.pyc
+0
-0
requirements.txt
planner/requirements.txt
+2
-1
test-requirements.txt
planner/test-requirements.txt
+2
-1
test_planner.py
planner/test/test_planner.py
+8
-9
requirements.txt
sure_tosca-flask-server/requirements.txt
+2
-1
__init__.py
sure_tosca-flask-server/sure_tosca/test/__init__.py
+0
-16
test-requirements.txt
sure_tosca-flask-server/test-requirements.txt
+2
-1
No files found.
bin/output
0 → 100644
View file @
b2b61ce3
HTTP/1.1 200
Server: nginx/1.19.3
Date: Tue, 20 Oct 2020 10:57:17 GMT
Content-Type: text/plain;charset=UTF-8
Content-Length: 3008
Connection: keep-alive
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Allow-Origin: *
tosca_definitions_version: "tosca_simple_yaml_1_0"
topology_template:
node_templates:
compute:
properties:
disk_size: "40000 MB"
mem_size: "1000 MB"
num_cores: 1
os: "Ubuntu 18.04"
user_name: "vm_user"
interfaces:
Standard:
create: "dumy.yaml"
type: "tosca.nodes.QC.VM.Compute"
compute_1:
properties:
disk_size: "40000 MB"
mem_size: "1000 MB"
num_cores: 1
os: "Ubuntu 18.04"
user_name: "vm_user"
interfaces:
Standard:
create: "dumy.yaml"
type: "tosca.nodes.QC.VM.Compute"
gluster_fs:
requirements:
- host:
capability: "tosca.capabilities.QC.VM.topology"
node: "topology"
relationship: "tosca.relationships.HostedOn"
interfaces:
Standard:
create:
inputs:
repository: "https://github.com/bityoga/mysome_glusterfs.git"
resources:
- "001.requirements.yml"
- "002.setup_glusterfs_infra.yml"
- "003.setup_glusterfs_cluster.yml"
- "004.mount_glusterfs.yml"
type: "tosca.nodes.QC.Application.GlusterFS"
topology:
properties:
domain: "Ireland"
provider: "EC2"
requirements:
- vm:
capability: "tosca.capabilities.QC.VM"
node: "compute"
relationship: "tosca.relationships.DependsOn"
- vm:
capability: "tosca.capabilities.QC.VM"
node: "compute_1"
relationship: "tosca.relationships.DependsOn"
- vm:
capability: "tosca.capabilities.QC.VM"
node: "compute_1"
relationship: "tosca.relationships.DependsOn"
interfaces:
CloudsStorm:
delete:
inputs:
code_type: "SEQ"
object_type: "SubTopology"
hscale:
inputs:
code_type: "SEQ"
object_type: "SubTopology"
provision:
inputs:
code_type: "SEQ"
object_type: "SubTopology"
start:
inputs:
code_type: "SEQ"
object_type: "SubTopology"
stop:
inputs:
code_type: "SEQ"
object_type: "SubTopology"
type: "tosca.nodes.QC.VM.topology"
artifacts:
provisioned_files:
required: false
type: "string"
description: "TOSCA example"
imports:
- nodes: "https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/types/nodes.yaml"
- data: "https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/types/data.yml"
- capabilities: "https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/types/capabilities.yaml"
- policies: "https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/types/policies.yaml"
- interfaces: "https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/types/interfaces.yml"
bin/test.sh
View file @
b2b61ce3
#!/bin/bash
#!/bin/bash
cd
../
cd
../
cd
sure_tosca-flask-server
&&
venv/bin/pip3
install
-r
test-requirements.txt
&&
venv/bin/python3
-m
unittest discover
python3
-m
venv venv
cd
sure_tosca-flask-server
&&
python3
-m
venv venv
&&
venv/bin/pip3
install
-r
test-requirements.txt
&&
venv/bin/pip3
install
-r
requirements.txt
&&
venv/bin/python3
-m
unittest discover
if
[
$?
-eq
0
]
if
[
$?
-eq
0
]
then
then
echo
"------- sure_tosca-flask-server tests successful------"
echo
"------- sure_tosca-flask-server tests successful------"
...
@@ -35,48 +36,53 @@ then
...
@@ -35,48 +36,53 @@ then
echo
"------- Java tests successful------"
echo
"------- Java tests successful------"
else
else
echo
"Java tests Failed"
echo
"Java tests Failed"
docker stack
rm
conf-test
exit
1
exit
1
fi
fi
cd
planner
&&
venv/bin/python3
-m
unittest discover
cd
planner
&&
python3
-m
venv venv
&&
venv/bin/pip3
install
-r
test-requirements.txt
&&
venv/bin/pip3
install
-r
requirements.txt
&&
venv/bin/python3
-m
unittest discover
if
[
$?
-eq
0
]
if
[
$?
-eq
0
]
then
then
echo
"------- Planner tests successful------"
echo
"------- Planner tests successful------"
else
else
echo
"Planner tests Failed"
echo
"Planner tests Failed"
docker stack
rm
conf-test
exit
1
exit
1
fi
fi
cd
../
cd
../
cd
sure_tosca-client_python_stubs
&&
venv/bin/python3
-m
unittest discover
cd
sure_tosca-client_python_stubs
&&
python3
-m
venv venv
&&
venv/bin/pip3
install
-r
test-requirements.txt
&&
venv/bin/pip3
install
-r
requirements.txt
&&
venv/bin/python3
-m
unittest discover
if
[
$?
-eq
0
]
if
[
$?
-eq
0
]
then
then
echo
"------- sure_tosca-client_python_stubs tests successful------"
echo
"------- sure_tosca-client_python_stubs tests successful------"
else
else
echo
"sure_tosca-client_python_stubs tests Failed"
echo
"sure_tosca-client_python_stubs tests Failed"
docker stack
rm
conf-test
exit
1
exit
1
fi
fi
cd
../
cd
../
cd
semaphore-python-client-generated
&&
venv/bin/python3
-m
unittest discover
cd
semaphore-python-client-generated
&&
python3
-m
venv venv
&&
venv/bin/pip3
install
-r
test-requirements.txt
&&
venv/bin/pip3
install
-r
requirements.txt
&&
venv/bin/python3
-m
unittest discover
if
[
$?
-eq
0
]
if
[
$?
-eq
0
]
then
then
echo
"------- semaphore-python-client-generated tests successful ------"
echo
"------- semaphore-python-client-generated tests successful ------"
else
else
echo
"semaphore-python-client-generated tests Failed"
echo
"semaphore-python-client-generated tests Failed"
docker stack
rm
conf-test
exit
1
exit
1
fi
fi
cd
../
#cd ../
cd
deployer
&&
venv/bin/python3
-m
unittest discover
#cd deployer && python3 -m venv venv && venv/bin/pip3 install -U pip setuptools && venv/bin/pip3 install -r test-requirements.txt && venv/bin/pip3 install -r requirements.txt && venv/bin/python3 -m unittest discover
if
[
$?
-eq
0
]
#if [ $? -eq 0 ]
then
#then
echo
"------- deployer tests successful ------"
# echo "------- deployer tests successful ------"
else
#else
echo
"deployer tests Failed"
# echo "deployer tests Failed"
exit
1
# docker stack rm conf-test
fi
# exit 1
#fi
docker stack
rm
conf-test
docker stack
rm
conf-test
deployer/requirements.txt
View file @
b2b61ce3
...
@@ -12,3 +12,4 @@ python_dateutil==2.8.1
...
@@ -12,3 +12,4 @@ python_dateutil==2.8.1
# setuptools==46.1.3
# setuptools==46.1.3
# urllib3==1.25.8
# urllib3==1.25.8
kubernetes==11.0.0
kubernetes==11.0.0
sure_tosca_client==1.0.0
\ No newline at end of file
deployer/service/__pycache__/ansible_service.cpython-38.pyc
0 → 100644
View file @
b2b61ce3
File added
planner/requirements.txt
View file @
b2b61ce3
...
@@ -5,3 +5,4 @@ networkx==2.4
...
@@ -5,3 +5,4 @@ networkx==2.4
pyyaml==5.3.1
pyyaml==5.3.1
tosca-parser==2.1.1
tosca-parser==2.1.1
matplotlib==3.2.1
matplotlib==3.2.1
requests==2.24.0
\ No newline at end of file
planner/test-requirements.txt
View file @
b2b61ce3
...
@@ -5,3 +5,4 @@ nose>=1.3.7
...
@@ -5,3 +5,4 @@ nose>=1.3.7
pluggy==0.13.1
pluggy==0.13.1
randomize==0.14
randomize==0.14
Werkzeug==1.0.0
Werkzeug==1.0.0
requests==2.24.0
\ No newline at end of file
planner/test/test_planner.py
View file @
b2b61ce3
...
@@ -36,20 +36,19 @@ class MyTestCase(unittest.TestCase):
...
@@ -36,20 +36,19 @@ class MyTestCase(unittest.TestCase):
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
self
.
run_test
(
input_tosca_file_path
)
self
.
run_test
(
input_tosca_file_path
)
# def test_docker(self):
def
test_docker
(
self
):
# url = 'https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/examples/application_example_updated.yaml'
url
=
'https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/examples/application_example_updated.yaml'
# input_tosca_file_path = self.get_remote_tosca_file(url)
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
# self.run_test(input_tosca_file_path)
self
.
run_test
(
input_tosca_file_path
)
url
=
'https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/examples/lifeWatch_vre1.yaml'
url
=
'https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/examples/lifeWatch_vre1.yaml'
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
self
.
run_test
(
input_tosca_file_path
)
self
.
run_test
(
input_tosca_file_path
)
def
test_kubernetes
(
self
):
#
def test_kubernetes(self):
url
=
'https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/examples/kubernetes.yaml'
#
url = 'https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/examples/kubernetes.yaml'
input_tosca_file_path
=
self
.
get_remote_tosca_file
(
url
)
#
input_tosca_file_path = self.get_remote_tosca_file(url)
self
.
run_test
(
input_tosca_file_path
)
#
self.run_test(input_tosca_file_path)
def
test_topology
(
self
):
def
test_topology
(
self
):
url
=
'https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/examples/topology.yaml'
url
=
'https://raw.githubusercontent.com/qcdis-sdia/sdia-tosca/master/examples/topology.yaml'
...
...
sure_tosca-flask-server/requirements.txt
View file @
b2b61ce3
...
@@ -7,3 +7,4 @@ tinydb==3.15.2
...
@@ -7,3 +7,4 @@ tinydb==3.15.2
tosca-parser==2.0.0
tosca-parser==2.0.0
flask-restx==0.2.0
flask-restx==0.2.0
werkzeug==1.0.1
werkzeug==1.0.1
six==1.15.0
\ No newline at end of file
sure_tosca-flask-server/sure_tosca/test/__init__.py
deleted
100644 → 0
View file @
bb0e67be
import
logging
import
connexion
from
flask_testing
import
TestCase
from
sure_tosca.encoder
import
JSONEncoder
class
BaseTestCase
(
TestCase
):
def
create_app
(
self
):
logging
.
getLogger
(
'connexion.operation'
)
.
setLevel
(
'ERROR'
)
app
=
connexion
.
App
(
__name__
,
specification_dir
=
'../swagger/'
)
app
.
app
.
json_encoder
=
JSONEncoder
app
.
add_api
(
'swagger.yaml'
)
return
app
.
app
sure_tosca-flask-server/test-requirements.txt
View file @
b2b61ce3
...
@@ -5,3 +5,4 @@ nose>=1.3.7
...
@@ -5,3 +5,4 @@ nose>=1.3.7
pluggy>=0.13.1
pluggy>=0.13.1
randomize>=0.14
randomize>=0.14
Werkzeug==1.0.0
Werkzeug==1.0.0
six==1.15.0
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment