Sha256: c810385b6b28c04671e9b669bd1e4fde743c3794cc63ba9595f0277befd022c9

Contents?: true

Size: 939 Bytes

Versions: 46

Compression:

Stored size: 939 Bytes

Contents

module ApiStub
  module Models
    module Sql
      # Mock class for Firewall Rule
      class SqlFirewallRule
        # This class contain mock
        def self.create_firewall_rule(firewall_manager_client)
          firewall_rule = '{
            "id" : "/subscriptions/########-####-####-####-############/resourceGroups/{resource-group-name}/providers/Microsoft.Sql/servers/{server-name}/firewallRules/{rule-name}",
            "name" : "{rule-name}",
            "type" : "{rule-type}",
            "location" : "{server-location}",
            "properties" : {
              "startIpAddress" : "{start-ip-address}",
              "endIpAddress" : "{end-ip-address}"
            }
          }'
          firewall_rule_mapper = Azure::ARM::SQL::Models::ServerFirewallRule.mapper
          firewall_manager_client.deserialize(firewall_rule_mapper, Fog::JSON.decode(firewall_rule), 'result.body')
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.2.5 test/api_stub/models/sql/sql_firewall_rule.rb
fog-azure-rm-0.2.4 test/api_stub/models/sql/sql_firewall_rule.rb
fog-azure-rm-0.2.3 test/api_stub/models/sql/sql_firewall_rule.rb
fog-azure-rm-0.2.2 test/api_stub/models/sql/sql_firewall_rule.rb
fog-azure-rm-0.2.1 test/api_stub/models/sql/sql_firewall_rule.rb
fog-azure-rm-0.2.0 test/api_stub/models/sql/sql_firewall_rule.rb