Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
disco
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Balazs
disco
Commits
abfa254e
Commit
abfa254e
authored
Jan 25, 2016
by
Balazs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new test_so.py with more commands at the end
parent
224fdec7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
test_so.py
test_so.py
+19
-4
No files found.
test_so.py
View file @
abfa254e
import
requests
import
requests
import
time
import
time
# token to be updated regularly
token
=
'5c561faee5fd40efab9458c603be644e'
token
=
'7786d2441fe440a1b5cb4efa70f8e514'
heads
=
{
'X-Auth-Token'
:
token
,
'X-Tenant-Name'
:
'mesz'
,
'Content-Type'
:
'text/occi'
,
'Accept'
:
'text/occi'
}
heads
=
{
'X-Auth-Token'
:
token
,
'X-Tenant-Name'
:
'mcntub'
,
'Content-Type'
:
'text/occi'
,
'Accept'
:
'text/occi'
}
#host = "http://192.168.99.100:32772"
host
=
'http://127.0.0.1:8080'
host
=
'http://localhost:8080'
#host = 'http://sohaas910c865a08de7861.test.apps.opsv3.cloudcomplab.ch'
# host = 'http://10.88.88.128:8080' # for use with docker executed images
# host = 'http://10.88.88.128:8080' # for use with docker executed images
start
=
time
.
time
();
r
=
requests
.
get
(
host
+
'/-/'
,
headers
=
heads
);
r
.
headers
;
stop
=
time
.
time
();
stop
-
start
start
=
time
.
time
();
r
=
requests
.
get
(
host
+
'/-/'
,
headers
=
heads
);
r
.
headers
;
stop
=
time
.
time
();
stop
-
start
...
@@ -13,6 +14,7 @@ heads['Category']='orchestrator; scheme="http://schemas.mobile-cloud-networking.
...
@@ -13,6 +14,7 @@ heads['Category']='orchestrator; scheme="http://schemas.mobile-cloud-networking.
start
=
time
.
time
();
r
=
requests
.
put
(
host
+
'/orchestrator/default'
,
headers
=
heads
);
r
.
headers
;
stop
=
time
.
time
();
stop
-
start
start
=
time
.
time
();
r
=
requests
.
put
(
host
+
'/orchestrator/default'
,
headers
=
heads
);
r
.
headers
;
stop
=
time
.
time
();
stop
-
start
heads
[
'Category'
]
=
'deploy; scheme="http://schemas.mobile-cloud-networking.eu/occi/service#"'
heads
[
'Category'
]
=
'deploy; scheme="http://schemas.mobile-cloud-networking.eu/occi/service#"'
heads
[
'X-OCCI-Attribute'
]
=
'icclab.haas.rootfolder="/Users/puenktli/Documents/Coding/PycharmProjects/HaaS/bundle/data",icclab.haas.slave.number="1",icclab.haas.master.floatingip="false",icclab.haas.master.slaveonmaster="false",icclab.haas.master.sshkeyname="mesz MNMBA",icclab.haas.debug.savetemplatetolocalpath="/Users/puenktli/Desktop/currentTemplate.yaml"'
start
=
time
.
time
();
r
=
requests
.
post
(
host
+
'/orchestrator/default?action=deploy'
,
headers
=
heads
);
r
.
headers
;
stop
=
time
.
time
();
stop
-
start
start
=
time
.
time
();
r
=
requests
.
post
(
host
+
'/orchestrator/default?action=deploy'
,
headers
=
heads
);
r
.
headers
;
stop
=
time
.
time
();
stop
-
start
r
=
requests
.
get
(
host
+
'/orchestrator/default'
,
headers
=
heads
);
r
.
headers
r
=
requests
.
get
(
host
+
'/orchestrator/default'
,
headers
=
heads
);
r
.
headers
...
@@ -23,3 +25,16 @@ start=time.time(); r = requests.post(host+'/orchestrator/default?action=provisio
...
@@ -23,3 +25,16 @@ start=time.time(); r = requests.post(host+'/orchestrator/default?action=provisio
r
=
requests
.
get
(
host
+
'/orchestrator/default'
,
headers
=
heads
);
r
.
headers
r
=
requests
.
get
(
host
+
'/orchestrator/default'
,
headers
=
heads
);
r
.
headers
r
=
requests
.
delete
(
host
+
'/orchestrator/default'
,
headers
=
heads
)
r
=
requests
.
delete
(
host
+
'/orchestrator/default'
,
headers
=
heads
)
"""
curl -v -X GET http://192.168.99.100:32771/-/ -H 'Accept: text/occi' -H 'X-Auth-Token: 73c0b22f89a44fb297ae4f1d98f7b6e4' -H 'X-Tenant-Name: mesz'
curl -v -X POST http://192.168.99.100:32771/haas/ -H 'Category: haas; scheme="http://schemas.cloudcomplab.ch/occi/sm#"; class="kind";' -H 'content-type: text/occi' -H 'X-Auth-Token: 73c0b22f89a44fb297ae4f1d98f7b6e4' -H 'X-Tenant-Name: mesz'
curl -v -X POST http://160.85.231.190:8888/haas/ -H 'Category: haas; scheme="http://schemas.hurtle.it/occi/sm#"; class="kind";' -H 'content-type: text/occi' -H 'x-tenant-name: YOUR_TENANT_NAME' -H 'x-auth-token: YOUR_KEYSTONE_TOKEN'
curl -v -X POST http://160.85.231.190:8888/orchestrator/default?action=deploy -H 'Category: deploy; scheme="http://schemas.mobile-cloud-networking.eu/occi/service#"' -H 'X-OCCI-Attribute: icclab.haas.master.image = "Ubuntu-Trusty-1404-7-10-2015"' -H 'X-OCCI-Attribute: icclab.haas.slave.image = "Ubuntu-Trusty-1404-7-10-2015"'
"""
\ 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