From aa19faa05d9d51d63d537474a0f26c20cde33b85 Mon Sep 17 00:00:00 2001 From: Xingchao Yu Date: Thu, 2 Nov 2017 05:58:58 +0800 Subject: [PATCH] Change Amphora flavor from public to private In octavia, when create specified nova flavor for Amphora, it's supposed to be accessed by octavia for creating Amphora instances, and other projetcs/users shouldn't get this flavor[1]. [1] https://github.com/openstack/octavia/blob/master/devstack/plugin.sh#L396 Closes-Bug: #1729450 Change-Id: I1d2b74dd99d949263e24b62c427c8718ec8de5b0 --- manifests/worker.pp | 11 ++++++----- ...ge-amphora-flavor-property-178cb1a154af80ba.yaml | 3 +++ spec/classes/octavia_worker_spec.rb | 13 +++++++------ 3 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 releasenotes/notes/change-amphora-flavor-property-178cb1a154af80ba.yaml diff --git a/manifests/worker.pp b/manifests/worker.pp index e8281f58..a7caafc1 100644 --- a/manifests/worker.pp +++ b/manifests/worker.pp @@ -107,11 +107,12 @@ class octavia::worker ( if $manage_nova_flavor { $octavia_flavor = { "octavia_${amp_flavor_id}" => { 'id' => $amp_flavor_id } } $octavia_flavor_defaults = { - 'ensure' => 'present', - 'ram' => '1024', - 'disk' => '2', - 'vcpus' => '1', - 'tag' => ['octavia'] + 'ensure' => 'present', + 'ram' => '1024', + 'disk' => '2', + 'vcpus' => '1', + 'is_public' => false, + 'tag' => ['octavia'] } $nova_flavor_defaults = merge($octavia_flavor_defaults, $nova_flavor_config) create_resources('nova_flavor', $octavia_flavor, $nova_flavor_defaults) diff --git a/releasenotes/notes/change-amphora-flavor-property-178cb1a154af80ba.yaml b/releasenotes/notes/change-amphora-flavor-property-178cb1a154af80ba.yaml new file mode 100644 index 00000000..3dac45c4 --- /dev/null +++ b/releasenotes/notes/change-amphora-flavor-property-178cb1a154af80ba.yaml @@ -0,0 +1,3 @@ +--- +fixes: + - Change amphora flavor is_public property from true to false. diff --git a/spec/classes/octavia_worker_spec.rb b/spec/classes/octavia_worker_spec.rb index 70362b16..91f01556 100644 --- a/spec/classes/octavia_worker_spec.rb +++ b/spec/classes/octavia_worker_spec.rb @@ -57,12 +57,13 @@ describe 'octavia::worker' do it 'deploys nova flavor for octavia worker' do is_expected.to contain_nova_flavor('octavia_65').with( - :ensure => 'present', - :id => '65', - :ram => '1024', - :disk => '2', - :vcpus => '1', - :tag => ['octavia'], + :ensure => 'present', + :id => '65', + :ram => '1024', + :disk => '2', + :vcpus => '1', + :is_public => false, + :tag => ['octavia'], ) end