Move flavor provisioning to new nova flavor provider

Change-Id: I17beaa19632181fa10c91b137eaef365ab44641b
Depends-On: Ic370ac65990d0b3a360340632ada4016231c8a93
This commit is contained in:
David Moreau-Simard 2016-05-04 12:26:30 -04:00
parent 55342cdad4
commit 2099895646

View File

@ -4,25 +4,21 @@ class openstack_integration::provision {
include ::openstack_integration::config include ::openstack_integration::config
$os_auth_options = "--os-username admin --os-password a_big_secret --os-tenant-name openstack --os-auth-url ${::openstack_integration::config::keystone_auth_uri}/v2.0" nova_flavor { 'm1.nano':
ensure => present,
exec { 'manage_m1.nano_nova_flavor': id => '42',
path => '/usr/bin:/bin:/usr/sbin:/sbin', ram => '128',
provider => shell, disk => '0',
command => "nova ${os_auth_options} flavor-create m1.nano 42 128 0 1", vcpus => '1',
unless => "nova ${os_auth_options} flavor-list | grep m1.nano",
} }
Keystone_user_role['admin@openstack'] -> Exec['manage_m1.nano_nova_flavor'] nova_flavor { 'm1.micro':
Class['::nova::keystone::auth'] -> Exec['manage_m1.nano_nova_flavor'] ensure => present,
id => '84',
exec { 'manage_m1.micro_nova_flavor': ram => '128',
path => '/usr/bin:/bin:/usr/sbin:/sbin', disk => '0',
provider => shell, vcpus => '1',
command => "nova ${os_auth_options} flavor-create m1.micro 84 128 0 1",
unless => "nova ${os_auth_options} flavor-list | grep m1.micro",
} }
Keystone_user_role['admin@openstack'] -> Exec['manage_m1.micro_nova_flavor'] Class['::nova::keystone::auth'] -> Nova_flavor<||>
Class['::nova::keystone::auth'] -> Exec['manage_m1.micro_nova_flavor']
neutron_network { 'public': neutron_network { 'public':
tenant_name => 'openstack', tenant_name => 'openstack',