Fix puppet-lint failures

This commit does two things to resolve
puppet-lint failures:

1. Split device_endpoint into its own file

Previously, the device_endpoint class was
defined inside of the storage-node.pp class.

This resulted in puppet-lint failures.

This commit moves the define to its own
file in order to conform to module
standards.

2. Modify spacing of a line in openstack::provision

This second change is actually a limitation in puppet-lint,
I have file: https://github.com/rodjek/puppet-lint/issues/213
to track it.

Change-Id: If83eb7fb740c5632711da6ab0f91bf6220c5830e
This commit is contained in:
Dan Bode
2013-08-07 13:20:33 -07:00
parent de4a3b350d
commit 3c9c0e4d06
3 changed files with 19 additions and 17 deletions

View File

@@ -187,7 +187,7 @@ class openstack::provision(
Keystone_user[$alt_username],
Glance_image[$image_name],
Quantum_network[$public_network_name],
],
],
}
}

View File

@@ -0,0 +1,17 @@
#
# Exports endpoints for all swift devices
#
define openstack::swift::device_endpoint ($swift_local_net_ip, $zone, $weight) {
@@ring_object_device { "${swift_local_net_ip}:6000/${name}":
zone => $zone,
weight => $weight,
}
@@ring_container_device { "${swift_local_net_ip}:6001/${name}":
zone => $zone,
weight => $weight,
}
@@ring_account_device { "${swift_local_net_ip}:6002/${name}":
zone => $zone,
weight => $weight,
}
}

View File

@@ -41,22 +41,7 @@ class openstack::swift::storage-node (
storage_local_net_ip => $swift_local_net_ip,
}
define device_endpoint ($swift_local_net_ip, $zone, $weight) {
@@ring_object_device { "${swift_local_net_ip}:6000/${name}":
zone => $zone,
weight => $weight,
}
@@ring_container_device { "${swift_local_net_ip}:6001/${name}":
zone => $zone,
weight => $weight,
}
@@ring_account_device { "${swift_local_net_ip}:6002/${name}":
zone => $zone,
weight => $weight,
}
}
device_endpoint { $storage_devices:
openstack::swift::device_endpoint { $storage_devices:
swift_local_net_ip => $swift_local_net_ip,
zone => $swift_zone,
weight => $storage_weight,