Class: Softlayer::Scale::Policy

Inherits:
Entity show all
Defined in:
lib/softlayer/scale/policy.rb,
lib/softlayer/scale/policy/action.rb,
lib/softlayer/scale/policy/trigger.rb,
lib/softlayer/scale/policy/action/type.rb,
lib/softlayer/scale/policy/action/scale.rb,
lib/softlayer/scale/policy/trigger/type.rb,
lib/softlayer/scale/policy/trigger/one_time.rb,
lib/softlayer/scale/policy/trigger/repeating.rb,
lib/softlayer/scale/policy/trigger/resource_use.rb,
lib/softlayer/scale/policy/trigger/resource_use/watch.rb

Defined Under Namespace

Classes: Action, Representer, Trigger

Constant Summary collapse

SERVICE =
'SoftLayer_Scale_Policy'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

all, all_request_for, create, find, #init_headers, parse, process_message, #request, request, service_name, #service_name, #to_hash, #to_softlayer

Methods included from Model::Operations

extended, #filter, included, #limit, #mask, #request_headers

Instance Attribute Details

#action_countObject

Returns the value of attribute action_count.



14
15
16
# File 'lib/softlayer/scale/policy.rb', line 14

def action_count
  @action_count
end

#actionsObject

Returns the value of attribute actions.



20
21
22
# File 'lib/softlayer/scale/policy.rb', line 20

def actions
  @actions
end

#cooldownObject

Returns the value of attribute cooldown.



7
8
9
# File 'lib/softlayer/scale/policy.rb', line 7

def cooldown
  @cooldown
end

#create_dateObject

Returns the value of attribute create_date.



8
9
10
# File 'lib/softlayer/scale/policy.rb', line 8

def create_date
  @create_date
end

#delete_flagObject

Returns the value of attribute delete_flag.



9
10
11
# File 'lib/softlayer/scale/policy.rb', line 9

def delete_flag
  @delete_flag
end

#idObject

Returns the value of attribute id.



10
11
12
# File 'lib/softlayer/scale/policy.rb', line 10

def id
  @id
end

#modify_dateObject

Returns the value of attribute modify_date.



11
12
13
# File 'lib/softlayer/scale/policy.rb', line 11

def modify_date
  @modify_date
end

#nameObject

Returns the value of attribute name.



12
13
14
# File 'lib/softlayer/scale/policy.rb', line 12

def name
  @name
end

#one_time_trigger_countObject

Returns the value of attribute one_time_trigger_count.



15
16
17
# File 'lib/softlayer/scale/policy.rb', line 15

def one_time_trigger_count
  @one_time_trigger_count
end

#one_time_triggersObject

Returns the value of attribute one_time_triggers.



21
22
23
# File 'lib/softlayer/scale/policy.rb', line 21

def one_time_triggers
  @one_time_triggers
end

#repeating_trigger_countObject

Returns the value of attribute repeating_trigger_count.



16
17
18
# File 'lib/softlayer/scale/policy.rb', line 16

def repeating_trigger_count
  @repeating_trigger_count
end

#repeating_triggersObject

Returns the value of attribute repeating_triggers.



22
23
24
# File 'lib/softlayer/scale/policy.rb', line 22

def repeating_triggers
  @repeating_triggers
end

#resource_use_trigger_countObject

Returns the value of attribute resource_use_trigger_count.



17
18
19
# File 'lib/softlayer/scale/policy.rb', line 17

def resource_use_trigger_count
  @resource_use_trigger_count
end

#resource_use_triggersObject

Returns the value of attribute resource_use_triggers.



23
24
25
# File 'lib/softlayer/scale/policy.rb', line 23

def resource_use_triggers
  @resource_use_triggers
end

#scale_action_countObject

Returns the value of attribute scale_action_count.



18
19
20
# File 'lib/softlayer/scale/policy.rb', line 18

def scale_action_count
  @scale_action_count
end

#scale_actionsObject

Returns the value of attribute scale_actions.



24
25
26
# File 'lib/softlayer/scale/policy.rb', line 24

def scale_actions
  @scale_actions
end

#scale_groupObject

Returns the value of attribute scale_group.



25
26
27
# File 'lib/softlayer/scale/policy.rb', line 25

def scale_group
  @scale_group
end

#scale_group_idObject

Returns the value of attribute scale_group_id.



13
14
15
# File 'lib/softlayer/scale/policy.rb', line 13

def scale_group_id
  @scale_group_id
end

#trigger_countObject

Returns the value of attribute trigger_count.



19
20
21
# File 'lib/softlayer/scale/policy.rb', line 19

def trigger_count
  @trigger_count
end

#triggersObject

Returns the value of attribute triggers.



26
27
28
# File 'lib/softlayer/scale/policy.rb', line 26

def triggers
  @triggers
end

Class Method Details

.create_object(message) ⇒ Object

template_object



29
30
31
# File 'lib/softlayer/scale/policy.rb', line 29

def self.create_object(message)
  request(:create_object, Softlayer::Scale::Policy, message)
end

Instance Method Details

#delete_objectObject



33
34
35
# File 'lib/softlayer/scale/policy.rb', line 33

def delete_object
  request(:delete_object, Boolean)
end

#edit_object(message) ⇒ Object

template_object



38
39
40
# File 'lib/softlayer/scale/policy.rb', line 38

def edit_object(message)
  request(:edit_object, Boolean, message)
end

#get_actionsObject



42
43
44
# File 'lib/softlayer/scale/policy.rb', line 42

def get_actions
  request(:get_actions, Array[Softlayer::Scale::Policy::Action])
end

#get_objectObject



46
47
48
# File 'lib/softlayer/scale/policy.rb', line 46

def get_object
  request(:get_object, Softlayer::Scale::Policy)
end

#get_one_time_triggersObject



50
51
52
# File 'lib/softlayer/scale/policy.rb', line 50

def get_one_time_triggers
  request(:get_one_time_triggers, Array[Softlayer::Scale::Policy::Trigger::OneTime])
end

#get_repeating_triggersObject



54
55
56
# File 'lib/softlayer/scale/policy.rb', line 54

def get_repeating_triggers
  request(:get_repeating_triggers, Array[Softlayer::Scale::Policy::Trigger::Repeating])
end

#get_resource_use_triggersObject



58
59
60
# File 'lib/softlayer/scale/policy.rb', line 58

def get_resource_use_triggers
  request(:get_resource_use_triggers, Array[Softlayer::Scale::Policy::Trigger::ResourceUse])
end

#get_scale_actionsObject



62
63
64
# File 'lib/softlayer/scale/policy.rb', line 62

def get_scale_actions
  request(:get_scale_actions, Array[Softlayer::Scale::Policy::Action::Scale])
end

#get_scale_groupObject



66
67
68
# File 'lib/softlayer/scale/policy.rb', line 66

def get_scale_group
  request(:get_scale_group, Softlayer::Scale::Group)
end

#get_triggersObject



70
71
72
# File 'lib/softlayer/scale/policy.rb', line 70

def get_triggers
  request(:get_triggers, Array[Softlayer::Scale::Policy::Trigger])
end

#triggerObject



74
75
76
# File 'lib/softlayer/scale/policy.rb', line 74

def trigger
  request(:trigger, Array[Softlayer::Scale::Member])
end