Sha256: b51d6c16039aca5addf4e8bec3f8a3904d8e04efe39ddfeb0da9e82c6564d312

Contents?: true

Size: 632 Bytes

Versions: 4

Compression:

Stored size: 632 Bytes

Contents

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

module Fog
  module ContainerInfra
    class HuaweiCloud
      class Certificates < Fog::HuaweiCloud::Collection

        model Fog::ContainerInfra::HuaweiCloud::Certificate

        def create(bay_uuid)
          resource = service.create_certificate(bay_uuid).body
          new(resource)
        end

        def get(bay_uuid)
          resource = service.get_certificate(bay_uuid).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/certificates.rb
fog-huaweicloud-0.0.2 lib/fog/container_infra/huaweicloud/models/certificates.rb
fog-huaweicloud-0.1.3 lib/fog/container_infra/huaweicloud/models/certificates.rb
fog-huaweicloud-0.1.2 lib/fog/container_infra/huaweicloud/models/certificates.rb