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
e64ed370
Commit
e64ed370
authored
Mar 18, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KVM frontend : Check mandatory field before continuing
parent
dac8cd44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
slapos/recipe/generic_kvm_frontend/__init__.py
slapos/recipe/generic_kvm_frontend/__init__.py
+5
-0
No files found.
slapos/recipe/generic_kvm_frontend/__init__.py
View file @
e64ed370
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
##############################################################################
##############################################################################
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.librecipe
import
GenericBaseRecipe
import
json
import
json
import
zc.buildout
class
Recipe
(
GenericBaseRecipe
):
class
Recipe
(
GenericBaseRecipe
):
"""
"""
...
@@ -82,6 +83,10 @@ class Recipe(GenericBaseRecipe):
...
@@ -82,6 +83,10 @@ class Recipe(GenericBaseRecipe):
return
proxy_table_content
return
proxy_table_content
def
install
(
self
):
def
install
(
self
):
# Check for mandatory field
if
self
.
options
.
get
(
'domain'
,
None
)
is
None
:
raise
zc
.
buildout
.
UserError
(
'No domain name specified. Please define '
'the "domain" instance parameter.'
)
# Generate rewrite rules
# Generate rewrite rules
rewrite_rule_list
=
self
.
_getRewriteRuleContent
(
rewrite_rule_list
=
self
.
_getRewriteRuleContent
(
json
.
loads
(
self
.
options
[
'slave-instance-list'
]))
json
.
loads
(
self
.
options
[
'slave-instance-list'
]))
...
...
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