Correct UI bug and syntaxt errors
Change-Id: Ic3b510e9eaab546190f74004c016c2470b2ae938
This commit is contained in:
parent
f845cad762
commit
5725f56257
|
@ -1,8 +1,4 @@
|
||||||
class availability_zone (
|
class availability_zone (
|
||||||
|
|
||||||
){
|
){
|
||||||
include availability_zone::params
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
class availability_zone::params {
|
|
||||||
|
|
||||||
|
|
||||||
if $::osfamily == 'Debian' {
|
|
||||||
|
|
||||||
|
|
||||||
} elsif($::osfamily == 'RedHat') {
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
fail("unsuported osfamily ${::osfamily}, currently Debian and Redhat are the only supported platforms")
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -26,19 +26,19 @@ define add_host_zone2 {
|
||||||
command => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-add-host $label_zone_2 $name'",
|
command => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-add-host $label_zone_2 $name'",
|
||||||
unless => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-details $label_zone_2 | /bin/egrep \"$name\"'",
|
unless => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-details $label_zone_2 | /bin/egrep \"$name\"'",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
define add_host_zone3 {
|
define add_host_zone3 {
|
||||||
exec { "processing $name":
|
exec { "processing $name":
|
||||||
command => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-add-host $label_zone_3 $name'",
|
command => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-add-host $label_zone_3 $name'",
|
||||||
unless => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-details $label_zone_3 | /bin/egrep \"$name\"'",
|
unless => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-details $label_zone_3 | /bin/egrep \"$name\"'",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
define add_host_zone4 {
|
define add_host_zone4 {
|
||||||
exec { "processing $name":
|
exec { "processing $name":
|
||||||
command => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-add-host $label_zone_4 $name'",
|
command => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-add-host $label_zone_4 $name'",
|
||||||
unless => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-details $label_zone_4 | /bin/egrep \"$name\"'",
|
unless => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-details $label_zone_4 | /bin/egrep \"$name\"'",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exec{ "Create $label_zone_1 zone":
|
exec{ "Create $label_zone_1 zone":
|
||||||
command => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-create $label_zone_1 $label_zone_1'",
|
command => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-create $label_zone_1 $label_zone_1'",
|
||||||
|
@ -63,14 +63,10 @@ if $nb_av > 2 {
|
||||||
add_host_zone3 { $array_zone_3 : }
|
add_host_zone3 { $array_zone_3 : }
|
||||||
}
|
}
|
||||||
|
|
||||||
if $nb_av > 3 {
|
if $nb_av > 3 {
|
||||||
exec{ "Create $label_zone_4 zone":
|
exec{ "Create $label_zone_4 zone":
|
||||||
command => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-create $label_zone_4 $label_zone_4'",
|
command => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-create $label_zone_4 $label_zone_4'",
|
||||||
unless => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-list | /bin/egrep \"$label_zone_4\"'",
|
unless => "/bin/bash -c 'source /root/openrc && /usr/bin/nova aggregate-list | /bin/egrep \"$label_zone_4\"'",
|
||||||
} ->
|
} ->
|
||||||
add_host_zone4 { $array_zone_4 : }
|
add_host_zone4 { $array_zone_4 : }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,74 +14,70 @@ attributes:
|
||||||
label: "3"
|
label: "3"
|
||||||
- data: "4"
|
- data: "4"
|
||||||
label: "4"
|
label: "4"
|
||||||
label_availability_zone_1:
|
label_availability_zones_1:
|
||||||
value: ""
|
|
||||||
label: "Zone 1 name"
|
label: "Zone 1 name"
|
||||||
description: "Name of availability zone 1"
|
description: "Name of availability zone 1"
|
||||||
value: "Zone_1"
|
value: "Zone_1"
|
||||||
weight: 11
|
weight: 11
|
||||||
type: "text"
|
type: "text"
|
||||||
availability_zone_1:
|
availability_zones_1:
|
||||||
value: ""
|
value: ""
|
||||||
label: "Zone 1"
|
label: "Zone 1"
|
||||||
description: "List of compute node fqdn members of availability zone 1 (comma separated)"
|
description: "List of compute node fqdn members of availability zone 1 (comma separated)"
|
||||||
weight: 12
|
weight: 12
|
||||||
type: "text"
|
type: "text"
|
||||||
label_availability_zone_2:
|
label_availability_zones_2:
|
||||||
value: ""
|
|
||||||
label: "Zone 2 name"
|
label: "Zone 2 name"
|
||||||
description: "Name of availability zone 2"
|
description: "Name of availability zone 2"
|
||||||
value: "Zone_2"
|
value: "Zone_2"
|
||||||
weight: 13
|
weight: 13
|
||||||
type: "text"
|
type: "text"
|
||||||
restrictions:
|
restrictions:
|
||||||
- condition: "settings:availability_zone.nb_av.value != '2' and settings:availability_zone.nb_av.value != '3' and settings:availability_zone.nb_av.value != '4'"
|
- condition: "settings:availability_zones.nb_av.value != '2' and settings:availability_zones.nb_av.value != '3' and settings:availability_zones.nb_av.value != '4'"
|
||||||
action: "hide"
|
action: "hide"
|
||||||
availability_zone_2:
|
availability_zones_2:
|
||||||
value: ""
|
value: ""
|
||||||
label: "Zone 2"
|
label: "Zone 2"
|
||||||
description: "List of compute node fqdn members of availability zone 2 (comma separated)"
|
description: "List of compute node fqdn members of availability zone 2 (comma separated)"
|
||||||
weight: 14
|
weight: 14
|
||||||
type: "text"
|
type: "text"
|
||||||
restrictions:
|
restrictions:
|
||||||
- condition: "settings:availability_zone.nb_av.value != '2' and settings:availability_zone.nb_av.value != '3' and settings:availability_zone.nb_av.value != '4'"
|
- condition: "settings:availability_zones.nb_av.value != '2' and settings:availability_zones.nb_av.value != '3' and settings:availability_zones.nb_av.value != '4'"
|
||||||
action: "hide"
|
action: "hide"
|
||||||
label_availability_zone_3:
|
label_availability_zones_3:
|
||||||
value: ""
|
|
||||||
label: "Zone 3 name"
|
label: "Zone 3 name"
|
||||||
description: "Name of availability zone 3"
|
description: "Name of availability zone 3"
|
||||||
value: "Zone_3"
|
value: "Zone_3"
|
||||||
weight: 15
|
weight: 15
|
||||||
type: "text"
|
type: "text"
|
||||||
restrictions:
|
restrictions:
|
||||||
- condition: "settings:availability_zone.nb_av.value != '3' and settings:availability_zone.nb_av.value != '4'"
|
- condition: "settings:availability_zones.nb_av.value != '3' and settings:availability_zones.nb_av.value != '4'"
|
||||||
action: "hide"
|
action: "hide"
|
||||||
availability_zone_3:
|
availability_zones_3:
|
||||||
value: ""
|
value: ""
|
||||||
label: "Zone 3"
|
label: "Zone 3"
|
||||||
description: "List of compute node fqdn members of availability zone 3 (comma separated)"
|
description: "List of compute node fqdn members of availability zone 3 (comma separated)"
|
||||||
weight: 16
|
weight: 16
|
||||||
type: "text"
|
type: "text"
|
||||||
restrictions:
|
restrictions:
|
||||||
- condition: "settings:availability_zone.nb_av.value != '3' and settings:availability_zone.nb_av.value != '4'"
|
- condition: "settings:availability_zones.nb_av.value != '3' and settings:availability_zones.nb_av.value != '4'"
|
||||||
action: "hide"
|
action: "hide"
|
||||||
label_availability_zone_4:
|
label_availability_zones_4:
|
||||||
value: ""
|
|
||||||
label: "Zone 4 name"
|
label: "Zone 4 name"
|
||||||
description: "Name of availability zone 4"
|
description: "Name of availability zone 4"
|
||||||
value: "Zone_4"
|
value: "Zone_4"
|
||||||
weight: 17
|
weight: 17
|
||||||
type: "text"
|
type: "text"
|
||||||
restrictions:
|
restrictions:
|
||||||
- condition: "settings:availability_zone.nb_av.value != '4'"
|
- condition: "settings:availability_zones.nb_av.value != '4'"
|
||||||
action: "hide"
|
action: "hide"
|
||||||
availability_zone_4:
|
availability_zones_4:
|
||||||
value: ""
|
value: ""
|
||||||
label: "Zone 4"
|
label: "Zone 4"
|
||||||
description: "List of compute node fqdn members of availability zone 4 (comma separated)"
|
description: "List of compute node fqdn members of availability zone 4 (comma separated)"
|
||||||
weight: 18
|
weight: 18
|
||||||
type: "text"
|
type: "text"
|
||||||
restrictions:
|
restrictions:
|
||||||
- condition: "settings:availability_zone.nb_av.value != '4'"
|
- condition: "settings:availability_zones.nb_av.value != '4'"
|
||||||
action: "hide"
|
action: "hide"
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ title: Availability Zones plugin
|
||||||
# Plugin version
|
# Plugin version
|
||||||
version: 3.0.0
|
version: 3.0.0
|
||||||
# Description
|
# Description
|
||||||
description: Allow to configur multiple availability zones
|
description: Allow to configure multiple availability zones
|
||||||
# Required fuel version
|
# Required fuel version
|
||||||
fuel_version: ['7.0']
|
fuel_version: ['7.0']
|
||||||
# Specify license of your plugin
|
# Specify license of your plugin
|
||||||
|
|
Loading…
Reference in New Issue