Class: Fog::Ecloud::MockDataClasses::MockData

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/ecloud/mock_data_classes.rb

Instance Method Summary collapse

Methods inherited from Base

#_parent, base_url, #base_url, base_url=, #first, #href, #initialize, #inspect, #last

Methods inherited from Hash

#symbolize_keys!

Constructor Details

This class inherits a constructor from Fog::Ecloud::MockDataClasses::Base

Instance Method Details

#all_backup_internet_servicesObject



123
124
125
# File 'lib/fog/ecloud/mock_data_classes.rb', line 123

def all_backup_internet_services
  all_vdc_internet_service_collections.map(&:backup_internet_services).flatten
end

#all_catalog_itemsObject



83
84
85
# File 'lib/fog/ecloud/mock_data_classes.rb', line 83

def all_catalog_items
  all_catalogs.map(&:items).flatten
end

#all_catalogsObject



75
76
77
# File 'lib/fog/ecloud/mock_data_classes.rb', line 75

def all_catalogs
  all_vdcs.map(&:catalog).flatten
end

#all_network_extensionsObject



107
108
109
# File 'lib/fog/ecloud/mock_data_classes.rb', line 107

def all_network_extensions
  all_networks.map(&:extensions).flatten
end

#all_network_ip_collectionsObject



179
180
181
# File 'lib/fog/ecloud/mock_data_classes.rb', line 179

def all_network_ip_collections
  all_networks.map(&:ip_collection)
end

#all_network_ipsObject



187
188
189
# File 'lib/fog/ecloud/mock_data_classes.rb', line 187

def all_network_ips
  all_network_ip_collections.map {|c| c.items.values }.flatten
end

#all_networksObject



99
100
101
# File 'lib/fog/ecloud/mock_data_classes.rb', line 99

def all_networks
  all_vdcs.map(&:networks).flatten
end

#all_organizationsObject



59
60
61
# File 'lib/fog/ecloud/mock_data_classes.rb', line 59

def all_organizations
  organizations.map(&:environments).flatten
end

#all_public_ip_collectionsObject



131
132
133
# File 'lib/fog/ecloud/mock_data_classes.rb', line 131

def all_public_ip_collections
  all_vdcs.map {|v| v.public_ip_collection }.flatten
end

#all_public_ip_internet_service_collectionsObject



147
148
149
# File 'lib/fog/ecloud/mock_data_classes.rb', line 147

def all_public_ip_internet_service_collections
  all_public_ips.map(&:internet_service_collection).flatten
end

#all_public_ip_internet_service_node_collectionsObject



163
164
165
# File 'lib/fog/ecloud/mock_data_classes.rb', line 163

def all_public_ip_internet_service_node_collections
  all_public_ip_internet_services.map(&:node_collection).flatten
end

#all_public_ip_internet_service_nodesObject



171
172
173
# File 'lib/fog/ecloud/mock_data_classes.rb', line 171

def all_public_ip_internet_service_nodes
  all_public_ip_internet_service_node_collections.map(&:items).flatten
end

#all_public_ip_internet_servicesObject



155
156
157
# File 'lib/fog/ecloud/mock_data_classes.rb', line 155

def all_public_ip_internet_services
  all_public_ip_internet_service_collections.map(&:items).flatten
end

#all_public_ipsObject



139
140
141
# File 'lib/fog/ecloud/mock_data_classes.rb', line 139

def all_public_ips
  all_public_ip_collections.map(&:items).flatten
end

#all_vdc_internet_service_collectionsObject



115
116
117
# File 'lib/fog/ecloud/mock_data_classes.rb', line 115

def all_vdc_internet_service_collections
  all_vdcs.map(&:internet_service_collection).flatten
end

#all_vdcsObject



67
68
69
# File 'lib/fog/ecloud/mock_data_classes.rb', line 67

def all_vdcs
  organizations.map(&:environments).flatten
end

#all_virtual_machinesObject



91
92
93
# File 'lib/fog/ecloud/mock_data_classes.rb', line 91

def all_virtual_machines
  all_vdcs.map(&:virtual_machines).flatten
end

#backup_internet_service_from_href(href) ⇒ Object



127
128
129
# File 'lib/fog/ecloud/mock_data_classes.rb', line 127

def backup_internet_service_from_href(href)
  find_href_in(href, all_backup_internet_services)
end

#catalog_from_href(href) ⇒ Object



