mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Fix circular argument reference warnings for ruby 2.2
This commit is contained in:
parent
35fea34887
commit
c33f631dc2
49 changed files with 151 additions and 151 deletions
|
@ -14,10 +14,10 @@ module Fog
|
|||
super(attributes)
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
def all(filters_arg = filters)
|
||||
data = []
|
||||
next_token = nil
|
||||
self.filters = filters
|
||||
filters = filters_arg
|
||||
loop do
|
||||
result = service.describe_scaling_activities(filters.merge('NextToken' => next_token)).body['DescribeScalingActivitiesResult']
|
||||
data += result['Activities']
|
||||
|
|
|
@ -14,10 +14,10 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
def all(filters_arg = filters)
|
||||
data = []
|
||||
next_token = nil
|
||||
self.filters = filters
|
||||
filters = filters_arg
|
||||
loop do
|
||||
result = service.describe_auto_scaling_groups(filters.merge('NextToken' => next_token)).body['DescribeAutoScalingGroupsResult']
|
||||
data += result['AutoScalingGroups']
|
||||
|
|
|
@ -14,10 +14,10 @@ module Fog
|
|||
super(attributes)
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
def all(filters_arg = filters)
|
||||
data = []
|
||||
next_token = nil
|
||||
self.filters = filters
|
||||
self.filters = filters_arg
|
||||
loop do
|
||||
result = service.describe_policies(filters.merge('NextToken' => next_token)).body['DescribePoliciesResult']
|
||||
data += result['ScalingPolicies']
|
||||
|
|
|
@ -52,12 +52,12 @@ module Fog
|
|||
# >
|
||||
#>>
|
||||
|
||||
def all(filters = filters)
|
||||
unless filters.is_a?(Hash)
|
||||
Fog::Logger.deprecation("all with #{filters.class} param is deprecated, use all('public-ip' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters = {'public-ip' => [*filters]}
|
||||
def all(filters_arg = filters)
|
||||
unless filters_arg.is_a?(Hash)
|
||||
Fog::Logger.deprecation("all with #{filters_arg.class} param is deprecated, use all('public-ip' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters_arg = {'public-ip' => [*filters_arg]}
|
||||
end
|
||||
self.filters = filters
|
||||
self.filters = filters_arg
|
||||
data = service.describe_addresses(filters).body
|
||||
load(
|
||||
data['addressesSet'].map do |address|
|
||||
|
|
|
@ -51,12 +51,12 @@ module Fog
|
|||
#>
|
||||
#
|
||||
|
||||
def all(filters = filters)
|
||||
unless filters.is_a?(Hash)
|
||||
Fog::Logger.warning("all with #{filters.class} param is deprecated, use all('internet-gateway-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters = {'dhcp-options-id' => [*filters]}
|
||||
def all(filters_arg = filters)
|
||||
unless filters_arg.is_a?(Hash)
|
||||
Fog::Logger.warning("all with #{filters_arg.class} param is deprecated, use all('internet-gateway-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters_arg = {'dhcp-options-id' => [*filters_arg]}
|
||||
end
|
||||
self.filters = filters
|
||||
filters = filters_arg
|
||||
data = service.describe_dhcp_options(filters).body
|
||||
load(data['dhcpOptionsSet'])
|
||||
end
|
||||
|
|
|
@ -42,8 +42,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
data = service.describe_images(filters).body
|
||||
load(data['imagesSet'])
|
||||
end
|
||||
|
|
|
@ -51,12 +51,12 @@ module Fog
|
|||
#>
|
||||
#
|
||||
|
||||
def all(filters = filters)
|
||||
unless filters.is_a?(Hash)
|
||||
Fog::Logger.warning("all with #{filters.class} param is deprecated, use all('internet-gateway-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters = {'internet-gateway-id' => [*filters]}
|
||||
def all(filters_arg = filters)
|
||||
unless filters_arg.is_a?(Hash)
|
||||
Fog::Logger.warning("all with #{filters_arg.class} param is deprecated, use all('internet-gateway-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters_arg = {'internet-gateway-id' => [*filters_arg]}
|
||||
end
|
||||
self.filters = filters
|
||||
filters = filters_arg
|
||||
data = service.describe_internet_gateways(filters).body
|
||||
load(data['internetGatewaySet'])
|
||||
end
|
||||
|
|
|
@ -47,12 +47,12 @@ module Fog
|
|||
#>
|
||||
#
|
||||
|
||||
def all(filters = filters)
|
||||
unless filters.is_a?(Hash)
|
||||
Fog::Logger.deprecation("all with #{filters.class} param is deprecated, use all('key-name' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters = {'key-name' => [*filters]}
|
||||
def all(filters_arg = filters)
|
||||
unless filters_arg.is_a?(Hash)
|
||||
Fog::Logger.deprecation("all with #{filters_arg.class} param is deprecated, use all('key-name' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters_arg = {'key-name' => [*filters_arg]}
|
||||
end
|
||||
self.filters = filters
|
||||
filters = filters_arg
|
||||
data = service.describe_key_pairs(filters).body
|
||||
load(data['keySet'])
|
||||
end
|
||||
|
|
|
@ -79,8 +79,8 @@ module Fog
|
|||
# ]
|
||||
# >
|
||||
#
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
data = service.describe_network_acls(filters).body
|
||||
load(data['networkAclSet'])
|
||||
end
|
||||
|
|
|
@ -84,8 +84,8 @@ module Fog
|
|||
# >
|
||||
#
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
data = service.describe_network_interfaces(filters).body
|
||||
load(data['networkInterfaceSet'])
|
||||
end
|
||||
|
|
|
@ -52,12 +52,12 @@ module Fog
|
|||
# >
|
||||
#
|
||||
|
||||
def all(filters = filters)
|
||||
unless filters.is_a?(Hash)
|
||||
Fog::Logger.warning("all with #{filters.class} param is deprecated, use all('route-table-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters = {'route-table-id' => [*filters]}
|
||||
def all(filters_arg = filters)
|
||||
unless filters_arg.is_a?(Hash)
|
||||
Fog::Logger.warning("all with #{filters_arg.class} param is deprecated, use all('route-table-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters_arg = {'route-table-id' => [*filters_arg]}
|
||||
end
|
||||
self.filters = filters
|
||||
filters = filters_arg
|
||||
data = service.describe_route_tables(filters).body
|
||||
load(data['routeTableSet'])
|
||||
end
|
||||
|
|
|
@ -55,12 +55,12 @@ module Fog
|
|||
# >
|
||||
#
|
||||
|
||||
def all(filters = filters)
|
||||
unless filters.is_a?(Hash)
|
||||
Fog::Logger.deprecation("all with #{filters.class} param is deprecated, use all('group-name' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters = {'group-name' => [*filters]}
|
||||
def all(filters_arg = filters)
|
||||
unless filters_arg.is_a?(Hash)
|
||||
Fog::Logger.deprecation("all with #{filters_arg.class} param is deprecated, use all('group-name' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters_arg = {'group-name' => [*filters_arg]}
|
||||
end
|
||||
self.filters = filters
|
||||
self.filters = filters_arg
|
||||
data = service.describe_security_groups(filters).body
|
||||
load(data['securityGroupInfo'])
|
||||
end
|
||||
|
|
|
@ -15,12 +15,12 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters, options = {})
|
||||
unless filters.is_a?(Hash)
|
||||
Fog::Logger.deprecation("all with #{filters.class} param is deprecated, use all('snapshot-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters = {'snapshot-id' => [*filters]}
|
||||
def all(filters_arg = filters, options = {})
|
||||
unless filters_arg.is_a?(Hash)
|
||||
Fog::Logger.deprecation("all with #{filters_arg.class} param is deprecated, use all('snapshot-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters_arg = {'snapshot-id' => [*filters_arg]}
|
||||
end
|
||||
self.filters = filters
|
||||
filters = filters_arg
|
||||
data = service.describe_snapshots(filters.merge!(options)).body
|
||||
load(data['snapshotSet'])
|
||||
if volume
|
||||
|
|
|
@ -55,12 +55,12 @@ module Fog
|
|||
# >
|
||||
#
|
||||
|
||||
def all(filters = filters)
|
||||
unless filters.is_a?(Hash)
|
||||
Fog::Logger.warning("all with #{filters.class} param is deprecated, use all('subnet-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters = {'subnet-id' => [*filters]}
|
||||
def all(filters_arg = filters)
|
||||
unless filters_arg.is_a?(Hash)
|
||||
Fog::Logger.warning("all with #{filters_arg.class} param is deprecated, use all('subnet-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters_arg = {'subnet-id' => [*filters_arg]}
|
||||
end
|
||||
self.filters = filters
|
||||
filters = filters_arg
|
||||
data = service.describe_subnets(filters).body
|
||||
load(data['subnetSet'])
|
||||
end
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
data = service.describe_tags(filters).body
|
||||
load(data['tagSet'])
|
||||
end
|
||||
|
|
|
@ -60,12 +60,12 @@ module Fog
|
|||
# The volume can be retrieved by running AWS.volumes.get("vol-1e2028b9"). See get method below.
|
||||
#
|
||||
|
||||
def all(filters = filters)
|
||||
unless filters.is_a?(Hash)
|
||||
Fog::Logger.deprecation("all with #{filters.class} param is deprecated, use all('volume-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters = {'volume-id' => [*filters]}
|
||||
def all(filters_arg = filters)
|
||||
unless filters_arg.is_a?(Hash)
|
||||
Fog::Logger.deprecation("all with #{filters_arg.class} param is deprecated, use all('volume-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters_arg = {'volume-id' => [*filters_arg]}
|
||||
end
|
||||
self.filters = filters
|
||||
filters = filters_arg
|
||||
data = service.describe_volumes(filters).body
|
||||
load(data['volumeSet'])
|
||||
if server
|
||||
|
|
|
@ -53,12 +53,12 @@ module Fog
|
|||
# >
|
||||
#
|
||||
|
||||
def all(filters = filters)
|
||||
unless filters.is_a?(Hash)
|
||||
Fog::Logger.warning("all with #{filters.class} param is deprecated, use all('vpc-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters = {'vpc-id' => [*filters]}
|
||||
def all(filters_arg = filters)
|
||||
unless filters_arg.is_a?(Hash)
|
||||
Fog::Logger.warning("all with #{filters_arg.class} param is deprecated, use all('vpc-id' => []) instead [light_black](#{caller.first})[/]")
|
||||
filters_arg = {'vpc-id' => [*filters_arg]}
|
||||
end
|
||||
self.filters = filters
|
||||
filters = filters_arg
|
||||
data = service.describe_vpcs(filters).body
|
||||
load(data['vpcSet'])
|
||||
end
|
||||
|
|
|
@ -15,11 +15,11 @@ module Fog
|
|||
end
|
||||
|
||||
# This method deliberately returns only a single page of results
|
||||
def all(filters=filters)
|
||||
self.filters.merge!(filters)
|
||||
def all(filters_arg = filters)
|
||||
filters.merge!(filters_arg)
|
||||
|
||||
result = service.describe_orderable_db_instance_options(engine, self.filters).body['DescribeOrderableDBInstanceOptionsResult']
|
||||
self.filters[:marker] = result['Marker']
|
||||
result = service.describe_orderable_db_instance_options(engine, filters).body['DescribeOrderableDBInstanceOptionsResult']
|
||||
filters[:marker] = result['Marker']
|
||||
load(result['OrderableDBInstanceOptions'])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,18 +15,18 @@ module Fog
|
|||
end
|
||||
|
||||
# This method deliberately returns only a single page of results
|
||||
def all(filters=filters)
|
||||
self.filters.merge!(filters)
|
||||
def all(filters_arg = filters)
|
||||
filters.merge!(filters_arg)
|
||||
|
||||
result = service.describe_db_log_files(rds_id, self.filters).body['DescribeDBLogFilesResult']
|
||||
self.filters[:marker] = result['Marker']
|
||||
result = service.describe_db_log_files(rds_id, filters).body['DescribeDBLogFilesResult']
|
||||
filters[:marker] = result['Marker']
|
||||
load(result['DBLogFiles'])
|
||||
end
|
||||
|
||||
def each(filters=filters)
|
||||
def each(filters_arg = filters)
|
||||
if block_given?
|
||||
begin
|
||||
page = self.all(filters)
|
||||
page = self.all(filters_arg)
|
||||
# We need to explicitly use the base 'each' method here on the page, otherwise we get infinite recursion
|
||||
base_each = Fog::Collection.instance_method(:each)
|
||||
base_each.bind(page).call { |log_file| yield log_file }
|
||||
|
|
|
@ -17,8 +17,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
result = []
|
||||
marker = nil
|
||||
finished = false
|
||||
|
|
|
@ -17,8 +17,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
data = service.describe_db_security_groups(filters).body['DescribeDBSecurityGroupsResult']['DBSecurityGroups']
|
||||
load(data) # data is an array of attribute hashes
|
||||
end
|
||||
|
|
|
@ -28,19 +28,19 @@ module Fog
|
|||
# It is arguably incorrect for the method not to return all snapshots, particularly considering the
|
||||
# implementation in the corresponding 'elb' files. But this implementation has been released, and
|
||||
# backwards-compatibility requires leaving it as implemented.
|
||||
def all(filters = filters)
|
||||
self.filters.merge!(filters)
|
||||
def all(filters_arg = filters)
|
||||
filters.merge!(filters_arg)
|
||||
|
||||
page = service.describe_db_snapshots(self.filters).body['DescribeDBSnapshotsResult']
|
||||
self.filters[:marker] = page['Marker']
|
||||
page = service.describe_db_snapshots(filters).body['DescribeDBSnapshotsResult']
|
||||
filters[:marker] = page['Marker']
|
||||
load(page['DBSnapshots'])
|
||||
end
|
||||
|
||||
# This will execute a block for each snapshot, fetching new pages of snapshots as required.
|
||||
def each(filters = filters)
|
||||
def each(filters_arg = filters)
|
||||
if block_given?
|
||||
begin
|
||||
page = self.all(filters)
|
||||
page = self.all(filters_arg)
|
||||
# We need to explicitly use the base 'each' method here on the page, otherwise we get infinite recursion
|
||||
base_each = Fog::Collection.instance_method(:each)
|
||||
base_each.bind(page).call { |snapshot| yield snapshot }
|
||||
|
|
|
@ -14,9 +14,9 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
details = filters.delete(:details)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
details = filters_arg.delete(:details)
|
||||
self.filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
if details
|
||||
data = service.list_snapshots_detail(non_aliased_filters).body['snapshots']
|
||||
|
|
|
@ -14,9 +14,9 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
details = filters.delete(:details)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
details = filters_arg.delete(:details)
|
||||
self.filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
if details
|
||||
data = service.list_volume_backups_detail(non_aliased_filters).body['backups']
|
||||
|
|
|
@ -14,9 +14,9 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
details = filters.delete(:details)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
details = filters_arg.delete(:details)
|
||||
self.filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
if details
|
||||
data = service.list_volumes_detail(non_aliased_filters).body['volumes']
|
||||
|
|
|
@ -14,9 +14,9 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
details = filters.delete(:details)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
details = filters_arg.delete(:details)
|
||||
self.filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
if details
|
||||
data = service.list_flavors_detail(non_aliased_filters).body['flavors']
|
||||
|
|
|
@ -14,9 +14,9 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
details = filters.delete(:details)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
details = filters_arg.delete(:details)
|
||||
filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
if details
|
||||
data = service.list_images_detail(non_aliased_filters).body['images']
|
||||
|
|
|
@ -14,9 +14,9 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
details = filters.delete(:details)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
details = filters_arg.delete(:details)
|
||||
filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
if details
|
||||
data = service.list_servers_detail(non_aliased_filters).body['servers']
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
load(service.list_floating_ips(non_aliased_filters).body['floatingips'])
|
||||
end
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
load(service.list_networks(non_aliased_filters).body['networks'])
|
||||
end
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
load(service.list_ports(non_aliased_filters).body['ports'])
|
||||
end
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
load(service.list_routers(non_aliased_filters).body['routers'])
|
||||
end
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
load(service.list_security_group_rules(non_aliased_filters).body['security_group_rules'])
|
||||
end
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
load(service.list_security_groups(non_aliased_filters).body['security_groups'])
|
||||
end
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
|
||||
load(service.list_subnets(non_aliased_filters).body['subnets'])
|
||||
end
|
||||
|
|
|
@ -222,32 +222,32 @@ module Fog
|
|||
# It returns an array of public and private ip addresses
|
||||
# Currently only one ip address is returned, but in the future this could be multiple
|
||||
# if the server has multiple network interface
|
||||
def addresses(service=service, options={})
|
||||
def addresses(service_arg=service, options={})
|
||||
mac=self.mac
|
||||
|
||||
# Aug 24 17:34:41 juno arpwatch: new station 10.247.4.137 52:54:00:88:5a:0a eth0.4
|
||||
# Aug 24 17:37:19 juno arpwatch: changed ethernet address 10.247.4.137 52:54:00:27:33:00 (52:54:00:88:5a:0a) eth0.4
|
||||
# Check if another ip_command string was provided
|
||||
ip_command_global=service.ip_command.nil? ? 'grep $mac /var/log/arpwatch.log|sed -e "s/new station//"|sed -e "s/changed ethernet address//g" |sed -e "s/reused old ethernet //" |tail -1 |cut -d ":" -f 4-| cut -d " " -f 3' : service.ip_command
|
||||
ip_command_global=service_arg.ip_command.nil? ? 'grep $mac /var/log/arpwatch.log|sed -e "s/new station//"|sed -e "s/changed ethernet address//g" |sed -e "s/reused old ethernet //" |tail -1 |cut -d ":" -f 4-| cut -d " " -f 3' : service_arg.ip_command
|
||||
ip_command_local=options[:ip_command].nil? ? ip_command_global : options[:ip_command]
|
||||
|
||||
ip_command="mac=#{mac}; server_name=#{name}; "+ip_command_local
|
||||
|
||||
ip_address=nil
|
||||
|
||||
if service.uri.ssh_enabled?
|
||||
if service_arg.uri.ssh_enabled?
|
||||
|
||||
# Retrieve the parts we need from the service to setup our ssh options
|
||||
user=service.uri.user #could be nil
|
||||
host=service.uri.host
|
||||
keyfile=service.uri.keyfile
|
||||
port=service.uri.port
|
||||
user=service_arg.uri.user #could be nil
|
||||
host=service_arg.uri.host
|
||||
keyfile=service_arg.uri.keyfile
|
||||
port=service_arg.uri.port
|
||||
|
||||
# Setup the options
|
||||
ssh_options={}
|
||||
ssh_options[:keys]=[ keyfile ] unless keyfile.nil?
|
||||
ssh_options[:port]=port unless keyfile.nil?
|
||||
ssh_options[:paranoid]=true if service.uri.no_verify?
|
||||
ssh_options[:paranoid]=true if service_arg.uri.no_verify?
|
||||
|
||||
begin
|
||||
result=Fog::SSH.new(host, user, ssh_options).run(ip_command)
|
||||
|
@ -267,7 +267,7 @@ module Fog
|
|||
|
||||
else
|
||||
# It's not ssh enabled, so we assume it is
|
||||
if service.uri.transport=="tls"
|
||||
if service_arg.uri.transport=="tls"
|
||||
raise Fog::Errors::Error.new("TlS remote transport is not currently supported, only ssh")
|
||||
end
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
data = service.list_images_detail(filters).body['images']
|
||||
images = load(data)
|
||||
if server
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
data = service.list_servers_detail(filters).body['servers']
|
||||
load(data)
|
||||
end
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_floating_ips(filters).body['floatingips'])
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_lb_health_monitors(filters).body['health_monitors'])
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_lb_members(filters).body['members'])
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_lb_pools(filters).body['pools'])
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_lb_vips(filters).body['vips'])
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_networks(filters).body['networks'])
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_ports(filters).body['ports'])
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_routers(filters).body['routers'])
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_security_group_rules(filters).body['security_group_rules'])
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_security_groups(filters).body['security_groups'])
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def all(filters = filters)
|
||||
self.filters = filters
|
||||
def all(filters_arg = filters)
|
||||
filters = filters_arg
|
||||
load(service.list_subnets(filters).body['subnets'])
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue