Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kwabena Antwi-Boasiako
slapos
Commits
0b50e5f0
Commit
0b50e5f0
authored
Jul 13, 2011
by
Vivien Alger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Beggining refactoring of recipe
parent
1a0206fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
slapos/recipe/kvm/__init__.py
slapos/recipe/kvm/__init__.py
+10
-6
No files found.
slapos/recipe/kvm/__init__.py
View file @
0b50e5f0
...
@@ -48,6 +48,12 @@ class Recipe(BaseSlapRecipe):
...
@@ -48,6 +48,12 @@ class Recipe(BaseSlapRecipe):
"""
"""
self
.
path_list
=
[]
self
.
path_list
=
[]
self
.
ca_conf
=
self
.
installCertificateAuthority
()
self
.
key_path
,
self
.
certificate_path
=
self
.
requestCertificate
(
'noVNC'
)
self
.
requirements
,
self
.
ws
=
self
.
egg
.
working_set
()
self
.
cron_d
=
self
.
installCrond
()
kvm_conf
=
self
.
installKvm
(
vnc_ip
=
self
.
getLocalIPv4Address
())
kvm_conf
=
self
.
installKvm
(
vnc_ip
=
self
.
getLocalIPv4Address
())
vnc_port
=
5900
+
kvm_conf
[
'vnc_display'
]
vnc_port
=
5900
+
kvm_conf
[
'vnc_display'
]
...
@@ -162,10 +168,10 @@ class Recipe(BaseSlapRecipe):
...
@@ -162,10 +168,10 @@ class Recipe(BaseSlapRecipe):
noVNC_conf
[
'target_ip'
]
=
target_ip
noVNC_conf
[
'target_ip'
]
=
target_ip
noVNC_conf
[
'target_port'
]
=
target_port
noVNC_conf
[
'target_port'
]
=
target_port
noVNC_conf
[
'python_path'
]
=
python_path
noVNC_conf
[
'python_path'
]
=
python_path
noVNC_conf
[
'ca_conf'
]
=
self
.
ca_conf
noVNC_conf
[
'
ca_conf'
]
=
self
.
installCertificateAuthority
()
noVNC_conf
[
'
key_path'
]
=
self
.
key_path
noVNC_conf
[
'
key_path'
],
noVNC_conf
[
'certificate_path'
]
=
self
.
requestCertificate
(
'noVNC'
)
noVNC_conf
[
'
certificate_path'
]
=
self
.
certificate_path
# Instanciate Websockify
# Instanciate Websockify
websockify_runner_path
=
self
.
instanciate_wrapper
(
"websockify"
,
websockify_runner_path
=
self
.
instanciate_wrapper
(
"websockify"
,
noVNC_conf
)
noVNC_conf
)
...
@@ -219,8 +225,6 @@ class Recipe(BaseSlapRecipe):
...
@@ -219,8 +225,6 @@ class Recipe(BaseSlapRecipe):
def
installCertificateAuthority
(
self
,
ca_country_code
=
'XX'
,
def
installCertificateAuthority
(
self
,
ca_country_code
=
'XX'
,
ca_email
=
'xx@example.com'
,
ca_state
=
'State'
,
ca_city
=
'City'
,
ca_email
=
'xx@example.com'
,
ca_state
=
'State'
,
ca_city
=
'City'
,
ca_company
=
'Company'
):
ca_company
=
'Company'
):
self
.
requirements
,
self
.
ws
=
self
.
egg
.
working_set
()
self
.
cron_d
=
self
.
installCrond
()
backup_path
=
self
.
createBackupDirectory
(
'ca'
)
backup_path
=
self
.
createBackupDirectory
(
'ca'
)
self
.
ca_dir
=
os
.
path
.
join
(
self
.
data_root_directory
,
'ca'
)
self
.
ca_dir
=
os
.
path
.
join
(
self
.
data_root_directory
,
'ca'
)
self
.
_createDirectory
(
self
.
ca_dir
)
self
.
_createDirectory
(
self
.
ca_dir
)
...
...
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