79
80
81
# File 'lib/fog/ecloud/mock_data_classes.rb', line 79

def catalog_from_href(href)
  find_href_in(href, all_catalogs)
end

#catalog_item_from_href(href) ⇒ Object



87
88
89
# File 'lib/fog/ecloud/mock_data_classes.rb', line 87

def catalog_item_from_href(href)
  find_href_in(href, all_catalog_items)
end

#network_extension_from_href(href) ⇒ Object



111
112
113
# File 'lib/fog/ecloud/mock_data_classes.rb', line 111

def network_extension_from_href(href)
  find_href_in(href, all_network_extensions)
end

#network_from_href(href) ⇒ Object



103
104
105
# File 'lib/fog/ecloud/mock_data_classes.rb', line 103

def network_from_href(href)
  find_href_in(href, all_networks)
end

#network_ip_collection_from_href(href) ⇒ Object



183
184
185
# File 'lib/fog/ecloud/mock_data_classes.rb', line 183

def network_ip_collection_from_href(href)
  find_href_in(href, all_network_ip_collections)
end

#network_ip_from_href(href) ⇒ Object



191
192
193
# File 'lib/fog/ecloud/mock_data_classes.rb', line 191

def network_ip_from_href(href)
  find_href_in(href, all_network_ips)
end

#organization_collection_from_href(href) ⇒ Object



55
56
57
# File 'lib/fog/ecloud/mock_data_classes.rb', line 55

def organization_collection_from_href(href)
  find_href_in(href, all_organizations)
end

#organization_from_href(href) ⇒ Object



63
64
65
# File 'lib/fog/ecloud/mock_data_classes.rb', line 63

def organization_from_href(href)
  find_href_in(href, all_organizations)
end

#organizationsObject



51
52
53
# File 'lib/fog/ecloud/mock_data_classes.rb', line 51

def organizations
  @organizations ||= []
end

#public_ip_collection_from_href(href) ⇒ Object



135
136
137
# File 'lib/fog/ecloud/mock_data_classes.rb', line 135

def public_ip_collection_from_href(href)
  find_href_in(href, all_public_ip_collections)
end

#public_ip_from_href(href) ⇒ Object



143
144
145
# File 'lib/fog/ecloud/mock_data_classes.rb', line 143

def public_ip_from_href(href)
  find_href_in(href, all_public_ips)
end

#public_ip_internet_service_collection_from_href(href) ⇒ Object



151
152
153
# File 'lib/fog/ecloud/mock_data_classes.rb', line 151

def public_ip_internet_service_collection_from_href(href)
  find_href_in(href, all_public_ip_internet_service_collections)
end

#public_ip_internet_service_from_href(href) ⇒ Object



159
160
161
# File 'lib/fog/ecloud/mock_data_classes.rb', line 159

def public_ip_internet_service_from_href(href)
  find_href_in(href, all_public_ip_internet_services)
end

#public_ip_internet_service_node_collection_from_href(href) ⇒ Object



167
168
169
# File 'lib/fog/ecloud/mock_data_classes.rb', line 167

def public_ip_internet_service_node_collection_from_href(href)
  find_href_in(href, all_public_ip_internet_service_node_collections)
end

#public_ip_internet_service_node_from_href(href) ⇒ Object



175
176
177
# File 'lib/fog/ecloud/mock_data_classes.rb', line 175

def public_ip_internet_service_node_from_href(href)
  find_href_in(href, all_public_ip_internet_service_nodes)
end

#vdc_from_href(href) ⇒ Object



71
72
73
# File 'lib/fog/ecloud/mock_data_classes.rb', line 71

def vdc_from_href(href)
  find_href_in(href, all_vdcs)
end

#vdc_internet_service_collection_from_href(href) ⇒ Object



119
120
121
# File 'lib/fog/ecloud/mock_data_classes.rb', line 119

def vdc_internet_service_collection_from_href(href)
  find_href_in(href, all_vdc_internet_service_collections)
end

#versionsObject



47
48
49
# File 'lib/fog/ecloud/mock_data_classes.rb', line 47

def versions
  @versions ||= []
end

#virtual_machine_from_href(href) ⇒ Object



95
96
97
# File 'lib/fog/ecloud/mock_data_classes.rb', line 95

def virtual_machine_from_href(href)
  find_href_prefixed_in(href, all_virtual_machines)
end