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
$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"
exec { 'manage_m1.nano_nova_flavor':
path => '/usr/bin:/bin:/usr/sbin:/sbin',
provider => shell,
command => "nova ${os_auth_options} flavor-create m1.nano 42 128 0 1",
unless => "nova ${os_auth_options} flavor-list | grep m1.nano",
nova_flavor { 'm1.nano':
ensure => present,
id => '42',
ram => '128',
disk => '0',
vcpus => '1',
}
Keystone_user_role['admin@openstack'] -> Exec['manage_m1.nano_nova_flavor']
Class['::nova::keystone::auth'] -> Exec['manage_m1.nano_nova_flavor']
exec { 'manage_m1.micro_nova_flavor':
path => '/usr/bin:/bin:/usr/sbin:/sbin',
provider => shell,
command => "nova ${os_auth_options} flavor-create m1.micro 84 128 0 1",
unless => "nova ${os_auth_options} flavor-list | grep m1.micro",
nova_flavor { 'm1.micro':
ensure => present,
id => '84',
ram => '128',
disk => '0',
vcpus => '1',
}
Keystone_user_role['admin@openstack'] -> Exec['manage_m1.micro_nova_flavor']
Class['::nova::keystone::auth'] -> Exec['manage_m1.micro_nova_flavor']
Class['::nova::keystone::auth'] -> Nova_flavor<||>
neutron_network { 'public':
tenant_name => 'openstack',