Fix puppet-lint in composable contrail

After landing this new service, there ase some puppet
styles misalignments.

These changes are in favor of start using puppet-lint 2.0.0

2016-09-12 08:55:07.952492 | manifests/network/contrail/analytics.pp:130:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952573 | manifests/network/contrail/config.pp:117:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952604 | manifests/network/contrail/config.pp:118:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952632 | manifests/network/contrail/config.pp:119:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952660 | manifests/network/contrail/config.pp:120:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952688 | manifests/network/contrail/control.pp:95:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952717 | manifests/network/contrail/control.pp:96:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952745 | manifests/network/contrail/control.pp:97:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952773 | manifests/network/contrail/database.pp:37:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952800 | manifests/network/contrail/webui.pp:80:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952828 | manifests/network/contrail/webui.pp:81:WARNING: optional parameter listed before required parameter
2016-09-12 08:55:07.952856 | manifests/network/contrail/webui.pp:82:WARNING: optional parameter listed before required parameter

Change-Id: Id45d2daf49bfd081ceb074a2687306a7ac977da8
This commit is contained in:
Carlos Camacho
2016-09-12 14:37:37 +02:00
parent cbd84e7e52
commit 88cb4d49d1
5 changed files with 247 additions and 224 deletions

View File

@@ -19,129 +19,138 @@
#
# == Parameters:
#
# [*admin_password*]
# (required) admin password
# String value.
#
# [*admin_tenant_name*]
# (required) admin tenant name.
# String value.
#
# [*admin_token*]
# (required) admin token
# String value.
#
# [*admin_user*]
# (required) admin user name.
# String value.
#
# [*auth_host*]
# (required) keystone server ip address
# String (IPv4) value.
#
# [*cassandra_server_list*]
# (required) List IPs+port of Cassandra servers
# Array of strings value.
#
# [*disc_server_ip*]
# (required) IPv4 address of discovery server.
# String (IPv4) value.
#
# [*host_ip*]
# (required) host IP address of Analytics
# String (IPv4) value.
#
# [*kafka_broker_list*]
# (required) List IPs+port of kafka servers
# Array of strings value.
# [*admin_password*]
# (optional) admin password
# String value.
# Defaults to hiera('contrail::admin_password')
#
# [*zk_server_ip*]
# (required) List IPs+port of Zookeeper servers
# Array of strings value.
# [*admin_tenant_name*]
# (optional) admin tenant name.
# String value.
# Defaults to hiera('contrail::admin_tenant_name')
#
# [*admin_token*]
# (optional) admin token
# String value.
# Defaults to hiera('contrail::admin_token')
#
# [*admin_user*]
# (optional) admin user name.
# String value.
# Defaults to hiera('contrail::admin_user')
#
# [*auth_host*]
# (optional) keystone server ip address
# String (IPv4) value.
# Defaults to hiera('contrail::auth_host')
#
# [*auth_port*]
# (required) keystone port.
# (optional) keystone port.
# Integer value.
# Defaults to 35357.
# Defaults to hiera('contrail::auth_port')
#
# [*auth_protocol*]
# (required) authentication protocol.
# (optional) authentication protocol.
# String value.
# Defaults to http.
# Defaults to hiera('contrail::auth_protocol')
#
# [*cassandra_server_list*]
# (optional) List IPs+port of Cassandra servers
# Array of strings value.
# Defaults to hiera('contrail::cassandra_server_list')
#
# [*collector_http_server_port*]
# (required) Collector http port
# (optional) Collector http port
# Integer value.
# Defaults to 8089
#
# [*collector_sandesh_port*]
# (required) Collector sandesh port
# (optional) Collector sandesh port
# Integer value.
# Defaults to 8086
#
# [*disc_server_ip*]
# (optional) IPv4 address of discovery server.
# String (IPv4) value.
# Defaults to hiera('contrail::disc_server_ip')
#
# [*disc_server_port*]
# (required) port Discovery server listens on.
# (optional) port Discovery server listens on.
# Integer value.
# Defaults to 5998
# Defaults to hiera('contrail::disc_server_port')
#
# [*http_server_port*]
# (required) Analytics http port
# (optional) Analytics http port
# Integer value.
# Defaults to 8090
#
# [*insecure*]
# (required) insecure mode.
# (optional) insecure mode.
# Boolean value.
# Defaults to false
# Defaults to falsehiera('contrail::insecure')
#
# [*redis_server*]
# (required) IPv4 address of redis server.
# String (IPv4) value.
# Defaults to '127.0.0.1'.
#
# [*redis_server_port*]
# (required) port Redis server listens on.
# Integer value.
# Defaults to 6379
#
# [*rest_api_ip*]
# (required) IP address Analytics rest interface listens on
# String (IPv4) value.
# Defaults to '0.0.0.0'
#
# [*rest_api_port*]
# (required) Analytics rest port
# Integer value.
# Defaults to 8081
# [*kafka_broker_list*]
# (optional) List IPs+port of kafka servers
# Array of strings value.
# Defaults to hiera('contrail::kafka_broker_list')
#
# [*memcached_servers*]
# (optional) IPv4 address of memcached servers
# String (IPv4) value + port
# Defaults to '127.0.0.1:12111'
# Defaults to hiera('contrail::memcached_server')
#
# [*redis_server*]
# (optional) IPv4 address of redis server.
# String (IPv4) value.
# Defaults to '127.0.0.1'.
#
# [*redis_server_port*]
# (optional) port Redis server listens on.
# Integer value.
# Defaults to 6379
#
# [*rest_api_ip*]
# (optional) IP address Analytics rest interface listens on
# String (IPv4) value.
# Defaults to '0.0.0.0'
#
# [*rest_api_port*]
# (optional) Analytics rest port
# Integer value.
# Defaults to 8081
#
# [*zk_server_ip*]
# (optional) List IPs+port of Zookeeper servers
# Array of strings value.
# Defaults to hiera('contrail::zk_server_ip')
#
class tripleo::network::contrail::analytics(
$host_ip,
$admin_password = hiera('contrail::admin_password'),
$admin_tenant_name = hiera('contrail::admin_tenant_name'),
$admin_token = hiera('contrail::admin_token'),
$admin_user = hiera('contrail::admin_user'),
$auth_host = hiera('contrail::auth_host'),
$cassandra_server_list = hiera('contrail::cassandra_server_list'),
$disc_server_ip = hiera('contrail::disc_server_ip'),
$host_ip,
$kafka_broker_list = hiera('contrail::kafka_broker_list'),
$zk_server_ip = hiera('contrail::zk_server_ip'),
$auth_port = hiera('contrail::auth_port'),
$auth_protocol = hiera('contrail::auth_protocol'),
$cassandra_server_list = hiera('contrail::cassandra_server_list'),
$collector_http_server_port = 8089,
$collector_sandesh_port = 8086,
$disc_server_ip = hiera('contrail::disc_server_ip'),
$disc_server_port = hiera('contrail::disc_server_port'),
$http_server_port = 8090,
$insecure = hiera('contrail::insecure'),
$kafka_broker_list = hiera('contrail::kafka_broker_list'),
$memcached_servers = hiera('contrail::memcached_server'),
$redis_server = '127.0.0.1',
$redis_server_port = 6379,
$rest_api_ip = '0.0.0.0',
$rest_api_port = 8081,
$memcached_servers = hiera('contrail::memcached_server'),
$zk_server_ip = hiera('contrail::zk_server_ip'),
)
{
class {'::contrail::keystone':

View File

@@ -19,34 +19,6 @@
#
# == Parameters:
#
# [*admin_password*]
# (required) admin password
# String value.
#
# [*admin_tenant_name*]
# (required) admin tenant name.
# String value.
#
# [*admin_token*]
# (required) admin token
# String value.
#
# [*admin_user*]
# (required) admin user name.
# String value.
#
# [*auth_host*]
# (required) keystone server ip address
# String (IPv4) value.
#
# [*cassandra_server_list*]
# (required) List IPs+port of Cassandra servers
# Array of strings value.
#
# [*disc_server_ip*]
# (required) IPv4 address of discovery server.
# String (IPv4) value.
#
# [*ifmap_password*]
# (required) ifmap password
# String value.
@@ -63,71 +35,107 @@
# (required) IPv4 address of rabbit server.
# String (IPv4) value.
#
# [*zk_server_ip*]
# (required) List IPs+port of Zookeeper servers
# Array of strings value.
# [*admin_password*]
# (optional) admin password
# String value.
# Defaults to hiera('contrail::admin_password')
#
# [*admin_tenant_name*]
# (optional) admin tenant name.
# String value.
# Defaults to hiera('contrail::admin_tenant_name')
#
# [*admin_token*]
# (optional) admin token
# String value.
# Defaults to hiera('contrail::admin_token')
#
# [*admin_user*]
# (optional) admin user name.
# String value.
# Defaults to hiera('contrail::admin_user')
#
# [*auth*]
# (required) Authentication method.
# Defaults to 'keystone'.
# (optional) Authentication method.
# Defaults to hiera('contrail::auth')
#
# [*auth_host*]
# (optional) keystone server ip address
# String (IPv4) value.
# Defaults to hiera('contrail::auth_host')
#
# [*auth_port*]
# (required) keystone port.
# Defaults to 35357.
# (optional) keystone port.
# Defaults to hiera('contrail::auth_port')
#
# [*auth_protocol*]
# (required) authentication protocol.
# Defaults to http.
# (optional) authentication protocol.
# Defaults to hiera('contrail::auth_protocol')
#
# [*cassandra_server_list*]
# (optional) List IPs+port of Cassandra servers
# Array of strings value.
# Defaults to hiera('contrail::cassandra_server_list')
#
# [*disc_server_ip*]
# (optional) IPv4 address of discovery server.
# String (IPv4) value.
# Defaults to hiera('contrail::disc_server_ip')
#
# [*insecure*]
# (required) insecure mode.
# Defaults to false
# (optional) insecure mode.
# Defaults to hiera('contrail::insecure')
#
# [*listen_ip_address*]
# (required) IP address to listen on.
# (optional) IP address to listen on.
# String (IPv4) value.
# Defaults to '0.0.0.0'.
# Defaults to '0.0.0.0'
#
# [*listen_port*]
# (required) Listen port for config-api
# Defaults to 8082.
# (optional) Listen port for config-api
# Defaults to 8082
#
# [*memcached_servers*]
# (optional) IPv4 address of memcached servers
# String (IPv4) value + port
# Defaults to '127.0.0.1:12111'
# Defaults to hiera('contrail::memcached_server')
#
# [*multi_tenancy*]
# (required) Defines if mutli-tenancy is enabled.
# Defaults to 'true'.
# (optional) Defines if mutli-tenancy is enabled.
# Defaults to hiera('contrail::multi_tenancy')
#
# [*redis_server*]
# (required) IPv4 address of redis server.
# (optional) IPv4 address of redis server.
# String (IPv4) value.
# Defaults to '127.0.0.1'.
# Defaults to '127.0.0.1'
#
# [*zk_server_ip*]
# (optional) List IPs+port of Zookeeper servers
# Array of strings value.
# Defaults to hiera('contrail::zk_server_ip')
#
class tripleo::network::contrail::config(
$admin_password = hiera('contrail::admin_password'),
$admin_tenant_name = hiera('contrail::admin_tenant_name'),
$admin_token = hiera('contrail::admin_token'),
$admin_user = hiera('contrail::admin_user'),
$auth_host = hiera('contrail::auth_host'),
$cassandra_server_list = hiera('contrail::cassandra_server_list'),
$disc_server_ip = hiera('contrail::disc_server_ip'),
$ifmap_password,
$ifmap_server_ip,
$ifmap_username,
$rabbit_server,
$zk_server_ip = hiera('contrail::zk_server_ip'),
$admin_password = hiera('contrail::admin_password'),
$admin_tenant_name = hiera('contrail::admin_tenant_name'),
$admin_token = hiera('contrail::admin_token'),
$admin_user = hiera('contrail::admin_user'),
$auth = hiera('contrail::auth'),
$auth_host = hiera('contrail::auth_host'),
$auth_port = hiera('contrail::auth_port'),
$auth_protocol = hiera('contrail::auth_protocol'),
$cassandra_server_list = hiera('contrail::cassandra_server_list'),
$disc_server_ip = hiera('contrail::disc_server_ip'),
$insecure = hiera('contrail::insecure'),
$listen_ip_address = '0.0.0.0',
$listen_port = 8082,
$memcached_servers = hiera('contrail::memcached_server'),
$multi_tenancy = hiera('contrail::multi_tenancy'),
$redis_server = '127.0.0.1',
$zk_server_ip = hiera('contrail::zk_server_ip'),
)
{
validate_ip_address($listen_ip_address)

View File

@@ -19,30 +19,6 @@
#
# == Parameters:
#
# [*admin_password*]
# (required) admin password
# String value.
#
# [*admin_tenant_name*]
# (required) admin tenant name.
# String value.
#
# [*admin_token*]
# (required) admin token
# String value.
#
# [*admin_user*]
# (required) admin user name.
# String value.
#
# [*auth_host*]
# (required) keystone server ip address
# String (IPv4) value.
#
# [*disc_server_ip*]
# (required) IPv4 address of discovery server.
# String (IPv4) value.
#
# [*host_ip*]
# (required) host IP address of Control
# String (IPv4) value.
@@ -51,52 +27,75 @@
# (required) ifmap password
# String value.
#
# [*ifmap_server_ip*]
# (required) ifmap server ip address.
# String value.
#
# [*ifmap_username*]
# (required) ifmap username
# (optional) ifmap username
# String value.
# Defaults to hiera('contrail::ifmap_username'),
#
# [*admin_password*]
# (optional) admin password
# String value.
# Defaults to hiera('contrail::admin_password'),
#
# [*admin_tenant_name*]
# (optional) admin tenant name.
# String value.
# Defaults to hiera('contrail::admin_tenant_name'),
#
# [*admin_token*]
# (optional) admin token
# String value.
# Defaults to hiera('contrail::admin_token'),
#
# [*admin_user*]
# (optional) admin user name.
# String value.
# Defaults to hiera('contrail::admin_user'),
#
# [*auth_host*]
# (optional) keystone server ip address
# String (IPv4) value.
# Defaults to hiera('contrail::auth_host'),
#
# [*auth_port*]
# (required) keystone port.
# Defaults to 35357.
# (optional) keystone port.
# Defaults to hiera('contrail::auth_port'),
#
# [*auth_protocol*]
# (required) authentication protocol.
# Defaults to http.
# (optional) authentication protocol.
# Defaults to hiera('contrail::auth_protocol'),
#
# [*disc_server_ip*]
# (optional) IPv4 address of discovery server.
# String (IPv4) value.
# Defaults to hiera('contrail::disc_server_ip'),
#
# [*disc_server_port*]
# (required) port Discovery server listens on.
# (optional) port Discovery server listens on.
# Integer value.
# Defaults to 5998
# Defaults to hiera('contrail::disc_server_port'),
#
# [*insecure*]
# (required) insecure mode.
# Defaults to false
# (optional) insecure mode.
# Defaults to hiera('contrail::insecure'),
#
# [*memcached_servers*]
# (optional) IPv4 address of memcached servers
# String (IPv4) value + port
# Defaults to '127.0.0.1:12111'
#
# [*multi_tenancy*]
# (required) Defines if mutli-tenancy is enabled.
# Defaults to 'true'.
# Defaults to hiera('contrail::memcached_servers'),
#
class tripleo::network::contrail::control(
$admin_tenant_name = hiera('contrail::admin_tenant_name'),
$admin_token = hiera('contrail::admin_token'),
$admin_password = hiera('contrail::admin_password'),
$admin_user = hiera('contrail::admin_user'),
$auth_host = hiera('contrail::auth_host'),
$disc_server_ip = hiera('contrail::disc_server_ip'),
$host_ip,
$ifmap_password,
$ifmap_username,
$admin_password = hiera('contrail::admin_password'),
$admin_tenant_name = hiera('contrail::admin_tenant_name'),
$admin_token = hiera('contrail::admin_token'),
$admin_user = hiera('contrail::admin_user'),
$auth_host = hiera('contrail::auth_host'),
$auth_port = hiera('contrail::auth_port'),
$auth_protocol = hiera('contrail::auth_protocol'),
$disc_server_ip = hiera('contrail::disc_server_ip'),
$disc_server_port = hiera('contrail::disc_server_port'),
$insecure = hiera('contrail::insecure'),
$memcached_servers = hiera('contrail::memcached_server'),

View File

@@ -19,22 +19,23 @@
#
# == Parameters:
#
# [*disc_server_ip*]
# (required) IPv4 address of discovery server.
# String (IPv4) value.
#
# [*host_ip*]
# (required) host IP address of Database node
# String (IPv4) value.
#
# [*disc_server_ip*]
# (optional) IPv4 address of discovery server.
# String (IPv4) value.
# Defaults to hiera('contrail::disc_server_ip')
#
# [*disc_server_port*]
# (required) port Discovery server listens on.
# (optional) port Discovery server listens on.
# Integer value.
# Defaults to 5998
# Defaults to hiera('contrail::disc_server_port')
#
class tripleo::network::contrail::database(
$disc_server_ip = hiera('contrail::disc_server_ip'),
$host_ip,
$disc_server_ip = hiera('contrail::disc_server_ip'),
$disc_server_port = hiera('contrail::disc_server_port'),
)
{

View File

@@ -19,30 +19,6 @@
#
# == Parameters:
#
# [*admin_password*]
# (required) admin password
# String value.
#
# [*admin_tenant_name*]
# (required) admin tenant name.
# String value.
#
# [*admin_token*]
# (required) admin token
# String value.
#
# [*admin_user*]
# (required) admin user name.
# String value.
#
# [*auth_host*]
# (required) keystone server ip address
# String (IPv4) value.
#
# [*cassandra_server_list*]
# (required) List IPs+port of Cassandra servers
# Array of strings value.
#
# [*contrail_analytics_vip*]
# (required) VIP of Contrail Analytics
# String (IPv4) value.
@@ -55,48 +31,78 @@
# (required) VIP of Neutron
# String (IPv4) value.
#
# [*admin_password*]
# (optional) admin password
# String value.
# Defaults to hiera('contrail::admin_password')
#
# [*admin_tenant_name*]
# (optional) admin tenant name.
# String value.
# Defaults to hiera('contrail::admin_tenant_name')
#
# [*admin_token*]
# (optional) admin token
# String value.
# Defaults to hiera('contrail::admin_token')
#
# [*admin_user*]
# (optional) admin user name.
# String value.
# Defaults to hiera('contrail::admin_user')
#
# [*auth_host*]
# (optional) keystone server ip address
# String (IPv4) value.
# Defaults to hiera('contrail::auth_host')
#
# [*cassandra_server_list*]
# (optional) List IPs+port of Cassandra servers
# Array of strings value.
# Defaults to hiera('contrail::cassandra_server_list')
#
# [*contrail_webui_http_port*]
# (required) Webui HTTP Port
# (optional) Webui HTTP Port
# Integer value.
# Defaults to 8080
#
# [*contrail_webui_https_port*]
# (required) Webui HTTPS Port
# (optional) Webui HTTPS Port
# Integer value.
# Defaults to 8143
#
# [*redis_ip*]
# (required) IP of Redis
# (optional) IP of Redis
# String (IPv4) value.
# Defaults to '127.0.0.1'
#
class tripleo::network::contrail::webui(
$contrail_analytics_vip,
$contrail_config_vip,
$neutron_vip,
$admin_password = hiera('contrail::admin_password'),
$admin_tenant_name = hiera('contrail::admin_tenant_name'),
$admin_token = hiera('contrail::admin_token'),
$admin_user = hiera('contrail::admin_user'),
$auth_host = hiera('contrail::auth_host'),
$cassandra_server_list = hiera('contrail::cassandra_server_list'),
$contrail_analytics_vip,
$contrail_config_vip,
$neutron_vip,
$contrail_webui_http_port = 8080,
$contrail_webui_https_port = 8143,
$redis_ip = '127.0.0.1',
)
{
class {'::contrail::webui':
openstack_vip => $auth_host,
contrail_config_vip => $contrail_config_vip,
contrail_analytics_vip => $contrail_analytics_vip,
neutron_vip => $neutron_vip,
cassandra_ip => $cassandra_server_list,
redis_ip => $redis_ip,
contrail_webui_http_port => $contrail_webui_http_port,
contrail_webui_https_port => $contrail_webui_https_port,
admin_user => $admin_user,
admin_password => $admin_password,
admin_token => $admin_token,
admin_tenant_name => $admin_tenant_name,
openstack_vip => $auth_host,
contrail_config_vip => $contrail_config_vip,
contrail_analytics_vip => $contrail_analytics_vip,
neutron_vip => $neutron_vip,
cassandra_ip => $cassandra_server_list,
redis_ip => $redis_ip,
contrail_webui_http_port => $contrail_webui_http_port,
contrail_webui_https_port => $contrail_webui_https_port,
admin_user => $admin_user,
admin_password => $admin_password,
admin_token => $admin_token,
admin_tenant_name => $admin_tenant_name,
}
}