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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
6710aef8
Commit
6710aef8
authored
Jul 19, 2011
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'origin/master' into slave_instance
parents
60154d71
2c62e63f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
84 additions
and
134 deletions
+84
-134
CHANGES.txt
CHANGES.txt
+14
-2
buildout.cfg
buildout.cfg
+10
-1
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_requestNewCertificate.xml
..._skins/vifib_hosting/WebSection_requestNewCertificate.xml
+6
-117
master/bt5/vifib_web/bt/revision
master/bt5/vifib_web/bt/revision
+1
-1
master/product/Vifib/tests/testVifibSlapWebService.py
master/product/Vifib/tests/testVifibSlapWebService.py
+33
-0
setup.py
setup.py
+1
-1
slapos.cfg.example
slapos.cfg.example
+7
-7
slapos/console.py
slapos/console.py
+12
-5
No files found.
CHANGES.txt
View file @
6710aef8
0.10 (unreleased)
0.12 (2011-07-15)
================
* Include modifications that should have been included in 0.11.
0.11 (2011-07-15)
================
* Bug fix : slapconsole : shorthand methods request and supply now correctly
return an object. [Cedric de Saint Martin]
0.10 (2011-07-13)
=================
* No changes yet.
* Fix a bug in slapconsole where request and supply shorthand methods
don't accept all needed parameters. [Cedric de Saint Martin]
0.9 (2011-07-11)
================
...
...
buildout.cfg
View file @
6710aef8
...
...
@@ -9,6 +9,15 @@ find-links =
versions = versions
allow-hosts =
*.googlecode.com
*.nexedi.org
*.python.org
alastairs-place.net
code.google.com
github.com
peak.telecommunity.com
# Separate development profile from system python packages
include-site-packages = false
exec-sitecustomize = false
...
...
@@ -36,4 +45,4 @@ eggs =
interpreter = python
[versions]
zc.buildout = 1.5.3-dev-SlapOS-00
4
zc.buildout = 1.5.3-dev-SlapOS-00
5
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_requestNewCertificate.xml
View file @
6710aef8
...
...
@@ -52,123 +52,12 @@
<key>
<string>
_body
</string>
</key>
<value>
<string>
person = context.ERP5Site_getAuthenticatedMemberPersonValue()\n
request = context.REQUEST\n
#try:\n
# certificate = person.getCertificate()\n
# request.set(\'portal_status_message\', context.Base_translateString(\'Certificate created.\'))\n
#except ValueError:\n
# certificate = {\'certificate\': \'\', \'key\': \'\'}\n
# request.set(\'portal_status_message\', context.Base_translateString(\'Certificate was already requested, please revoke existing one.\'))\n
certificate = {}\n
certificate[\'key\'] = """-----BEGIN PRIVATE KEY-----\n
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCn5ArY6o1jSkTD\n
y/De6SW5oD6BzOVJgmZBa5Xjf3rwFVcvD2MeXyv34eh5Btsiu1dkVHk6G7vfPnxL\n
zjeCnRHemjQEfP1cEdLmTZiaAqoYlNq/rOLHMdX71DC8BENTNiP2mmgbUa6EXWML\n
pGSUmXZwPNZt7PsgtfANdiWQqMzMq0NXUbNfZ5eku6bMWWxljgBmnaD5CXA5AuXd\n
tUeJ39WCgfp86pXVIEZtL0e2Hw+TOTA79QM3q29tYF3+ZR/Gi2koiu4PsdgOHhhI\n
C/hrx3mk99tOBSika7654sNjMDDTib2FjDN7ofXuHB6uNXf2sZuaRHaQrDN04rLa\n
xW4yTjkjAgMBAAECggEAPYtCzrFskvEus/eWnKAqzBkJ0NsjUgcTJPgjQfoBPvET\n
vJSPaRrKK1wMtBDnU5wJNSYiKkLwY62sMr2ta5vYaRlt6BdJaO6/uNzJC+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unD1bfVZgrjBwmpGQs2O1TNAf1b4lD3RKOxwcAn4rE2U6ruJ0Yu/ASkrqnZaxl\n
6GCTkojhLUOrEpkVEN6k310=\n
-----END PRIVATE KEY-----"""\n
certificate[\'certificate\'] = """Certificate:\n
Data:\n
Version: 3 (0x2)\n
Serial Number: 12 (0xc)\n
Signature Algorithm: sha1WithRSAEncryption\n
Issuer: C=XX, ST=State, L=City, O=Company, CN=Automatic Certificate Authority/emailAddress=xx@example.com\n
Validity\n
Not Before: Jul 12 12:07:50 2011 GMT\n
Not After : Jul 9 12:07:50 2021 GMT\n
Subject: C=XX, ST=State, O=Company, CN=test_vifib_customer/emailAddress=xx@example.com\n
Subject Public Key Info:\n
Public Key Algorithm: rsaEncryption\n
Public-Key: (2048 bit)\n
Modulus:\n
00:a7:e4:0a:d8:ea:8d:63:4a:44:c3:cb:f0:de:e9:\n
25:b9:a0:3e:81:cc:e5:49:82:66:41:6b:95:e3:7f:\n
7a:f0:15:57:2f:0f:63:1e:5f:2b:f7:e1:e8:79:06:\n
db:22:bb:57:64:54:79:3a:1b:bb:df:3e:7c:4b:ce:\n
37:82:9d:11:de:9a:34:04:7c:fd:5c:11:d2:e6:4d:\n
98:9a:02:aa:18:94:da:bf:ac:e2:c7:31:d5:fb:d4:\n
30:bc:04:43:53:36:23:f6:9a:68:1b:51:ae:84:5d:\n
63:0b:a4:64:94:99:76:70:3c:d6:6d:ec:fb:20:b5:\n
f0:0d:76:25:90:a8:cc:cc:ab:43:57:51:b3:5f:67:\n
97:a4:bb:a6:cc:59:6c:65:8e:00:66:9d:a0:f9:09:\n
70:39:02:e5:dd:b5:47:89:df:d5:82:81:fa:7c:ea:\n
95:d5:20:46:6d:2f:47:b6:1f:0f:93:39:30:3b:f5:\n
03:37:ab:6f:6d:60:5d:fe:65:1f:c6:8b:69:28:8a:\n
ee:0f:b1:d8:0e:1e:18:48:0b:f8:6b:c7:79:a4:f7:\n
db:4e:05:28:a4:6b:be:b9:e2:c3:63:30:30:d3:89:\n
bd:85:8c:33:7b:a1:f5:ee:1c:1e:ae:35:77:f6:b1:\n
9b:9a:44:76:90:ac:33:74:e2:b2:da:c5:6e:32:4e:\n
39:23\n
Exponent: 65537 (0x10001)\n
X509v3 extensions:\n
X509v3 Basic Constraints:\n
CA:FALSE\n
Netscape Comment:\n
OpenSSL Generated Certificate\n
X509v3 Subject Key Identifier:\n
2F:12:E1:CF:0C:6D:E5:93:92:EC:10:DD:33:3A:03:0D:5A:4A:65:04\n
X509v3 Authority Key Identifier:\n
keyid:93:30:A5:99:77:10:DF:05:13:21:3E:8D:40:D1:6B:FD:61:80:51:50\n
\n
Signature Algorithm: sha1WithRSAEncryption\n
34:d3:e0:7f:87:87:2a:17:b6:5f:c4:72:cf:b9:8a:fd:d5:3c:\n
ba:a1:2d:6d:95:11:b6:18:cc:67:c3:80:f5:d2:ae:ed:a2:6b:\n
7b:d9:51:43:56:84:17:80:f3:ec:c3:c9:e0:88:63:26:56:02:\n
82:8d:4a:04:c3:a3:7c:99:bb:4c:fa:b7:eb:10:8d:e2:86:31:\n
42:dc:f8:3d:b1:e9:91:8c:87:88:fe:ba:40:6a:64:45:16:0f:\n
0a:4e:72:ea:91:37:62:93:1a:f7:77:29:90:0c:60:0f:be:50:\n
c3:c9:e9:40:bd:bb:8c:22:0c:54:d8:fb:f7:62:df:83:0f:01:\n
54:f0:c0:03:59:5b:56:c7:09:8d:f5:64:12:53:e1:2e:31:f6:\n
36:25:6f:8d:87:5c:ab:b0:f3:f5:41:d3:17:38:88:f2:7d:15:\n
90:cd:7f:92:89:24:05:cf:32:85:c1:8f:f8:aa:6a:b5:2e:48:\n
65:29:35:05:eb:ed:7e:32:35:88:d7:0d:39:4a:28:8e:d1:16:\n
99:f9:0e:2a:7a:1f:6f:c0:3d:79:26:9a:57:05:90:1c:01:31:\n
df:b2:e1:b7:ba:f8:81:d2:9f:e4:42:34:50:6b:b4:c2:5b:fb:\n
92:12:5c:f6:5d:89:ab:36:e5:dc:d0:c3:8b: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\n
Po1A0Wv9YYBRUDANBgkqhkiG9w0BAQUFAAOCAQEANNPgf4eHKhe2X8Ryz7mK/dU8\n
uqEtbZURthjMZ8OA9dKu7aJre9lRQ1aEF4Dz7MPJ4IhjJlYCgo1KBMOjfJm7TPq3\n
6xCN4oYxQtz4PbHpkYyHiP66QGpkRRYPCk5y6pE3YpMa93cpkAxgD75Qw8npQL27\n
jCIMVNj792Lfgw8BVPDAA1lbVscJjfVkElPhLjH2NiVvjYdcq7Dz9UHTFziI8n0V\n
kM1/kokkBc8yhcGP+KpqtS5IZSk1BevtfjI1iNcNOUoojtEWmfkOKnofb8A9eSaa\n
VwWQHAEx37Lht7r4gdKf5EI0UGu0wlv7khJc9l2Jqzbl3NDDi0KH+a7PlWWNUg==\n
-----END CERTIFICATE-----"""\n
try:\n
certificate = person.getCertificate()\n
request.set(\'portal_status_message\', context.Base_translateString(\'Certificate created.\'))\n
except ValueError:\n
certificate = {\'certificate\': \'\', \'key\': \'\'}\n
request.set(\'portal_status_message\', context.Base_translateString(\'Certificate was already requested, please revoke existing one.\'))\n
request.set(\'your_certificate\', certificate[\'certificate\'])\n
request.set(\'your_key\', certificate[\'key\'])\n
\n
...
...
master/bt5/vifib_web/bt/revision
View file @
6710aef8
296
\ No newline at end of file
297
\ No newline at end of file
master/product/Vifib/tests/testVifibSlapWebService.py
View file @
6710aef8
...
...
@@ -8128,6 +8128,39 @@ class TestVifibSlapWebService(testVifibMixin):
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
stepArchiveSoftwareRelease
(
self
,
sequence
,
**
kw
):
"""
Submit the software release document.
"""
software_release_uid
=
sequence
[
"software_release_uid"
]
software_release
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
software_release_uid
)
software_release
.
portal_workflow
.
doActionFor
(
software_release
,
'archive_action'
)
def
test_bug_archived_software_release_access
(
self
):
"""Checks that Computer has access to archived Software Release"""
sequence_string
=
self
.
\
prepare_start_requested_computer_partition_sequence_string
+
\
"""
LoginTestVifibDeveloper
ArchiveSoftwareRelease
Tic
Logout
SlapLoginCurrentComputer
SoftwareInstanceStarted
Tic
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListStarted
Logout
"""
sequence_list
=
SequenceList
()
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
########################################
# Other tests
########################################
...
...
setup.py
View file @
6710aef8
...
...
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import
glob
import
os
version
=
'0.1
0-dev
'
version
=
'0.1
2
'
name
=
'slapos.core'
long_description
=
open
(
"README.txt"
).
read
()
+
"
\
n
"
+
\
open
(
"CHANGES.txt"
).
read
()
+
"
\
n
"
...
...
slapos.cfg.example
View file @
6710aef8
...
...
@@ -25,12 +25,12 @@ database_uri = :memory:
cert_file = certificate file location coming from your slapos master account
key_file = key file location coming from your slapos master account
# Below are softwares supported by Vifib
alias =
kvm https://svn.erp5.org/repos/vifib/public/trunk/software_release/kvm/software.cfg
alias =
nbd https://svn.erp5.org/repos/vifib/public/trunk/software_release/nbdserver/software.cfg
kvm
+ https://svn.erp5.org/repos/vifib/public/trunk/software_release/kvm+
/software.cfg
kvm
http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.25:/software/kvm
/software.cfg
testnode http://git.erp5.org/gitweb/slapos.git/blob_plain/testnode:/software/testnode/software.cfg
nosqltester http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/nosqltestbed:/software/nosqltestbed/software.cfg
slaposwebrunner http
s://svn.erp5.org/repos/vifib/public/trunk/software_release/
runner/software.cfg
slaposwebrunner http
://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.17:/software/slap
runner/software.cfg
lightforum https://svn.erp5.org/repos/public/slapos/trunk/software_release.contribution/lightforum.Christophe.Lefloch/software.cfg
factux https://www.tiolive.com/vifib/P-OSOE.Factux.Wilfried.Rodrigues/Base_download
joomla https://svn.erp5.org/repos/public/slapos/trunk/software_release.contribution/joomla.Christophe.Laroulandie/software.cfg
...
...
@@ -38,9 +38,9 @@ alias = kvm https://svn.erp5.org/repos/vifib/public/trunk/software_release/kvm/s
respest https://www.tiolive.com/vifib/P-OSOE.Respest.BENHAMED/Base_download
erp5scalabilitytestbed http://git.erp5.org/gitweb/slapos.git/blob_plain/erp5scalabilitytestbed:/software/erp5scalabilitytestbed/software.cfg
zabbixagent http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.5:/software/zabbix-agent/software.cfg
mysql
-5.1 http://git.erp5.org/gitweb/slapos.git/blob_plain/ee6caee6215a00b92aa6016d46ff291dbc4d4e2c
:/software/mysql-5.1/software.cfg
mariadb
-5.2 http://git.erp5.org/gitweb/slapos.git/blob_plain/ee6caee6215a00b92aa6016d46ff291dbc4d4e2c
:/software/mariadb/software.cfg
memcached http://git.erp5.org/gitweb/slapos.git/blob_plain/
ee6caee6215a00b92aa6016d46ff291dbc4d4e2c
:/software/memcached/software.cfg
kumofs http://git.erp5.org/gitweb/slapos.git/blob_plain/
ee6caee6215a00b92aa6016d46ff291dbc4d4e2c
:/software/kumofs/software.cfg
mysql
http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.21
:/software/mysql-5.1/software.cfg
mariadb
http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.16
:/software/mariadb/software.cfg
memcached http://git.erp5.org/gitweb/slapos.git/blob_plain/
refs/tags/slapos-0.16
:/software/memcached/software.cfg
kumofs http://git.erp5.org/gitweb/slapos.git/blob_plain/
refs/tags/slapos-0.21
:/software/kumofs/software.cfg
erp5 http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/erp5/software.cfg
erp5_branch http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/erp5:/software/erp5/software.cfg
slapos/console.py
View file @
6710aef8
...
...
@@ -111,7 +111,6 @@ class Config:
setattr
(
self
,
'master_url'
,
master_url
)
def
init
(
config
):
"""Initialize Slap instance, connect to server and create
aliases to common software releases"""
slap
=
slapos
.
slap
.
slap
()
...
...
@@ -133,10 +132,18 @@ def init(config):
# Create global variable too see available aliases
local
[
'software_list'
]
=
software_list
# Create global shortcut functions to request instance and software
local
[
'request'
]
=
lambda
software_release
,
reference
:
\
slap
.
registerOpenOrder
().
request
(
software_release
,
reference
)
local
[
'supply'
]
=
lambda
software_release
,
computer
:
\
slap
.
registerSupply
().
supply
(
software_release
,
computer
)
# XXX-Cedric : can we change given parameters to something like
# *args, **kwargs, but without the bad parts, in order to be generic?
def
shorthandRequest
(
software_release
,
partition_reference
,
partition_parameter_kw
=
None
,
software_type
=
None
,
filter_kw
=
None
,
state
=
None
):
return
slap
.
registerOpenOrder
().
request
(
software_release
,
partition_reference
,
partition_parameter_kw
,
software_type
,
filter_kw
,
state
)
def
shorthandSupply
(
software_release
,
computer_guid
=
None
):
return
slap
.
registerSupply
().
supply
(
software_release
,
computer_guid
)
local
[
'request'
]
=
shorthandRequest
local
[
'supply'
]
=
shorthandSupply
return
local
def
request
():
...
...
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