Merge "Remove transformer to set [DEFAULT] router_id"

This commit is contained in:
Zuul 2022-08-01 09:53:23 +00:00 committed by Gerrit Code Review
commit 64aec48383
4 changed files with 5 additions and 43 deletions

View File

@ -1,28 +0,0 @@
#
# This manifest is intended to demonstrate the 'transform_to' argument
# for converting the name of a Neutron router to its UUID for
# inclusion in l3-agent.ini
#
# This manifest extends the one shown in base_provision.pp
#
class { 'neutron':
default_transport_url => 'rabbit://guest:password@localhost:5672/neutron',
service_plugins => ['router']
}
class { 'neutron::server':
auth_password => 'password',
database_connection => 'mysql+pymysql://neutron:password@192.168.1.1/neutron',
}
# configure l3-agent to use the new router by name
class { 'neutron::agents::l3':
enabled => true,
use_namespaces => false,
require => Neutron_router['demo_router'],
}
neutron_l3_agent_config {
'DEFAULT/router_id': value => 'demo_router', transform_to => 'uuid';
}

View File

@ -14,17 +14,4 @@ Puppet::Type.type(:neutron_l3_agent_config).provide(
def file_path
self.class.file_path
end
def to_uuid(name)
neutron = Puppet::Provider::Neutron.new
neutron.auth_neutron('router-show', "#{name}",
'--format=value', '--column=id').chop
end
def from_uuid(uuid)
neutron = Puppet::Provider::Neutron.new
neutron.auth_neutron('router-show', "#{uuid}",
'--format=value', '--column=name').chop
end
end

View File

@ -43,8 +43,6 @@ Puppet::Type.newtype(:neutron_l3_agent_config) do
defaultto('<SERVICE DEFAULT>')
end
newparam(:transform_to)
autorequire(:anchor) do
['neutron::install::end']
end

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
The ``neutron_l3_agent_config`` resource type no longer supports
the ``transform_to`` property.