Skip to content

Commit a59b81f

Browse files
committed
Ensure all sl_dynamic_attr items are doc'ed as methods and include the force_update argument in their doc.
1 parent b9f7870 commit a59b81f

17 files changed

Lines changed: 156 additions & 55 deletions

lib/softlayer/Account.rb

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Account < SoftLayer::ModelBase
6262
sl_attr :officePhone
6363

6464
##
65-
# The Bare Metal Servers (physical hardware) associated with the
65+
# Retrieve the Bare Metal Servers (physical hardware) associated with the
6666
# account. Unless you force these to update, they will be refreshed every
6767
# five minutes.
6868
# :call-seq:
@@ -82,6 +82,8 @@ class Account < SoftLayer::ModelBase
8282
##
8383
# Retrieve an account's master EVault user. This is only used when an account
8484
# has an EVault service.
85+
# :call-seq:
86+
# evault_master_users(force_update=false)
8587
sl_dynamic_attr :evault_master_users do |evault_users|
8688
evault_users.should_update? do
8789
@evault_master_users == nil
@@ -94,7 +96,10 @@ class Account < SoftLayer::ModelBase
9496
end
9597

9698
##
97-
# Retrieve an account's image templates
99+
# Retrieve an account's image templates. Unless you force
100+
# these to update, they will be refreshed every five minutes
101+
# :call-seq:
102+
# image_templates(force_update=false)
98103
sl_dynamic_attr :image_templates do |image_templates|
99104
image_templates.should_update? do
100105
@last_image_template_update ||= Time.at(0)
@@ -109,6 +114,8 @@ class Account < SoftLayer::ModelBase
109114

110115
##
111116
# Retrieve an account's network message delivery accounts.
117+
# :call-seq:
118+
# network_message_delivery_accounts(force_update=false)
112119
sl_dynamic_attr :network_message_delivery_accounts do |net_msg_deliv_accts|
113120
net_msg_deliv_accts.should_update? do
114121
@network_message_delivery_accounts == nil
@@ -122,6 +129,8 @@ class Account < SoftLayer::ModelBase
122129

123130
##
124131
# Retrieve an account's network storage groups.
132+
# :call-seq:
133+
# network_storage_groups(force_update=false)
125134
sl_dynamic_attr :network_storage_groups do |net_stor_groups|
126135
net_stor_groups.should_update? do
127136
@network_storage_groups == nil
@@ -134,7 +143,10 @@ class Account < SoftLayer::ModelBase
134143
end
135144

136145
##
137-
# Retrieve an account's open tickets
146+
# Retrieve an account's open tickets. Unless you force these
147+
# to update, they will be refreshed every five minutes
148+
# :call-seq:
149+
# open_tickets(force_update=false)
138150
sl_dynamic_attr :open_tickets do |open_tickets|
139151
open_tickets.should_update? do
140152
@last_open_tickets_update ||= Time.at(0)
@@ -150,6 +162,8 @@ class Account < SoftLayer::ModelBase
150162

151163
##
152164
# Retrieve an account's portal users.
165+
# :call-seq:
166+
# users(force_update=false)
153167
sl_dynamic_attr :users do |users|
154168
users.should_update? do
155169
@users == nil
@@ -162,7 +176,10 @@ class Account < SoftLayer::ModelBase
162176
end
163177

164178
##
165-
# Retrieve an account's virtual disk images
179+
# Retrieve an account's virtual disk images. Unless you force
180+
# these to update, they will be refreshed every five minutes
181+
# :call-seq:
182+
# virtual_disk_images(force_update=false)
166183
sl_dynamic_attr :virtual_disk_images do |virtual_disk_images|
167184
virtual_disk_images.should_update? do
168185
@last_virtual_disk_images_update ||= Time.at(0)
@@ -177,7 +194,7 @@ class Account < SoftLayer::ModelBase
177194
end
178195

179196
##
180-
# The virtual servers (aka. CCIs or Virtual_Guests) associated with the
197+
# Retrieve the virtual servers (aka. CCIs or Virtual_Guests) associated with the
181198
# account. Unless you force these to update, they will be refreshed every
182199
# five minutes.
183200
# :call-seq:

lib/softlayer/AccountPassword.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class AccountPassword < ModelBase
3232

3333
##
3434
# A description of the use for the account username/password combination.
35+
# :call-seq:
36+
# description(force_update=false)
3537
sl_dynamic_attr :description do |resource|
3638
resource.should_update? do
3739
#only retrieved once per instance

lib/softlayer/NetworkMessageDelivery.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class NetworkMessageDelivery < ModelBase
3737
sl_attr :username
3838

3939
##
40-
# The message delivery type description of a network message delivery account.
40+
# Retrieve the message delivery type description of a network message delivery account.
41+
# :call-seq:
42+
# description(force_update=false)
4143
sl_dynamic_attr :description do |resource|
4244
resource.should_update? do
4345
#only retrieved once per instance
@@ -51,7 +53,9 @@ class NetworkMessageDelivery < ModelBase
5153
end
5254

