Sha256: 041649847a9b61af1713fc9c1664c987b0f0c08a0cb71c952e969c14621653f9
Contents?: true
Size: 1.28 KB
Versions: 4
Compression:
Stored size: 1.28 KB
Contents
require_relative 'base' module Fog module ContainerInfra class HuaweiCloud class Bay < Fog::ContainerInfra::HuaweiCloud::Base identity :uuid attribute :api_address attribute :coe_version attribute :baymodel_id attribute :create_timeout attribute :created_at attribute :discovery_url attribute :master_addresses attribute :master_count attribute :name attribute :node_addresses attribute :node_count attribute :stack_id attribute :status attribute :status_reason attribute :updated_at def create requires :name, :baymodel_id merge_attributes(service.create_bay(attributes).body) self end def update requires :uuid, :name, :baymodel_id attrs = attributes.select{|k,_| allowed_update_attributes.include? k} attrs = convert_update_params(attrs) merge_attributes(service.update_bay(uuid, attrs).body) self end def destroy requires :uuid service.delete_bay(uuid) true end private def allowed_update_attributes [ :node_count ] end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems