Move to project_ terminology used in current Keystone v3 API
tenant_* properties were deprecated long time ago with [1] and removed recently with [2]. [1] https://review.opendev.org/c/openstack/puppet-neutron/+/828942 [2] https://review.opendev.org/c/openstack/puppet-neutron/+/877189 Change-Id: I8a324fdab89e474ad2a8e6df1560a5c16edbb866
This commit is contained in:
parent
bd1e892301
commit
2d910ae89c
|
@ -8,13 +8,13 @@ class packstack::provision ()
|
||||||
if $provision_demo {
|
if $provision_demo {
|
||||||
$username = 'demo'
|
$username = 'demo'
|
||||||
$password = lookup('CONFIG_KEYSTONE_DEMO_PW')
|
$password = lookup('CONFIG_KEYSTONE_DEMO_PW')
|
||||||
$tenant_name = 'demo'
|
$project_name = 'demo'
|
||||||
$floating_range = lookup('CONFIG_PROVISION_DEMO_FLOATRANGE')
|
$floating_range = lookup('CONFIG_PROVISION_DEMO_FLOATRANGE')
|
||||||
$allocation_pools = lookup('CONFIG_PROVISION_DEMO_ALLOCATION_POOLS')
|
$allocation_pools = lookup('CONFIG_PROVISION_DEMO_ALLOCATION_POOLS')
|
||||||
} elsif $provision_tempest {
|
} elsif $provision_tempest {
|
||||||
$username = lookup('CONFIG_PROVISION_TEMPEST_USER')
|
$username = lookup('CONFIG_PROVISION_TEMPEST_USER')
|
||||||
$password = lookup('CONFIG_PROVISION_TEMPEST_USER_PW')
|
$password = lookup('CONFIG_PROVISION_TEMPEST_USER_PW')
|
||||||
$tenant_name = 'tempest'
|
$project_name = 'tempest'
|
||||||
$floating_range = lookup('CONFIG_PROVISION_TEMPEST_FLOATRANGE')
|
$floating_range = lookup('CONFIG_PROVISION_TEMPEST_FLOATRANGE')
|
||||||
$allocation_pools = []
|
$allocation_pools = []
|
||||||
if (empty($username) or empty($password)) {
|
if (empty($username) or empty($password)) {
|
||||||
|
@ -26,11 +26,11 @@ class packstack::provision ()
|
||||||
if $provision_demo or $provision_tempest {
|
if $provision_demo or $provision_tempest {
|
||||||
|
|
||||||
# Keystone
|
# Keystone
|
||||||
$admin_tenant_name = 'admin'
|
$admin_project_name = 'admin'
|
||||||
keystone_tenant { $tenant_name:
|
keystone_project { $project_name:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
enabled => true,
|
enabled => true,
|
||||||
description => 'default tenant',
|
description => 'default project',
|
||||||
}
|
}
|
||||||
|
|
||||||
keystone_user { $username:
|
keystone_user { $username:
|
||||||
|
@ -40,12 +40,12 @@ class packstack::provision ()
|
||||||
}
|
}
|
||||||
|
|
||||||
if $heat_available {
|
if $heat_available {
|
||||||
keystone_user_role { "${username}@${tenant_name}":
|
keystone_user_role { "${username}@${project_name}":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
roles => ['_member_', 'heat_stack_owner'],
|
roles => ['_member_', 'heat_stack_owner'],
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
keystone_user_role { "${username}@${tenant_name}":
|
keystone_user_role { "${username}@${project_name}":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
roles => ['_member_'],
|
roles => ['_member_'],
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ class packstack::provision ()
|
||||||
neutron_network { $public_network_name:
|
neutron_network { $public_network_name:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
router_external => true,
|
router_external => true,
|
||||||
tenant_name => $admin_tenant_name,
|
project_name => $admin_project_name,
|
||||||
provider_network_type => 'flat',
|
provider_network_type => 'flat',
|
||||||
provider_physical_network => $public_physnet,
|
provider_physical_network => $public_physnet,
|
||||||
}
|
}
|
||||||
|
@ -76,22 +76,22 @@ class packstack::provision ()
|
||||||
allocation_pools => $allocation_pools,
|
allocation_pools => $allocation_pools,
|
||||||
enable_dhcp => false,
|
enable_dhcp => false,
|
||||||
network_name => $public_network_name,
|
network_name => $public_network_name,
|
||||||
tenant_name => $admin_tenant_name,
|
project_name => $admin_project_name,
|
||||||
}
|
}
|
||||||
neutron_network { $private_network_name:
|
neutron_network { $private_network_name:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
tenant_name => $tenant_name,
|
project_name => $project_name,
|
||||||
}
|
}
|
||||||
neutron_subnet { $private_subnet_name:
|
neutron_subnet { $private_subnet_name:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
cidr => $fixed_range,
|
cidr => $fixed_range,
|
||||||
network_name => $private_network_name,
|
network_name => $private_network_name,
|
||||||
tenant_name => $tenant_name,
|
project_name => $project_name,
|
||||||
}
|
}
|
||||||
# Tenant-owned router - assumes network namespace isolation
|
# Tenant-owned router - assumes network namespace isolation
|
||||||
neutron_router { $router_name:
|
neutron_router { $router_name:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
tenant_name => $tenant_name,
|
project_name => $project_name,
|
||||||
gateway_network_name => $public_network_name,
|
gateway_network_name => $public_network_name,
|
||||||
# A neutron_router resource must explicitly declare a dependency on
|
# A neutron_router resource must explicitly declare a dependency on
|
||||||
# the first subnet of the gateway network.
|
# the first subnet of the gateway network.
|
||||||
|
|
Loading…
Reference in New Issue