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:
@@ -187,7 +187,7 @@ class openstack::provision(
|
|||||||
Keystone_user[$alt_username],
|
Keystone_user[$alt_username],
|
||||||
Glance_image[$image_name],
|
Glance_image[$image_name],
|
||||||
Quantum_network[$public_network_name],
|
Quantum_network[$public_network_name],
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
17
manifests/swift/device_endpoint.pp
Normal file
17
manifests/swift/device_endpoint.pp
Normal 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,
|
||||||
|
}
|
||||||
|
}
|
@@ -41,22 +41,7 @@ class openstack::swift::storage-node (
|
|||||||
storage_local_net_ip => $swift_local_net_ip,
|
storage_local_net_ip => $swift_local_net_ip,
|
||||||
}
|
}
|
||||||
|
|
||||||
define device_endpoint ($swift_local_net_ip, $zone, $weight) {
|
openstack::swift::device_endpoint { $storage_devices:
|
||||||
@@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:
|
|
||||||
swift_local_net_ip => $swift_local_net_ip,
|
swift_local_net_ip => $swift_local_net_ip,
|
||||||
zone => $swift_zone,
|
zone => $swift_zone,
|
||||||
weight => $storage_weight,
|
weight => $storage_weight,
|
||||||
|
Reference in New Issue
Block a user