Cherry-pick from release-0.2: "Add demo service"
Add new service for demo Change-Id: Ieb2a401ecd17a06c3a08aaa1a605b651ba2cf2b8 Update demo service configuration Change-Id: I277e263f633d646c4d28624ce948a4e5e9828420 Remove image selection for demo service Change-Id: I37de04ed955fe80e865349c991b404519d26580f Revert to previous commit. Fix bug in detail info Change-Id: I35151e5a5e8e45def36b4251085e79c2503a099e
This commit is contained in:
parent
f56dbff838
commit
b43f07439e
@ -229,6 +229,7 @@ class ServiceConfigurationForm(UpdatableFieldsForm):
|
||||
for (k, v) in spec.iteritems())
|
||||
else:
|
||||
return spec
|
||||
#TODO: add try-except if unit_templates is not in service description
|
||||
return [parse_spec(spec) for spec in self.service.unit_templates]
|
||||
|
||||
def extract_attributes(self, attributes):
|
||||
|
@ -58,10 +58,11 @@ class OverviewTab(tabs.Tab):
|
||||
text += ' (# transforms into index number)'
|
||||
detail_info['Hostname template'] = text
|
||||
|
||||
if not service_data.domain:
|
||||
detail_info['Domain'] = 'Not in domain'
|
||||
else:
|
||||
detail_info['Domain'] = service_data.domain
|
||||
if hasattr(service_data, 'domain'):
|
||||
if not service_data.domain:
|
||||
detail_info['Domain'] = 'Not in domain'
|
||||
else:
|
||||
detail_info['Domain'] = service_data.domain
|
||||
|
||||
if hasattr(service_data, 'repository'):
|
||||
detail_info['Application repository'] = service_data.repository
|
||||
|
79
muranodashboard/services/Demo.yaml
Normal file
79
muranodashboard/services/Demo.yaml
Normal file
@ -0,0 +1,79 @@
|
||||
name: Demo Service
|
||||
type: demoService
|
||||
|
||||
description: >-
|
||||
<strong> Demo Service </strong>
|
||||
shows how Murano is working.
|
||||
|
||||
unitTemplates:
|
||||
- {}
|
||||
|
||||
forms:
|
||||
- serviceConfiguration:
|
||||
fields:
|
||||
- name: configuration
|
||||
type: string
|
||||
hidden: true
|
||||
initial: standalone
|
||||
- name: name
|
||||
type: string
|
||||
label: Service Name
|
||||
description: >-
|
||||
To identify your service in logs please specify a service name
|
||||
- name: dcInstances
|
||||
type: instance
|
||||
label: Instance Count
|
||||
description: >-
|
||||
Murano can provision more then one instance of the service at a time.
|
||||
For a demo scenario only 2 instances are allowed.
|
||||
attributeNames: units
|
||||
minValue: 1
|
||||
maxValue: 2
|
||||
initial: 2
|
||||
helpText: Enter 1 and 2 value
|
||||
- name: unitNamingPattern
|
||||
type: string
|
||||
label: Hostname template
|
||||
description: >-
|
||||
For your convenience all instance hostnames can be named
|
||||
in the same way. Enter a name and use # character for incrementation.
|
||||
For example, host# turns into host1, host2, etc. Please follow Windows
|
||||
hostname restrictions.
|
||||
required: false
|
||||
regexpValidator: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$'
|
||||
helpText: Optional field for a machine hostname template
|
||||
# temporaryHack
|
||||
widgetMedia:
|
||||
js: [muranodashboard/js/support_placeholder.js]
|
||||
css: {all: [muranodashboard/css/support_placeholder.css]}
|
||||
validators:
|
||||
# if unitNamingPattern is given and dcInstances > 1, then '#' should occur in unitNamingPattern
|
||||
- expr: {YAQL: not $.serviceConfiguration.unitNamingPattern.bool() or ('#' in $.serviceConfiguration.unitNamingPattern)}
|
||||
message: Incrementation symbol "#" is required in the Hostname template
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
attributeNames: false
|
||||
descriptionTitle: Instance Configuration
|
||||
description: Specify some instance parameters on which service would be created.
|
||||
- name: flavor
|
||||
type: flavor
|
||||
label: Instance flavor
|
||||
description: >-
|
||||
Select registered in Openstack flavor. Consider that service performance
|
||||
depends on this parameter.
|
||||
required: false
|
||||
- name: osImage
|
||||
type: image
|
||||
label: Instance image
|
||||
description: >-
|
||||
Select valid image for a service. Image should already be prepared and
|
||||
registered in glance.
|
||||
- name: availabilityZone
|
||||
type: azone
|
||||
label: Availability zone
|
||||
description: Select availability zone where service would be installed.
|
||||
required: false
|
Loading…
Reference in New Issue
Block a user