Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Steven Gueguen
slapos
Commits
df70acb4
Commit
df70acb4
authored
Jan 31, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Postpone network interactions.
Detect missing options earlier, without bothering master.
parent
dc0c1406
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
slapos/recipe/request.py
slapos/recipe/request.py
+10
-11
No files found.
slapos/recipe/request.py
View file @
df70acb4
...
@@ -89,19 +89,8 @@ class Recipe(object):
...
@@ -89,19 +89,8 @@ class Recipe(object):
def
__init__
(
self
,
buildout
,
name
,
options
):
def
__init__
(
self
,
buildout
,
name
,
options
):
self
.
logger
=
logging
.
getLogger
(
name
)
self
.
logger
=
logging
.
getLogger
(
name
)
slap
=
slapmodule
.
slap
()
software_url
=
options
[
'software-url'
]
software_url
=
options
[
'software-url'
]
name
=
options
[
'name'
]
name
=
options
[
'name'
]
slap
.
initializeConnection
(
options
[
'server-url'
],
options
.
get
(
'key-file'
),
options
.
get
(
'cert-file'
),
)
request
=
slap
.
registerComputerPartition
(
options
[
'computer-id'
],
options
[
'partition-id'
]).
request
return_parameters
=
options
.
get
(
'return'
,
''
).
split
()
return_parameters
=
options
.
get
(
'return'
,
''
).
split
()
if
not
return_parameters
:
if
not
return_parameters
:
self
.
logger
.
debug
(
"No parameter to return to main instance."
self
.
logger
.
debug
(
"No parameter to return to main instance."
...
@@ -116,6 +105,16 @@ class Recipe(object):
...
@@ -116,6 +105,16 @@ class Recipe(object):
))
))
slave
=
options
.
get
(
'slave'
,
'false'
).
lower
()
in
\
slave
=
options
.
get
(
'slave'
,
'false'
).
lower
()
in
\
librecipe
.
GenericBaseRecipe
.
TRUE_VALUES
librecipe
.
GenericBaseRecipe
.
TRUE_VALUES
slap
=
slapmodule
.
slap
()
slap
.
initializeConnection
(
options
[
'server-url'
],
options
.
get
(
'key-file'
),
options
.
get
(
'cert-file'
),
)
request
=
slap
.
registerComputerPartition
(
options
[
'computer-id'
],
options
[
'partition-id'
],
).
request
self
.
_raise_request_exception
=
None
self
.
_raise_request_exception
=
None
self
.
_raise_request_exception_formatted
=
None
self
.
_raise_request_exception_formatted
=
None
self
.
instance
=
None
self
.
instance
=
None
...
...
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