Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Douglas
slapos.package
Commits
9064829c
Commit
9064829c
authored
Nov 12, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PEP8 bis
parent
d3233b1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
slapprepare/slapprepare/__init__.py
slapprepare/slapprepare/__init__.py
+9
-9
No files found.
slapprepare/slapprepare/__init__.py
View file @
9064829c
...
@@ -116,9 +116,9 @@ def get_yes_no (prompt,default=None):
...
@@ -116,9 +116,9 @@ def get_yes_no (prompt,default=None):
def_value
=
''
def_value
=
''
while
True
:
while
True
:
answer
=
raw_input
(
prompt
+
" [y,n] %s: "
%
def_value
)
answer
=
raw_input
(
prompt
+
" [y,n] %s: "
%
def_value
)
if
answer
.
upper
()
in
[
'Y'
,
'YES'
]:
return
True
if
answer
.
upper
()
in
[
'Y'
,
'YES'
]:
return
True
if
answer
.
upper
()
in
[
'N'
,
'NO'
]:
return
False
if
answer
.
upper
()
in
[
'N'
,
'NO'
]:
return
False
if
not
default
==
None
:
if
not
default
==
None
:
if
answer
==
''
:
return
default
if
answer
==
''
:
return
default
# Return OpenSUSE version if it is SuSE
# Return OpenSUSE version if it is SuSE
...
@@ -420,8 +420,8 @@ class Config:
...
@@ -420,8 +420,8 @@ class Config:
self
.
key_path
=
key_path
self
.
key_path
=
key_path
self
.
master_url
=
master_url
self
.
master_url
=
master_url
self
.
mount_dir_path
=
mount_dir_path
self
.
mount_dir_path
=
mount_dir_path
self
.
temp_dir
=
temp_dir
self
.
temp_dir
=
temp_dir
self
.
computer_id
=
computer_id
self
.
computer_id
=
computer_id
def
userConfig
(
self
):
def
userConfig
(
self
):
...
@@ -484,15 +484,15 @@ def prepare_from_scratch(config):
...
@@ -484,15 +484,15 @@ def prepare_from_scratch(config):
# Prepare Slapos Configuration
# Prepare Slapos Configuration
if
config
.
certificates
:
if
config
.
certificates
:
_call
([
'slapos'
,
'node'
,
'register'
,
config
.
computer_name
_call
([
'slapos'
,
'node'
,
'register'
,
config
.
computer_name
,
'--interface-name'
,
'br0'
,
'--interface-name'
,
'br0'
,
'--ipv6-interface'
,
config
.
ipv6_interface
,
'--ipv6-interface'
,
config
.
ipv6_interface
,
'--partition-number'
,
config
.
partition_amount
])
,
'--partition-number'
,
config
.
partition_amount
])
# Prepare for bridge
# Prepare for bridge
enable_bridge
(
slapos_configuration
)
enable_bridge
(
slapos_configuration
)
computer_id
=
get_computer_name
(
computer_id
=
get_computer_name
(
os
.
path
.
join
(
'/'
,
slapos_configuration
,
'slapos.cfg'
))
os
.
path
.
join
(
'/'
,
slapos_configuration
,
'slapos.cfg'
))
print
"Your Computer is : %s"
%
computer_id
print
"Your Computer is : %s"
%
computer_id
...
...
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