Removing WARNING: line has more than 140 characters in puppet-nova profiles

Some lint checks are returning:
WARNING: line has more than 140 characters

This patch will remove those warnings by adding \'s or
reducing variables names

Change in favor of using latest version of puppet-lint

2016-09-09 15:01:33.093779 | manifests/api.pp:415:WARNING: line has more than 140 characters
2016-09-09 15:01:33.093857 | manifests/api.pp:513:WARNING: line has more than 140 characters
2016-09-09 15:01:33.093882 | manifests/compute.pp:188:WARNING: line has more than 140 characters
2016-09-09 15:01:33.093904 | manifests/compute.pp:192:WARNING: line has more than 140 characters
2016-09-09 15:01:33.093924 | manifests/compute.pp:196:WARNING: line has more than 140 characters
2016-09-09 15:01:33.093945 | manifests/compute.pp:204:WARNING: line has more than 140 characters
2016-09-09 15:01:33.093966 | manifests/compute/rbd.pp:104:WARNING: line has more than 140 characters
2016-09-09 15:01:33.093986 | manifests/init.pp:598:WARNING: line has more than 140 characters
2016-09-09 15:01:33.094008 | manifests/keystone/auth.pp:114:WARNING: line has more than 140 characters
2016-09-09 15:01:33.094030 | manifests/keystone/auth.pp:115:WARNING: line has more than 140 characters
2016-09-09 15:01:33.094050 | manifests/network.pp:205:WARNING: line has more than 140 characters
2016-09-09 15:01:33.094071 | manifests/params.pp:136:WARNING: line has more than 140 characters

Change-Id: I61a4e50f8ed72907c831ea158056061e1e61aa82
This commit is contained in:
Carlos Camacho
2016-08-15 12:46:49 +02:00
parent a8e3d482be
commit 19625e85d1
7 changed files with 37 additions and 15 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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']],
}

View File

@@ -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:

View File

@@ -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 {

View File

@@ -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")
}
}

View File

@@ -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")
}
}