@@ -78,6 +78,14 @@ class BareMetalServerOrder
7878 # Object responding to to_s and providing a valid URI, The URI of a post provisioning script to run on
7979 # this server once it is created.
8080 # Corresponds to +postInstallScriptUri+ in the +createObject+ documentation
81+ attr_accessor :provision_script_uri
82+
83+ # Object responding to to_s and providing a valid URI, The URI of a post provisioning script to run on
84+ # this server once it is created.
85+ # Corresponds to +postInstallScriptUri+ in the +createObject+ documentation
86+ #
87+ # DEPRECATION WARNING: This attribute is deprecated in favor of provision_script_uri
88+ # and will be removed in the next major release.
8189 attr_accessor :provision_script_URI
8290
8391 # Boolean, If true then the server will only have a private network interface (and no public network interface)
@@ -149,13 +157,14 @@ def hardware_instance_template
149157
150158 template [ 'privateNetworkOnlyFlag' ] = true if @private_network_only
151159
152- template [ 'datacenter' ] = { "name" => @datacenter . name } if @datacenter
153- template [ 'userData' ] = [ { 'value' => @user_metadata } ] if @user_metadata
154- template [ 'networkComponents' ] = [ { 'maxSpeed' => @max_port_speed } ] if @max_port_speed
155- template [ 'postInstallScriptUri' ] = @provision_script_URI . to_s if @provision_script_URI
156- template [ 'sshKeys ' ] = @ssh_key_ids . collect { | ssh_key | { 'id' => ssh_key . to_i } } if @ssh_key_ids
157- template [ 'primaryNetworkComponent' ] = { "networkVlan" => { "id" => @public_vlan_id . to_i } } if @public_vlan_id
160+ template [ 'datacenter' ] = { "name" => @datacenter . name } if @datacenter
161+ template [ 'userData' ] = [ { 'value' => @user_metadata } ] if @user_metadata
162+ template [ 'networkComponents' ] = [ { 'maxSpeed' => @max_port_speed } ] if @max_port_speed
163+ template [ 'postInstallScriptUri' ] = @provision_script_URI . to_s if @provision_script_URI
164+ template [ 'postInstallScriptUri ' ] = @provision_script_uri . to_s if @provision_script_uri
165+ template [ 'primaryNetworkComponent' ] = { "networkVlan" => { "id" => @public_vlan_id . to_i } } if @public_vlan_id
158166 template [ 'primaryBackendNetworkComponent' ] = { "networkVlan" => { "id" => @private_vlan_id . to_i } } if @private_vlan_id
167+ template [ 'sshKeys' ] = @ssh_key_ids . collect { |ssh_key | { 'id' => ssh_key . to_i } } if @ssh_key_ids
159168
160169 if @disks && !@disks . empty?
161170 template [ 'hardDrives' ] = @disks . collect do |disk |
0 commit comments