Module: Misty::Microversion
- Included in:
- Openstack::API::Cinder::V3, Openstack::API::Ironic::V1, Openstack::API::Manila::V2, Openstack::API::Nova::V2_1, Openstack::API::Placement::V2_1
- Defined in:
- lib/misty/microversion.rb,
lib/misty/errors.rb
Overview
Handles OpenStack Services supporting Microversion feature
Defined Under Namespace
Classes: VersionError
Instance Method Summary collapse
Instance Method Details
#microversion_header(version) ⇒ Object
18 19 20 |
# File 'lib/misty/microversion.rb', line 18 def microversion_header(version) {'X-Openstack-API-Version' => "#{service_types[0]} #{version}" } end |
#set_version(version) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/misty/microversion.rb', line 4 def set_version(version) case version when nil || '' # TODO: # version_discovery when 'latest' 'latest' when /^([1-9]+\d*)\.([1-9]+\d*)$/ version if version_match(version) else raise VersionError, ":version must be '<number.number>' or 'latest'" end end |