Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.core
Commits
20f96561
Commit
20f96561
authored
May 07, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for --state argument in request
parent
61077bbe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
slapos/cli/request.py
slapos/cli/request.py
+4
-1
slapos/client.py
slapos/client.py
+3
-1
No files found.
slapos/cli/request.py
View file @
20f96561
...
...
@@ -39,7 +39,10 @@ class RequestCommand(ClientConfigCommand):
help
=
"Node request option 'option1=value1 option2=value2'"
)
ap
.
add_argument
(
'--type'
,
help
=
'Define software type to be requested'
)
help
=
'Software type to be requested'
)
ap
.
add_argument
(
'--state'
,
help
=
'State of the requested instance'
)
ap
.
add_argument
(
'--slave'
,
action
=
'store_true'
,
...
...
slapos/client.py
View file @
20f96561
...
...
@@ -37,6 +37,8 @@ from slapos.slap import ResourceNotReady
class
ClientConfig
(
object
):
state
=
None
def
__init__
(
self
,
args
,
configp
=
None
):
# XXX configp cannot possibly be optional
"""
...
...
@@ -115,7 +117,6 @@ def init(conf):
def
do_request
(
conf
,
local
):
# Request instance
print
(
"Requesting %s..."
%
conf
.
reference
)
if
conf
.
software_url
in
local
:
conf
.
software_url
=
local
[
conf
.
software_url
]
...
...
@@ -126,6 +127,7 @@ def do_request(conf, local):
partition_parameter_kw
=
conf
.
parameters
,
software_type
=
conf
.
type
,
filter_kw
=
conf
.
node
,
state
=
conf
.
state
,
shared
=
conf
.
slave
)
print
"Instance requested.
\
n
State is : %s."
%
partition
.
getState
()
...
...
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