Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SlapOS Develop
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
Eric Zheng
SlapOS Develop
Commits
eb59577a
Commit
eb59577a
authored
Apr 28, 2021
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cookbook: Fix how slave instance parameters are passed in re6stnet
parent
ab1eb698
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
slapos/recipe/re6stnet/__init__.py
slapos/recipe/re6stnet/__init__.py
+1
-2
slapos/test/recipe/test_re6stnet.py
slapos/test/recipe/test_re6stnet.py
+3
-4
No files found.
slapos/recipe/re6stnet/__init__.py
View file @
eb59577a
...
@@ -49,9 +49,8 @@ class Recipe(GenericBaseRecipe):
...
@@ -49,9 +49,8 @@ class Recipe(GenericBaseRecipe):
self
.
software_release_url
=
slap_connection
[
'software-release-url'
]
self
.
software_release_url
=
slap_connection
[
'software-release-url'
]
self
.
key_file
=
slap_connection
.
get
(
'key-file'
)
self
.
key_file
=
slap_connection
.
get
(
'key-file'
)
self
.
cert_file
=
slap_connection
.
get
(
'cert-file'
)
self
.
cert_file
=
slap_connection
.
get
(
'cert-file'
)
self
.
slave_list
=
json
.
loads
(
options
[
'slave-instance-list'
])
self
.
slave_list
=
options
[
'slave-instance-list'
]
options
[
'slave-amount'
]
=
'%s'
%
len
(
self
.
slave_list
)
return
GenericBaseRecipe
.
__init__
(
self
,
buildout
,
name
,
options
)
return
GenericBaseRecipe
.
__init__
(
self
,
buildout
,
name
,
options
)
def
getSerialFromIpv6
(
self
,
ipv6
):
def
getSerialFromIpv6
(
self
,
ipv6
):
...
...
slapos/test/recipe/test_re6stnet.py
View file @
eb59577a
...
@@ -38,7 +38,7 @@ class Re6stnetTest(unittest.TestCase):
...
@@ -38,7 +38,7 @@ class Re6stnetTest(unittest.TestCase):
'drop-service-wrapper'
:
os
.
path
.
join
(
self
.
base_dir
,
'drop_wrapper'
),
'drop-service-wrapper'
:
os
.
path
.
join
(
self
.
base_dir
,
'drop_wrapper'
),
'check-service-wrapper'
:
os
.
path
.
join
(
self
.
base_dir
,
'check_wrapper'
),
'check-service-wrapper'
:
os
.
path
.
join
(
self
.
base_dir
,
'check_wrapper'
),
'revoke-service-wrapper'
:
os
.
path
.
join
(
self
.
base_dir
,
'revoke_wrapper'
),
'revoke-service-wrapper'
:
os
.
path
.
join
(
self
.
base_dir
,
'revoke_wrapper'
),
'slave-instance-list'
:
'{}'
'slave-instance-list'
:
[],
}
}
def
tearDown
(
self
):
def
tearDown
(
self
):
...
@@ -119,11 +119,10 @@ class Re6stnetTest(unittest.TestCase):
...
@@ -119,11 +119,10 @@ class Re6stnetTest(unittest.TestCase):
def
test_install
(
self
):
def
test_install
(
self
):
self
.
options
.
update
({
self
.
options
.
update
({
'ipv6-prefix'
:
'2001:db8:24::/48'
,
'ipv6-prefix'
:
'2001:db8:24::/48'
,
'slave-instance-list'
:
'''
[
'slave-instance-list'
:
[
{
"slave_reference"
:
"SOFTINST-58770"
},
{
"slave_reference"
:
"SOFTINST-58770"
},
{
"slave_reference"
:
"SOFTINST-58778"
}
{
"slave_reference"
:
"SOFTINST-58778"
}
]
]
'''
})
})
recipe
=
self
.
new_recipe
()
recipe
=
self
.
new_recipe
()
...
@@ -161,7 +160,7 @@ class Re6stnetTest(unittest.TestCase):
...
@@ -161,7 +160,7 @@ class Re6stnetTest(unittest.TestCase):
# Remove one element
# Remove one element
self
.
options
.
update
({
self
.
options
.
update
({
"slave-instance-list"
:
"""[{"slave_reference":"SOFTINST-58770"}]"""
"slave-instance-list"
:
[{
"slave_reference"
:
"SOFTINST-58770"
}]
})
})
recipe
=
self
.
new_recipe
()
recipe
=
self
.
new_recipe
()
recipe
.
generateCertificate
=
self
.
fake_generateCertificates
recipe
.
generateCertificate
=
self
.
fake_generateCertificates
...
...
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