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
Lu Xu
slapos.core
Commits
3b47ba8d
Commit
3b47ba8d
authored
Jul 18, 2011
by
Lucas Carvalho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the params to propagate the signature files to slapos.buildout .
parent
6e030a76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
slapos/grid/SlapObject.py
slapos/grid/SlapObject.py
+6
-1
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+16
-3
No files found.
slapos/grid/SlapObject.py
View file @
3b47ba8d
...
@@ -47,7 +47,8 @@ REQUIRED_COMPUTER_PARTITION_PERMISSION = '0750'
...
@@ -47,7 +47,8 @@ REQUIRED_COMPUTER_PARTITION_PERMISSION = '0750'
class
Software
(
object
):
class
Software
(
object
):
"""This class is responsible of installing a software release"""
"""This class is responsible of installing a software release"""
def
__init__
(
self
,
url
,
software_root
,
console
,
buildout
):
def
__init__
(
self
,
url
,
software_root
,
console
,
buildout
,
signature_public_file
,
signature_private_file
):
"""Initialisation of class parameters
"""Initialisation of class parameters
"""
"""
self
.
url
=
url
self
.
url
=
url
...
@@ -57,6 +58,8 @@ class Software(object):
...
@@ -57,6 +58,8 @@ class Software(object):
self
.
buildout
=
buildout
self
.
buildout
=
buildout
self
.
logger
=
logging
.
getLogger
(
'BuildoutManager'
)
self
.
logger
=
logging
.
getLogger
(
'BuildoutManager'
)
self
.
console
=
console
self
.
console
=
console
self
.
signature_private_file
=
signature_private_file
self
.
signature_public_file
=
signature_public_file
def
install
(
self
):
def
install
(
self
):
""" Fetches buildout configuration from the server, run buildout with
""" Fetches buildout configuration from the server, run buildout with
...
@@ -79,6 +82,8 @@ class Software(object):
...
@@ -79,6 +82,8 @@ class Software(object):
buildout_parameter_list
=
[
buildout_parameter_list
=
[
'buildout:extends-cache=%s'
%
extends_cache
,
'buildout:extends-cache=%s'
%
extends_cache
,
'buildout:directory=%s'
%
self
.
software_path
,
'buildout:directory=%s'
%
self
.
software_path
,
'buildout:signature_public_file=%s'
%
self
.
signature_public_file
,
'buildout:signature_private_file=%s'
%
self
.
signature_private_file
,
'-c'
,
self
.
url
]
'-c'
,
self
.
url
]
bootstrapBuildout
(
self
.
software_path
,
self
.
buildout
,
bootstrapBuildout
(
self
.
software_path
,
self
.
buildout
,
additional_buildout_parametr_list
=
buildout_parameter_list
,
additional_buildout_parametr_list
=
buildout_parameter_list
,
...
...
slapos/grid/slapgrid.py
View file @
3b47ba8d
...
@@ -97,6 +97,8 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
...
@@ -97,6 +97,8 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
parser
.
add_argument
(
"--key_file"
,
help
=
"SSL Authorisation key file."
)
parser
.
add_argument
(
"--key_file"
,
help
=
"SSL Authorisation key file."
)
parser
.
add_argument
(
"--cert_file"
,
parser
.
add_argument
(
"--cert_file"
,
help
=
"SSL Authorisation certificate file."
)
help
=
"SSL Authorisation certificate file."
)
parser
.
add_argument
(
"--signature_private_file"
,
help
=
"Private Key File."
)
parser
.
add_argument
(
"--signature_public_file"
,
help
=
"Public Key File."
)
parser
.
add_argument
(
"--master_ca_file"
,
help
=
"Root certificate of SlapOS "
parser
.
add_argument
(
"--master_ca_file"
,
help
=
"Root certificate of SlapOS "
"master key."
)
"master key."
)
parser
.
add_argument
(
"--certificate_repository_path"
,
parser
.
add_argument
(
"--certificate_repository_path"
,
...
@@ -164,9 +166,12 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
...
@@ -164,9 +166,12 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
key_file
=
option_dict
.
get
(
'key_file'
)
key_file
=
option_dict
.
get
(
'key_file'
)
cert_file
=
option_dict
.
get
(
'cert_file'
)
cert_file
=
option_dict
.
get
(
'cert_file'
)
master_ca_file
=
option_dict
.
get
(
'master_ca_file'
)
master_ca_file
=
option_dict
.
get
(
'master_ca_file'
)
signature_private_file
=
option_dict
.
get
(
'signature_private_file'
,
''
)
signature_public_file
=
option_dict
.
get
(
'signature_public_file'
,
''
)
for
f
in
[
key_file
,
cert_file
,
master_ca_file
]:
for
f
in
[
key_file
,
cert_file
,
master_ca_file
,
if
f
is
not
None
:
signature_private_file
,
signature_public_file
]:
if
f
not
in
(
''
,
None
,):
if
not
os
.
path
.
exists
(
f
):
if
not
os
.
path
.
exists
(
f
):
parser
.
error
(
'File %r does not exists.'
%
f
)
parser
.
error
(
'File %r does not exists.'
%
f
)
...
@@ -196,6 +201,8 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
...
@@ -196,6 +201,8 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
key_file
=
key_file
,
key_file
=
key_file
,
cert_file
=
cert_file
,
cert_file
=
cert_file
,
master_ca_file
=
master_ca_file
,
master_ca_file
=
master_ca_file
,
signature_private_file
=
signature_private_file
,
signature_public_file
=
signature_public_file
,
certificate_repository_path
=
certificate_repository_path
,
certificate_repository_path
=
certificate_repository_path
,
console
=
option_dict
[
'console'
],
console
=
option_dict
[
'console'
],
buildout
=
option_dict
.
get
(
'buildout'
)),
buildout
=
option_dict
.
get
(
'buildout'
)),
...
@@ -265,6 +272,8 @@ class Slapgrid(object):
...
@@ -265,6 +272,8 @@ class Slapgrid(object):
buildout
,
buildout
,
key_file
=
None
,
key_file
=
None
,
cert_file
=
None
,
cert_file
=
None
,
signature_private_file
=
None
,
signature_public_file
=
None
,
master_ca_file
=
None
,
master_ca_file
=
None
,
certificate_repository_path
=
None
,
certificate_repository_path
=
None
,
console
=
False
):
console
=
False
):
...
@@ -281,6 +290,8 @@ class Slapgrid(object):
...
@@ -281,6 +290,8 @@ class Slapgrid(object):
self
.
cert_file
=
cert_file
self
.
cert_file
=
cert_file
self
.
master_ca_file
=
master_ca_file
self
.
master_ca_file
=
master_ca_file
self
.
certificate_repository_path
=
certificate_repository_path
self
.
certificate_repository_path
=
certificate_repository_path
self
.
signature_private_file
=
signature_private_file
self
.
signature_public_file
=
signature_public_file
# Configures logger
# Configures logger
self
.
logger
=
logging
.
getLogger
(
'Slapgrid'
)
self
.
logger
=
logging
.
getLogger
(
'Slapgrid'
)
# Creates objects from slap module
# Creates objects from slap module
...
@@ -352,7 +363,9 @@ class Slapgrid(object):
...
@@ -352,7 +363,9 @@ class Slapgrid(object):
software_release
.
building
()
software_release
.
building
()
software_release_uri
=
software_release
.
getURI
()
software_release_uri
=
software_release
.
getURI
()
Software
(
url
=
software_release_uri
,
software_root
=
self
.
software_root
,
Software
(
url
=
software_release_uri
,
software_root
=
self
.
software_root
,
console
=
self
.
console
,
buildout
=
self
.
buildout
).
install
()
console
=
self
.
console
,
buildout
=
self
.
buildout
,
signature_private_file
=
self
.
signature_private_file
,
signature_public_file
=
self
.
signature_public_file
).
install
()
except
(
SystemExit
,
KeyboardInterrupt
):
except
(
SystemExit
,
KeyboardInterrupt
):
exception
=
traceback
.
format_exc
()
exception
=
traceback
.
format_exc
()
software_release
.
error
(
exception
)
software_release
.
error
(
exception
)
...
...
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