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
Jean-Paul Smets
slapos
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
Show 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 @@
##############################################################################
from
slapos.recipe.librecipe
import
GenericBaseRecipe
import
json
import
zc.buildout
class
Recipe
(
GenericBaseRecipe
):
"""
...
...
@@ -82,6 +83,10 @@ class Recipe(GenericBaseRecipe):
return
proxy_table_content
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
rewrite_rule_list
=
self
.
_getRewriteRuleContent
(
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