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
Lisa Casino
slapos.core
Commits
b5245eb3
Commit
b5245eb3
authored
Jul 06, 2012
by
Yingjie Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a --develop option so it forces to ignore .completed file.
parent
cd1b4738
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+7
-2
No files found.
slapos/grid/slapgrid.py
View file @
b5245eb3
...
@@ -118,6 +118,8 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
...
@@ -118,6 +118,8 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
help
=
"SlapOS configuration file."
)
help
=
"SlapOS configuration file."
)
parser
.
add_argument
(
"--now"
,
action
=
"store_true"
,
default
=
False
,
parser
.
add_argument
(
"--now"
,
action
=
"store_true"
,
default
=
False
,
help
=
"Launch slapgrid without delay."
)
help
=
"Launch slapgrid without delay."
)
parser
.
add_argument
(
"--develop"
,
action
=
"store_true"
,
default
=
False
,
help
=
"Launch slapgrid in develop mode. In develop mode, slapgrid-sr ignores .completed file"
)
# Parses arguments
# Parses arguments
if
argument_tuple
==
():
if
argument_tuple
==
():
...
@@ -261,6 +263,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
...
@@ -261,6 +263,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
shacache_key_file
=
option_dict
.
get
(
'shacache-key-file'
,
None
),
shacache_key_file
=
option_dict
.
get
(
'shacache-key-file'
,
None
),
shadir_cert_file
=
option_dict
.
get
(
'shadir-cert-file'
,
None
),
shadir_cert_file
=
option_dict
.
get
(
'shadir-cert-file'
,
None
),
shadir_key_file
=
option_dict
.
get
(
'shadir-key-file'
,
None
),
shadir_key_file
=
option_dict
.
get
(
'shadir-key-file'
,
None
),
develop
=
option_dict
.
get
(
'develop'
,
False
)
),
),
option_dict
])
option_dict
])
...
@@ -347,7 +350,8 @@ class Slapgrid(object):
...
@@ -347,7 +350,8 @@ class Slapgrid(object):
shacache_cert_file
=
None
,
shacache_cert_file
=
None
,
shacache_key_file
=
None
,
shacache_key_file
=
None
,
shadir_cert_file
=
None
,
shadir_cert_file
=
None
,
shadir_key_file
=
None
):
shadir_key_file
=
None
,
develop
=
False
):
"""Makes easy initialisation of class parameters"""
"""Makes easy initialisation of class parameters"""
# Parses arguments
# Parses arguments
self
.
software_root
=
os
.
path
.
abspath
(
software_root
)
self
.
software_root
=
os
.
path
.
abspath
(
software_root
)
...
@@ -387,6 +391,7 @@ class Slapgrid(object):
...
@@ -387,6 +391,7 @@ class Slapgrid(object):
self
.
console
=
console
self
.
console
=
console
self
.
buildout
=
buildout
self
.
buildout
=
buildout
self
.
promise_timeout
=
promise_timeout
self
.
promise_timeout
=
promise_timeout
self
.
develop
=
develop
def
checkEnvironmentAndCreateStructure
(
self
):
def
checkEnvironmentAndCreateStructure
(
self
):
"""Checks for software_root and instance_root existence, then creates
"""Checks for software_root and instance_root existence, then creates
...
@@ -463,7 +468,7 @@ class Slapgrid(object):
...
@@ -463,7 +468,7 @@ class Slapgrid(object):
shadir_key_file
=
self
.
shadir_key_file
)
shadir_key_file
=
self
.
shadir_key_file
)
if
state
==
'available'
:
if
state
==
'available'
:
completed_tag
=
os
.
path
.
join
(
software_path
,
'.completed'
)
completed_tag
=
os
.
path
.
join
(
software_path
,
'.completed'
)
if
not
os
.
path
.
exists
(
completed_tag
):
if
self
.
develop
or
(
not
os
.
path
.
exists
(
completed_tag
)
):
try
:
try
:
software_release
.
building
()
software_release
.
building
()
except
NotFoundError
:
except
NotFoundError
:
...
...
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