Sha256: c336fa9723b42b6dd2c2034df6868850bbc8f37d2dd7bb86ea20349687450c92

Contents?: true

Size: 1.25 KB

Versions: 2

Compression:

Stored size: 1.25 KB

Contents

module ApiStub
  module Requests
    module Sql
      # Mock class for Firewall Rule
      class FirewallRule
        def self.create_firewall_rule_response
          '{
            "id": "{uri-of-firewall-rule}",
            "name": "{rule-name}",
            "type": "{rule-type}",
            "location": "{server-location}",
            "properties": {
              "startIpAddress": "{start-ip-address}",
              "endIpAddress": "{end-ip-address}"
            }
          }'
        end

        def self.list_firewall_rule_response
          '{
            "value": [{
              "id": "{uri-of-firewall-rule}",
              "name": "{rule-name}",
              "type": "{rule-type}",
              "location": "{server-location}",
              "properties": {
                "startIpAddress": "{start-ip-address}",
                "endIpAddress": "{end-ip-address}"
              }
            }]
          }'
        end

        def self.firewall_rule_hash
          {
            resource_group: 'resource_group',
            server_name: 'server_name',
            name: 'firewall_name',
            start_ip: '10.10.10.01',
            end_ip: '10.10.10.10'
          }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.1 test/api_stub/requests/sql/firewall_rule.rb
fog-azure-rm-0.1.0 test/api_stub/requests/sql/firewall_rule.rb