5355
##
54-
# The message delivery type name of a network message delivery account.
56+
# Retrieve the message delivery type name of a network message delivery account.
57+
# :call-seq:
58+
# name(force_update=false)
5559
sl_dynamic_attr :name do |resource|
5660
resource.should_update? do
5761
#only retrieved once per instance
@@ -65,7 +69,9 @@ class NetworkMessageDelivery < ModelBase
6569
end
6670

6771
##
68-
# The vendor name for a network message delivery account.
72+
# Retrieve the vendor name for a network message delivery account.
73+
# :call-seq:
74+
# vendor(force_update=false)
6975
sl_dynamic_attr :vendor do |resource|
7076
resource.should_update? do
7177
#only retrieved once per instance

lib/softlayer/NetworkService.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ class NetworkService < ModelBase
3636
sl_attr :ssh_username, 'sshUsername'
3737

3838
##
39-
# Returns the datacenter that this network service resource is available in
39+
# Retrieve the datacenter that this network service resource is available in
40+
# :call-seq:
41+
# datacenter(force_update=false)
4042
sl_dynamic_attr :datacenter do |resource|
4143
resource.should_update? do
4244
#only retrieved once per instance

lib/softlayer/NetworkStorage.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ class NetworkStorage < ModelBase
5555
sl_attr :username
5656

5757
##
58-
# Other usernames and passwords associated with a Storage volume.
58+
# Retrieve other usernames and passwords associated with a Storage volume.
59+
# :call-seq:
60+
# account_password(force_update=false)
5961
sl_dynamic_attr :account_password do |resource|
6062
resource.should_update? do
6163
#only retrieved once per instance
@@ -70,6 +72,8 @@ class NetworkStorage < ModelBase
7072

7173
##
7274
# A Storage volume's access credentials.
75+
# :call-seq:
76+
# credentials(force_update=false)
7377
sl_dynamic_attr :credentials do |resource|
7478
resource.should_update? do
7579
#only retrieved once per instance
@@ -83,6 +87,8 @@ class NetworkStorage < ModelBase
8387

8488
##
8589
# The network resource a Storage service is connected to.
90+
# :call-seq:
91+
# service_resource(force_update=false)
8692
sl_dynamic_attr :service_resource do |resource|
8793
resource.should_update? do
8894
#only retrieved once per instance

lib/softlayer/NetworkStorageAllowedHost.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class NetworkStorageAllowedHost < ModelBase
1515
sl_attr :name
1616

1717
##
18-
# The NetworkStorageGroup instances assigned to this host
18+
# Retrieve the NetworkStorageGroup instances assigned to this host
19+
# :call-seq:
20+
# assigned_groups(force_update=false)
1921
sl_dynamic_attr :assigned_groups do |resource|
2022
resource.should_update? do
2123
#only retrieved once per instance
@@ -29,7 +31,9 @@ class NetworkStorageAllowedHost < ModelBase
2931
end
3032

3133
##
32-
# The NetworkStorage instances assigned to this host
34+
# Retrieve the NetworkStorage instances assigned to this host
35+
# :call-seq:
36+
# assigned_volumes(force_update=false)
3337
sl_dynamic_attr :assigned_volumes do |resource|
3438
resource.should_update? do
3539
#only retrieved once per instance
@@ -43,7 +47,9 @@ class NetworkStorageAllowedHost < ModelBase
4347
end
4448

4549
##
46-
# The NetworkStorageCredential instance used to access NetworkStorage for this host
50+
# Retrieve the NetworkStorageCredential instance used to access NetworkStorage for this host
51+
# :call-seq:
52+
# credential(force_update=false)
4753
sl_dynamic_attr :credential do |resource|
4854
resource.should_update? do
4955
#only retrieved once per instance

lib/softlayer/NetworkStorageGroup.rb

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ class NetworkStorageGroup < ModelBase
2525
sl_attr :modified, 'modifyDate'
2626

2727
##
28-
# The SoftLayer_Account which owns this group.
28+
# Retrieve the SoftLayer_Account which owns this group.
29+
# :call-seq:
30+
# account(force_update=false)
2931
sl_dynamic_attr :account do |resource|
3032
resource.should_update? do
3133
#only retrieved once per instance
@@ -39,7 +41,9 @@ class NetworkStorageGroup < ModelBase
3941
end
4042

4143
##
42-
# The allowed hosts list for this group.
44+
# Retrieve the allowed hosts list for this group.
45+
# :call-seq:
46+
# allowed_hosts(force_update=false)
4347
sl_dynamic_attr :allowed_hosts do |resource|
4448
resource.should_update? do
4549
#only retrieved once per instance
@@ -53,7 +57,9 @@ class NetworkStorageGroup < ModelBase
5357
end
5458

