63688a14e5
This change implements storage policies as defined by swift: http://docs.openstack.org/developer/swift/overview_policies.html There are two primary areas of change in this review - Add storage policy support to the ringbuilder and ring devices, along with associated spec tests. - Adding storage policy support and enforcing rules in swift.conf using the swift_storage_policy type and provider. Also: updated spec tests and an update to swift acceptance test to use storage policies to configure an additional 3 replica based ring. See release notes and the README update for more details/instructions. Change-Id: I2b8db751790704df3f1027a14f61e231591537f3
21 lines
455 B
Ruby
21 lines
455 B
Ruby
require File.join(File.dirname(__FILE__), '..', 'swift_ring_builder')
|
|
Puppet::Type.type(:ring_account_device).provide(
|
|
:swift_ring_builder,
|
|
:parent => Puppet::Provider::SwiftRingBuilder
|
|
) do
|
|
|
|
optional_commands :swift_ring_builder => 'swift-ring-builder'
|
|
|
|
def prefetch(resource)
|
|
@my_ring = lookup_ring
|
|
end
|
|
|
|
def ring
|
|
@my_ring ||= lookup_ring
|
|
end
|
|
|
|
def self.builder_file_path(policy_index)
|
|
'/etc/swift/account.builder'
|
|
end
|
|
end
|