diff --git a/manifests/api.pp b/manifests/api.pp index 588705179..16a4550c0 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -412,7 +412,8 @@ class nova::api( # make sure we start apache before nova-api to avoid binding issues Service[$service_name] -> Service['nova-api'] } else { - fail('Invalid service_name. Either nova-api/openstack-nova-api for running as a standalone service, or httpd for being run by a httpd server') + fail('Invalid service_name. Either nova-api/openstack-nova-api for running \ + as a standalone service, or httpd for being run by a httpd server') } nova::generic_service { 'api': @@ -505,12 +506,19 @@ class nova::api( } if $validate { - $admin_user_real = pick($admin_user, $::nova::keystone::authtoken::username) - $admin_password_real = pick($admin_password, $::nova::keystone::authtoken::password) - $admin_tenant_name_real = pick($admin_tenant_name, $::nova::keystone::authtoken::project_name) + #Shrinking the variables names in favor of not + #having more than 140 chars per line + #Admin user real + $aur = pick($admin_user, $::nova::keystone::authtoken::username) + #Admin password real + $apr = pick($admin_password, $::nova::keystone::authtoken::password) + #Admin tenan name real + $atnr = pick($admin_tenant_name, $::nova::keystone::authtoken::project_name) + #Keystone Auth URI + $kau = $::nova::keystone::authtoken::auth_uri $defaults = { 'nova-api' => { - 'command' => "nova --os-auth-url ${::nova::keystone::authtoken::auth_uri} --os-project-name ${admin_tenant_name_real} --os-username ${admin_user_real} --os-password ${admin_password_real} flavor-list", + 'command' => "nova --os-auth-url ${kau} --os-project-name ${atnr} --os-username ${aur} --os-password ${apr} flavor-list", } } $validation_options_hash = merge ($defaults, $validation_options) diff --git a/manifests/compute.pp b/manifests/compute.pp index 24373092e..fdbf9b7f8 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -185,15 +185,18 @@ class nova::compute ( include ::nova::params if $default_availability_zone { - warning('The default_availability_zone parameter is deprecated and will be removed in a future release. Use default_availability_zone parameter of nova class instead.') + warning('The default_availability_zone parameter is deprecated and will be removed in a \ + future release. Use default_availability_zone parameter of nova class instead.') } if $default_schedule_zone { - warning('The default_schedule_zone parameter is deprecated and will be removed in a future release. Use default_schedule_zone parameter of nova class instead.') + warning('The default_schedule_zone parameter is deprecated and will be removed in a \ + future release. Use default_schedule_zone parameter of nova class instead.') } if $internal_service_availability_zone { - warning('The internal_service_availability_zone parameter is deprecated and will be removed in a future release. Use internal_service_availability_zone parameter of nova class instead.') + warning('The internal_service_availability_zone parameter is deprecated and will be \ + removed in a future release. Use internal_service_availability_zone parameter of nova class instead.') } if $network_device_mtu { @@ -201,7 +204,8 @@ class nova::compute ( } if $compute_manager { - warning('compute_manager is marked as deprecated in Nova but still needed when Ironic is used. It will be removed once Nova removes it.') + warning('compute_manager is marked as deprecated in Nova but still needed when Ironic \ + is used. It will be removed once Nova removes it.') } $vcpu_pin_set_real = pick(join(any2array($vcpu_pin_set), ','), $::os_service_default) diff --git a/manifests/compute/rbd.pp b/manifests/compute/rbd.pp index e356311e0..143a53b43 100644 --- a/manifests/compute/rbd.pp +++ b/manifests/compute/rbd.pp @@ -100,8 +100,13 @@ class nova::compute::rbd ( require => Anchor['nova::config::begin'], } + #Variable name shrinked in favor of removing + #the more than 140 chars puppet-lint warning. + #variable used in the get-or-set virsh secret + #resource. + $cm = '/usr/bin/virsh secret-define --file /etc/nova/secret.xml | /usr/bin/awk \'{print $2}\' | sed \'/^$/d\' > /etc/nova/virsh.secret' exec { 'get-or-set virsh secret': - command => '/usr/bin/virsh secret-define --file /etc/nova/secret.xml | /usr/bin/awk \'{print $2}\' | sed \'/^$/d\' > /etc/nova/virsh.secret', + command => "${cm}", unless => "/usr/bin/virsh secret-list | grep ${libvirt_rbd_secret_uuid}", require => [File['/etc/nova/secret.xml'], Service['libvirt']], } diff --git a/manifests/init.pp b/manifests/init.pp index 644a462b2..a9c7d26d9 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -595,7 +595,8 @@ class nova( } if ! $nova_private_key_file { - fail("Unable to determine name of private key file. Type specified was '${nova_private_key['type']}' but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") + fail("Unable to determine name of private key file. Type specified was '${nova_private_key['type']}' \ + but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") } file { $nova_private_key_file: diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 7e76289d8..4234e4877 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -111,8 +111,10 @@ class nova::keystone::auth( include ::nova::deps - if $auth_name_v3 or $service_description_v3 or $service_name_v3 or $public_url_v3 or $internal_url_v3 or $admin_url_v3 or $configure_endpoint_v3 { - warning('all parameters related to v3 API in nova::keystone::auth are deprecated, have no effect and will be removed after Newton release.') + if $auth_name_v3 or $service_description_v3 or $service_name_v3 or + $public_url_v3 or $internal_url_v3 or $admin_url_v3 or $configure_endpoint_v3 { + warning('all parameters related to v3 API in nova::keystone::auth are \ + deprecated, have no effect and will be removed after Newton release.') } if $configure_endpoint { diff --git a/manifests/network.pp b/manifests/network.pp index ccd652036..d39f1415b 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -202,7 +202,8 @@ class nova::network( create_resources('class', $vlan_resource) } default: { - fail("Unsupported network manager: ${nova::network_manager} The supported network managers are nova.network.manager.FlatManager, nova.network.FlatDHCPManager and nova.network.manager.VlanManager") + fail("Unsupported network manager: ${nova::network_manager} The supported network managers are \ + nova.network.manager.FlatManager, nova.network.FlatDHCPManager and nova.network.manager.VlanManager") } } diff --git a/manifests/params.pp b/manifests/params.pp index 412b21be2..d4552381a 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -133,7 +133,8 @@ class nova::params { } } default: { - fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian") + fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \ + module ${module_name} only support osfamily RedHat and Debian") } }