Sha256: a013aab02db6e88be2b20214b6907886f40908ff2b67aabbf8b353dac96323c5

Contents?: true

Size: 611 Bytes

Versions: 4

Compression:

Stored size: 611 Bytes

Contents

require 'fog/huaweicloud/models/collection'
require 'fog/container_infra/huaweicloud/models/bay_model'

module Fog
  module ContainerInfra
    class HuaweiCloud
      class BayModels < Fog::HuaweiCloud::Collection
        model Fog::ContainerInfra::HuaweiCloud::BayModel

        def all
          load_response(service.list_bay_models, 'baymodels')
        end

        def get(bay_model_uuid_or_name)
          resource = service.get_bay_model(bay_model_uuid_or_name).body
          new(resource)
        rescue Fog::ContainerInfra::HuaweiCloud::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-huaweicloud-0.0.3 lib/fog/container_infra/huaweicloud/models/bay_models.rb
fog-huaweicloud-0.0.2 lib/fog/container_infra/huaweicloud/models/bay_models.rb
fog-huaweicloud-0.1.3 lib/fog/container_infra/huaweicloud/models/bay_models.rb
fog-huaweicloud-0.1.2 lib/fog/container_infra/huaweicloud/models/bay_models.rb