5559
##
56-
# The network storage volumes this group is attached to.
60+
# Retrieve the network storage volumes this group is attached to.
61+
# :call-seq:
62+
# attached_volumes(force_update=false)
5763
sl_dynamic_attr :attached_volumes do |resource|
5864
resource.should_update? do
5965
#only retrieved once per instance
@@ -67,7 +73,9 @@ class NetworkStorageGroup < ModelBase
6773
end
6874

6975
##
70-
# The IP address for for SoftLayer_Network_Storage_Allowed_Host objects within this group.
76+
# Retrieve the IP address for for SoftLayer_Network_Storage_Allowed_Host objects within this group.
77+
# :call-seq:
78+
# ip_address(force_update=false)
7179
sl_dynamic_attr :ip_address do |resource|
7280
resource.should_update? do
7381
#only retrieved once per instance
@@ -81,7 +89,10 @@ class NetworkStorageGroup < ModelBase
8189
end
8290

8391
##
84-
# The description of the SoftLayer_Network_Storage_OS_Type Operating System designation that this group was created for.
92+
# Retrieve the description of the SoftLayer_Network_Storage_OS_Type
93+
# Operating System designation that this group was created for.
94+
# :call-seq:
95+
# os_description(force_update=false)
8596
sl_dynamic_attr :os_description do |resource|
8697
resource.should_update? do
8798
#only retrieved once per instance
@@ -95,7 +106,10 @@ class NetworkStorageGroup < ModelBase
95106
end
96107

97108
##
98-
# The name of the SoftLayer_Network_Storage_OS_Type Operating System designation that this group was created for.
109+
# Retrieve the name of the SoftLayer_Network_Storage_OS_Type
110+
# Operating System designation that this group was created for.
111+
# :call-seq:
112+
# os_name(force_update=false)
99113
sl_dynamic_attr :os_name do |resource|
100114
resource.should_update? do
101115
#only retrieved once per instance
@@ -109,7 +123,9 @@ class NetworkStorageGroup < ModelBase
109123
end
110124

111125
##
112-
# The network resource this group is created on.
126+
# Retrieve the network resource this group is created on.
127+
# :call-seq:
128+
# service_resource(force_update=false)
113129
sl_dynamic_attr :service_resource do |resource|
114130
resource.should_update? do
115131
#only retrieved once per instance
@@ -123,7 +139,9 @@ class NetworkStorageGroup < ModelBase
123139
end
124140

125141
##
126-
# The name of the SoftLayer_Network_Storage_Group_Type which describes this group.
142+
# Retrieve the name of the SoftLayer_Network_Storage_Group_Type which describes this group.
143+
# :call-seq:
144+
# type(force_update=false)
127145
sl_dynamic_attr :type do |resource|
128146
resource.should_update? do
129147
#only retrieved once per instance

lib/softlayer/ProductItemCategory.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ class ProductItemCategory < ModelBase
6262
# The name of a category is a friendly, readable string
6363
sl_attr :name
6464

65+
##
66+
# Retrieve the product item configuration information
67+
# :call-seq:
68+
# configuration_options(force_update=false)
6569
sl_dynamic_attr :configuration_options do |config_opts|
6670
config_opts.should_update? do
6771
# only retrieved once per instance

lib/softlayer/ProductPackage.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ class ProductPackage < ModelBase
4848
sl_attr :available_locations, 'availableLocations'
4949

5050
##
51-
# The set of product categories needed to make an order for this product package.
52-
#
51+
# Retrieve the set of product categories needed to make an order for this product package.
52+
# :call-seq:
53+
# configuration(force_update=false)
5354
sl_dynamic_attr :configuration do |resource|
5455
resource.should_update? do
5556
# only retrieved once per instance
@@ -98,8 +99,9 @@ class ProductPackage < ModelBase
9899
end # configuration
99100

100101
##
101-
# The full set of product categories contained in the package
102-
#
102+
# Retrieve the full set of product categories contained in the package
103+
# :call-seq:
104+
# categories(force_update=false)
103105
sl_dynamic_attr :categories do |resource|
104106
resource.should_update? do
105107
@categories == nil

lib/softlayer/Server.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ class Server < SoftLayer::ModelBase
5353
# Notes about these server (for use by the customer)
5454
sl_attr :notes
5555

56+
##
57+
# Retrieve the primary network component
58+
# :call-seq:
59+
# primary_network_component(force_update=false)
5660
sl_dynamic_attr :primary_network_component do |primary_component|
5761
primary_component.should_update? do
5862
return @primary_network_component == nil
@@ -65,8 +69,9 @@ class Server < SoftLayer::ModelBase
6569
end
6670

6771
##
68-
# :attr_reader:
69-
# All software installed on current server
72+
# Retrieve all software installed on current server
73+
# :call-seq:
74+
# software(force_update=false)
7075
sl_dynamic_attr :software do |software|
7176
software.should_update? do
7277
@software == nil

0 commit comments

Comments
 (0)