Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
snf-occi
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
snf-occi
Commits
6964284d
Commit
6964284d
authored
Oct 17, 2016
by
Stavros Sachtouris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test server actions with curl
parent
5b8ea76f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
0 deletions
+92
-0
soi/tests/funcional/run_curl_tests.sh
soi/tests/funcional/run_curl_tests.sh
+92
-0
No files found.
soi/tests/funcional/run_curl_tests.sh
View file @
6964284d
...
...
@@ -75,6 +75,98 @@ cat vm.info;
echo
echo
echo
"STOP the server"
echo
"Meaning: kamaki server shutdown"
ACTION
=
"stop"
ACT
=
"
${
BASE_CMD
}
-X POST
${
VM_URL
}
?action=
${
ACTION
}
-H 'Category:
${
ACTION
}
;
\
scheme=
\"
http://schemas.ogf.org/occi/infrastructure/compute/action#
\"
; class=
\"
action
\"
'"
echo
"
$CMD
"
eval
$ACT
echo
"Check server state"
echo
$CMD
eval
$CMD
STATE
=(
`
awk
'/occi.compute.state/{n=split($0,a,"\""); print a[2];}'
vm.info
`
)
WAIT
=
1
;
while
[
$STATE
!=
'inactive'
]
do
echo
"Server state is
${
STATE
}
"
echo
"wait
${
WAIT
}
\"
and check again"
sleep
$WAIT
;
let
"WAIT++"
;
echo
"
$CMD
"
;
eval
$CMD
;
STATE
=(
`
awk
'/occi.compute.state/{n=split($0,a,"\""); print a[2];}'
vm.info
`
)
done
;
cat
vm.info
;
echo
echo
echo
"START the server"
echo
"Meaning: kamaki server start"
ACTION
=
"start"
ACT
=
"
${
BASE_CMD
}
-X POST
${
VM_URL
}
?action=
${
ACTION
}
-H 'Category:
${
ACTION
}
;
\
scheme=
\"
http://schemas.ogf.org/occi/infrastructure/compute/action#
\"
; class=
\"
action
\"
'"
echo
"
$CMD
"
eval
$ACT
echo
"Check server state"
echo
$CMD
eval
$CMD
STATE
=(
`
awk
'/occi.compute.state/{n=split($0,a,"\""); print a[2];}'
vm.info
`
)
WAIT
=
1
;
while
[
$STATE
!=
'active'
]
do
echo
"Server state is
${
STATE
}
"
echo
"wait
${
WAIT
}
\"
and check again"
sleep
$WAIT
;
let
"WAIT++"
;
echo
"
$CMD
"
;
eval
$CMD
;
STATE
=(
`
awk
'/occi.compute.state/{n=split($0,a,"\""); print a[2];}'
vm.info
`
)
done
;
cat
vm.info
;
echo
echo
echo
"RESTART the server"
echo
"Meaning: kamaki server restart"
ACTION
=
"restart"
ACT
=
"
${
BASE_CMD
}
-X POST
${
VM_URL
}
?action=
${
ACTION
}
-H 'Category:
${
ACTION
}
;
\
scheme=
\"
http://schemas.ogf.org/occi/infrastructure/compute/action#
\"
; class=
\"
action
\"
'"
echo
"
$CMD
"
eval
$ACT
echo
"Check server state"
echo
$CMD
eval
$CMD
STATE
=(
`
awk
'/occi.compute.state/{n=split($0,a,"\""); print a[2];}'
vm.info
`
)
WAIT
=
1
;
while
[
$STATE
!=
'inactive'
]
do
echo
"Server state is
${
STATE
}
"
echo
"wait
${
WAIT
}
\"
and check again"
sleep
$WAIT
;
let
"WAIT++"
;
echo
"
$CMD
"
;
eval
$CMD
;
STATE
=(
`
awk
'/occi.compute.state/{n=split($0,a,"\""); print a[2];}'
vm.info
`
)
done
cat
vm.info
echo
WAIT
=
1
;
while
[
$STATE
!=
'active'
]
do
echo
"Server state is
${
STATE
}
"
echo
"wait
${
WAIT
}
\"
and check again"
sleep
$WAIT
;
let
"WAIT++"
;
echo
"
$CMD
"
;
eval
$CMD
;
STATE
=(
`
awk
'/occi.compute.state/{n=split($0,a,"\""); print a[2];}'
vm.info
`
)
done
;
cat
vm.info
;
echo
echo
echo
"Delete the server"
echo
"Meaning: kamaki server delete
${
VM_URL
}
"
...
...
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