@@ -255,6 +255,14 @@ def reload(self, id, post_uri=None):
255255 id = id )
256256
257257 def change_port_speed (self , id , public , speed ):
258+ """ Allows you to change the port speed of a server's NICs.
259+
260+ :param int id: The ID of the server
261+ :param bool public: Flag to indicate which interface to change.
262+ True (default) means the public interface.
263+ False indicates the private interface.
264+ :param int speed: The port speed to set.
265+ """
258266 if public :
259267 func = self .hardware .setPublicNetworkInterfaceSpeed
260268 else :
@@ -263,10 +271,16 @@ def change_port_speed(self, id, public, speed):
263271 return func (speed , id = id )
264272
265273 def place_order (self , ** kwargs ):
274+ """ Places an order for a piece of hardware. See _generate_create_dict
275+ for a list of available options.
276+ """
266277 create_options = self ._generate_create_dict (** kwargs )
267278 return self .client ['Product_Order' ].placeOrder (create_options )
268279
269280 def verify_order (self , ** kwargs ):
281+ """ Verifies an order for a piece of hardware without actually placing
282+ it. See _generate_create_dict for a list of available options.
283+ """
270284 create_options = self ._generate_create_dict (** kwargs )
271285 return self .client ['Product_Order' ].verifyOrder (create_options )
272286
@@ -288,7 +302,36 @@ def _generate_create_dict(
288302 self , server = None , hostname = None , domain = None , hourly = False ,
289303 location = None , os = None , disks = None , port_speed = None ,
290304 bare_metal = None , ram = None , package_id = None , disk_controller = None ):
291-
305+ """
306+ Translates a list of arguments into a dictionary necessary for creating
307+ a server. NOTE - All items here must be price IDs, NOT quantities!
308+
309+ :param string server: The identification string for the server to
310+ order. This will either be the CPU/Memory
311+ combination ID for bare metal instances or the
312+ CPU model for dedicated servers.
313+ :param string hostname: The hostname to use for the new server.
314+ :param string domain: The domain to use for the new server.
315+ :param bool hourly: Flag to indicate if this server should be billed
316+ hourly (default) or monthly. Only applies to bare
317+ metal instances.
318+ :param string location: The location string (data center) for the
319+ server
320+ :param int os: The operating system to use
321+ :param array disks: An array of disks for the server. Disks will be
322+ added in the order specified.
323+ :param int port_speed: The port speed for the server.
324+ :param bool bare_metal: Flag to indicate if this is a bare metal server
325+ or a dedicated server (default).
326+ :param int ram: The amount of RAM to order. Only applies to dedicated
327+ servers.
328+ :param int package_id: The package_id to use for the server. This
329+ should either be a chassis ID for dedicated
330+ servers or the bare metal instance package ID,
331+ which can be obtained by calling
332+ _get_bare_metal_package_id
333+ :param int disk_controller: The disk controller to use.
334+ """
292335 arguments = ['server' , 'hostname' , 'domain' , 'location' , 'os' , 'disks' ,
293336 'port_speed' , 'bare_metal' , 'ram' , 'package_id' ,
294337 'disk_controller' , 'server_core' , 'disk0' ]
0 commit comments