Sha256: 141fcc708bbcbbc81dac403fd48026cad3d14bacf59281adea4b83c32fa58d4a
Contents?: true
Size: 1.07 KB
Versions: 9
Compression:
Stored size: 1.07 KB
Contents
module Fog module Compute class QingCloud class Real # Describe all or specified vxnets # { API Reference}[https://docs.qingcloud.com/api/vxnet/describe_vxnet_instances.html] def describe_vxnet_instances(vxnet_id, filters = {}) params = { 'action' => 'DescribeVxnetInstances', 'status' => filters['status'] || 'running' }.merge Fog::QingCloud.indexed_param('instances', filters['instance-id']) request(params) end end class Mock def describe_vxnet_instances(vxnet_id, filters = {}) instances = self.data[:instances] instances = instances.select {|i| i['vxnets'].map {|v| v['vxnet_id']}.include?(vxnet_id) } Excon::Response.new( :status => 200, :body => { 'instance_set' => instances, 'action' => 'DescribeVxnetInstancesResponse', 'ret_code' => 0, 'total_count' => instances.length } ) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems