Sha256: 82d925f2ba42d3700c450969944c0a98f7d32e72b82df9bbbb0a2cfafb7dc9d6
Contents?: true
Size: 902 Bytes
Versions: 13
Compression:
Stored size: 902 Bytes
Contents
require 'fog/ecloud/models/compute/role' module Fog module Compute class Ecloud class Roles < Fog::Ecloud::Collection identity :href model Fog::Compute::Ecloud::Role def all data = connection.get_roles(href).body if data[:OrganizationRole] load(data[:OrganizationRole]) else r_data = [] data[:EnvironmentRoles][:EnvironmentRole].each do |d| d[:Environment][:EnvironmentName] = d[:Environment][:name] d[:Environment] = d[:Environment].merge(d[:Role]) if d[:Role] r_data << d[:Environment] end load(r_data) end end def get(uri) if data = connection.get_role(uri) new(data.body) end rescue Fog::Errors::NotFound nil end end end end end
Version data entries
13 entries across 13 versions & 7 rubygems