Class: Azure::ARM::Web::Models::RampUpRule

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_web/models/ramp_up_rule.rb

Overview

Routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to gradually change routing % based on performance

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#action_host_nameString

redirected if decided to. E.g. mysite-stage.azurewebsites.net

Returns:

  • (String)

    Hostname of a slot to which the traffic will be



19
20
21
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 19

def action_host_name
  @action_host_name
end

#change_decision_callback_urlString

TiPCallback site extension which Url can be specified. See TiPCallback site extension for the scaffold and contracts. www.siteextensions.net/packages/TiPCallback/

Returns:

  • (String)

    Custom decision algorithm can be provided in



55
56
57
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 55

def change_decision_callback_url
  @change_decision_callback_url
end

#change_interval_in_minutesInteger

reevaluate ReroutePercentage

Returns:

  • (Integer)
    Optional

    Specifies interval in mimuntes to



41
42
43
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 41

def change_interval_in_minutes
  @change_interval_in_minutes
end

#change_stepFloat

to to add/remove from Microsoft.Web.Hosting.Administration.RampUpRule.ReroutePercentage until it reaches Microsoft.Web.Hosting.Administration.RampUpRule.MinReroutePercentage or Microsoft.Web.Hosting.Administration.RampUpRule.MaxReroutePercentage. Site metrics are checked every N minutes specificed in Microsoft.Web.Hosting.Administration.RampUpRule.ChangeIntervalInMinutes. Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified in Microsoft.Web.Hosting.Administration.RampUpRule.ChangeDecisionCallbackUrl

Returns:

  • (Float)
    Optional

    In auto ramp up scenario this is the step



37
38
39
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 37

def change_step
  @change_step
end

#max_reroute_percentageFloat

ReroutePercentage will stay.

Returns:

  • (Float)
    Optional

    Specifies upper boundary below which



49
50
51
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 49

def max_reroute_percentage
  @max_reroute_percentage
end

#min_reroute_percentageFloat

ReroutePercentage will stay.

Returns:

  • (Float)
    Optional

    Specifies lower boundary above which



45
46
47
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 45

def min_reroute_percentage
  @min_reroute_percentage
end

#nameString

be to point to the slot which will receive the traffic in the experiment.

Returns:

  • (String)

    Name of the routing rule. The recommended name would



60
61
62
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 60

def name
  @name
end

#reroute_percentageFloat

Microsoft.Web.Hosting.Administration.RampUpRule.ActionHostName

Returns:

  • (Float)

    Percentage of the traffic which will be redirected to



23
24
25
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 23

def reroute_percentage
  @reroute_percentage
end

Class Method Details

.deserialize_object(object) ⇒ RampUpRule

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 110

def self.deserialize_object(object)
  return if object.nil?
  output_object = RampUpRule.new

  deserialized_property = object['actionHostName']
  output_object.action_host_name = deserialized_property

  deserialized_property = object['reroutePercentage']
  deserialized_property = Float(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.reroute_percentage = deserialized_property

  deserialized_property = object['changeStep']
  deserialized_property = Float(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.change_step = deserialized_property

  deserialized_property = object['changeIntervalInMinutes']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.change_interval_in_minutes = deserialized_property

  deserialized_property = object['minReroutePercentage']
  deserialized_property = Float(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.min_reroute_percentage = deserialized_property

  deserialized_property = object['maxReroutePercentage']
  deserialized_property = Float(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.max_reroute_percentage = deserialized_property

  deserialized_property = object['changeDecisionCallbackUrl']
  output_object.change_decision_callback_url = deserialized_property

  deserialized_property = object['name']
  output_object.name = deserialized_property

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 74

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.action_host_name
  output_object['actionHostName'] = serialized_property unless serialized_property.nil?

  serialized_property = object.reroute_percentage
  output_object['reroutePercentage'] = serialized_property unless serialized_property.nil?

  serialized_property = object.change_step
  output_object['changeStep'] = serialized_property unless serialized_property.nil?

  serialized_property = object.change_interval_in_minutes
  output_object['changeIntervalInMinutes'] = serialized_property unless serialized_property.nil?

  serialized_property = object.min_reroute_percentage
  output_object['minReroutePercentage'] = serialized_property unless serialized_property.nil?

  serialized_property = object.max_reroute_percentage
  output_object['maxReroutePercentage'] = serialized_property unless serialized_property.nil?

  serialized_property = object.change_decision_callback_url
  output_object['changeDecisionCallbackUrl'] = serialized_property unless serialized_property.nil?

  serialized_property = object.name
  output_object['name'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



65
66
67
# File 'lib/azure_mgmt_web/models/ramp_up_rule.rb', line 65

def validate
  # Nothing to validate
end