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
Roque
slapos.core
Commits
2094f4e9
Commit
2094f4e9
authored
Oct 04, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move out hardcoded path to global static variable
parent
293ee237
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+4
-3
No files found.
slapos/grid/slapgrid.py
View file @
2094f4e9
...
@@ -70,6 +70,9 @@ MANDATORY_PARAMETER_LIST = [
...
@@ -70,6 +70,9 @@ MANDATORY_PARAMETER_LIST = [
COMPUTER_PARTITION_DESTROYED_STATE
=
'destroyed'
COMPUTER_PARTITION_DESTROYED_STATE
=
'destroyed'
# XXX hardcoded watchdog_path
WATCHDOG_PATH
=
'/opt/slapos/bin/watchdog'
def
parseArgumentTupleAndReturnSlapgridObject
(
*
argument_tuple
):
def
parseArgumentTupleAndReturnSlapgridObject
(
*
argument_tuple
):
"""Parses arguments either from command line, from method parameters or from
"""Parses arguments either from command line, from method parameters or from
config file. Then returns a new instance of slapgrid.Slapgrid with those
config file. Then returns a new instance of slapgrid.Slapgrid with those
...
@@ -451,11 +454,9 @@ class Slapgrid(object):
...
@@ -451,11 +454,9 @@ class Slapgrid(object):
computer_partition_filter_list
.
split
(
","
)
computer_partition_filter_list
.
split
(
","
)
self
.
maximum_periodicity
=
maximum_periodicity
self
.
maximum_periodicity
=
maximum_periodicity
self
.
force_periodicity
=
force_periodicity
self
.
force_periodicity
=
force_periodicity
# XXX hardcoded watchdog_path
self
.
watchdog_path
=
'/opt/slapos/bin/watchdog'
def
getWatchdogLine
(
self
):
def
getWatchdogLine
(
self
):
invocation_list
=
[
self
.
watchdog_path
]
invocation_list
=
[
WATCHDOG_PATH
]
invocation_list
.
append
(
"--master-url '%s' "
%
self
.
master_url
)
invocation_list
.
append
(
"--master-url '%s' "
%
self
.
master_url
)
if
self
.
key_file
is
not
None
and
self
.
cert_file
is
not
None
:
if
self
.
key_file
is
not
None
and
self
.
cert_file
is
not
None
:
invocation_list
.
append
(
"--cert-file %s"
%
self
.
cert_file
)
invocation_list
.
append
(
"--cert-file %s"
%
self
.
cert_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