You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fixed all PEP-8 violations in docs/conf.py
* Fixed a Sphinx build warning in docs/install.rst
* Add license to SoftLayer.managers.iscsi as it wasn't showing in docs
* Minor updates to readme, and taming of extremely long lines
* Added Pull Requests link to footers and header nav in docs
* Updated some examples in proper docs
* Minor wording/spelling fixes in proper docs
* Extremely long lines (inconsistent, some were wrapped, some not)
were tamed in the proper docs
* Ensured proper capitalization of SoftLayer and GitHub in a number
of places
* Updated RPM spec to reflect MIT license
* Updated CLAs to use consistent line wrapping and removed a bit of
trailing whitespace
and includes a command-line interface that can be used to manage various
19
+
SoftLayer services.
13
20
14
-
This library provides a simple interface to interact with SoftLayer's XML-RPC API and provides support for many of SoftLayer API's features like `object masks <http://sldn.softlayer.com/article/Using-Object-Masks-SoftLayerAPI>`_ and includes a command-line interface that can be used to manage various SoftLayer services.
15
21
16
22
Documentation
17
23
-------------
18
24
Documentation is available at http://softlayer.github.io/softlayer-python/
19
25
26
+
20
27
Installation
21
28
------------
22
29
Install via pip:
@@ -29,25 +36,27 @@ Install via pip:
29
36
Or you can install from source. Download source and run:
30
37
31
38
.. code-block:: bash
32
-
39
+
33
40
$ python setup.py install
34
41
35
42
36
43
The most up to date version of this library can be found on the SoftLayer
37
-
GitHub public repositories: http://github.com/softlayer. Please post to the
38
-
SoftLayer forums http://forums.softlayer.com/ or open a support ticket in the
39
-
SoftLayer customer portal if you have any questions regarding use of this
44
+
GitHub public repositories at http://github.com/softlayer. Please post to the
45
+
SoftLayer forums at http://forums.softlayer.com/ or open a support ticket in
46
+
the SoftLayer customer portal if you have any questions regarding use of this
40
47
library.
41
48
49
+
42
50
System Requirements
43
51
-------------------
44
52
* This library has been tested on Python 2.6, 2.7, 3.3 and 3.4.
45
-
* A valid SoftLayer API username and key are required to call SoftLayer's API
53
+
* A valid SoftLayer API username and key are required to call SoftLayer's API.
46
54
* A connection to SoftLayer's private network is required to connect to
47
55
SoftLayer’s private network API endpoints.
48
56
49
57
50
58
Copyright
51
59
---------
52
60
This software is Copyright (c) 2014 SoftLayer Technologies, Inc.
61
+
53
62
See the bundled LICENSE file for more information.
Copy file name to clipboardexpand all lines: docs/api/client.rst
+57-30
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,13 @@
3
3
4
4
API Documentation
5
5
=================
6
-
This is the primary API client to make API calls. It deals with constructing and executing XML-RPC calls against the SoftLayer API. Below are some links that will help to use the SoftLayer API.
6
+
This is the primary API client to make API calls. It deals with constructing
7
+
and executing XML-RPC calls against the SoftLayer API. Below are some links
8
+
that will help to use the SoftLayer API.
7
9
8
10
9
11
* `SoftLayer API Documentation <http://sldn.softlayer.com/reference/softlayerapi>`_
10
-
* `Source on Github<https://github.com/softlayer/softlayer-python>`_
12
+
* `Source on GitHub<https://github.com/softlayer/softlayer-python>`_
11
13
12
14
::
13
15
@@ -20,7 +22,9 @@ This is the primary API client to make API calls. It deals with constructing and
20
22
21
23
Getting Started
22
24
---------------
23
-
You can pass in your username and api_key when creating a SoftLayer client instance. However, you can set these in the environmental variables 'SL_USERNAME' and 'SL_API_KEY'
25
+
You can pass in your username and api_key when creating a SoftLayer client
26
+
instance. However, you can also set these in the environmental variables
27
+
'SL_USERNAME' and 'SL_API_KEY'.
24
28
25
29
Creating a client instance by passing in the username/api_key:
26
30
::
@@ -31,31 +35,34 @@ Creating a client instance by passing in the username/api_key:
31
35
Creating a client instance with environmental variables set:
32
36
::
33
37
34
-
# env variables
35
-
# SL_USERNAME = YOUR_USERNAME
36
-
# SL_API_KEY = YOUR_API_KEY
37
-
import SoftLayer
38
-
client = SoftLayer.Client()
38
+
$ export SL_USERNAME=YOUR_USERNAME
39
+
$ export SL_API_KEY=YOUR_API_KEY
40
+
$ python
41
+
>>> import SoftLayer
42
+
>>> client = SoftLayer.Client()
39
43
40
-
Below is an example of creating a client instance with more options. This will create a client with the private API endpoint (only accessable from the SoftLayer network) and a timeout of 4 minutes.
44
+
Below is an example of creating a client instance with more options. This will
45
+
create a client with the private API endpoint (only accessible from the
46
+
SoftLayer private network) and a timeout of 4 minutes.
For day to day operation, most users will find the managers to be the most convenient means for interacting with the API. Managers mask out a lot of the complexities of using the API into classes that provide a simpler interface to various services. These are higher-level interfaces to the SoftLayer API.
56
+
For day-to-day operation, most users will find the managers to be the most
57
+
convenient means for interacting with the API. Managers abstract a lot of the
58
+
complexities of using the API into classes that provide a simpler interface to
59
+
various services. These are higher-level interfaces to the SoftLayer API.
53
60
::
54
61
55
-
>>> from SoftLayer import VSManager, Client
56
-
>>> client = Client(...)
57
-
>>> vs = VSManager(client)
58
-
>>> vs.list_instances()
62
+
from SoftLayer import VSManager, Client
63
+
client = Client(...)
64
+
vs = VSManager(client)
65
+
vs.list_instances()
59
66
[...]
60
67
61
68
**Available managers**:
@@ -66,28 +73,43 @@ For day to day operation, most users will find the managers to be the most conve
66
73
67
74
managers/*
68
75
69
-
If you need more power or functionality than the managers provide, you can make direct API calls as well.
76
+
If you need more power or functionality than the managers provide, you can
77
+
make direct API calls as well.
70
78
71
79
72
80
Making API Calls
73
81
----------------
74
-
For full control over your account and services, you can directly call the SoftLayer API. The SoftLayer API client for python leverages SoftLayer's XML-RPC API. It supports authentication, object masks, object filters, limits, offsets, and retrieving objects by id. The following section assumes you have a initialized client named 'client'.
75
-
76
-
The best way to test our setup is to call the `getObject <http://sldn.softlayer.com/reference/services/SoftLayer_Account/getObject>`_ method on the `SoftLayer_Account <http://sldn.softlayer.com/reference/services/SoftLayer_Account>`_ service.
82
+
For full control over your account and services, you can directly call the
83
+
SoftLayer API. The SoftLayer API client for python leverages SoftLayer's
84
+
XML-RPC API. It supports authentication, object masks, object filters, limits,
85
+
offsets, and retrieving objects by id. The following section assumes you have
For a more complex example we'll retrieve a support ticket with id 123456 along with the ticket's updates, the user it's assigned to, the servers attached to it, and the datacenter those servers are in. To retrieve our extra information using an `object mask <http://sldn.softlayer.com/article/Extended-Object-Masks>`_.
97
+
For a more complex example we'll retrieve a support ticket with id 123456 along
98
+
with the ticket's updates, the user it's assigned to, the servers attached to
99
+
it, and the datacenter those servers are in. To retrieve our extra information
100
+
using an `object mask <http://sldn.softlayer.com/article/Extended-Object-Masks>`_.
Now add an update to the ticket with `Ticket.addUpdate <http://sldn.softlayer.com/reference/services/SoftLayer_Ticket/addUpdate>`_. This uses a parameter, which translate to positional arguments in the order that they appear in the API docs.
Here's how to create a new Cloud Compute Instance using `SoftLayer_Virtual_Guest.createObject <http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject>`_. Be warned, this call actually creates an hourly virtual server so this does have billing implications.
147
+
Here's how to create a new Cloud Compute Instance using
Copy file name to clipboardexpand all lines: docs/cla-corporate.md
+38-24
Original file line number
Diff line number
Diff line change
@@ -1,48 +1,62 @@
1
-
#### International Business machines, Inc.
2
-
#####Software Grant and Corporate Contributor License Agreement ("Agreement")
1
+
#### International Business Machines, Inc.
2
+
#####Software Grant and Corporate Contributor License Agreement ("Agreement")
3
3
4
-
http://www.github.com/softlayer/softlayer-python/
4
+
https://github.com/softlayer/softlayer-python/
5
5
6
6
7
-
Thank you for your interest in IBM’s softlayer-python project (“the Project"). In order to clarify the intellectual property license granted with Contributions from any person or entity, IBM must have a Contributor License Agreement (CLA) on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of IBM and its users; it does not change your rights to use your own Contributions for any other purpose.
7
+
Thank you for your interest in IBM’s softlayer-python project (“the Project").
8
+
In order to clarify the intellectual property license granted with
9
+
Contributions from any person or entity, IBM must have a Contributor License
10
+
Agreement (CLA) on file that has been signed by each Contributor, indicating
11
+
agreement to the license terms below. This license is for your protection as a
12
+
Contributor as well as the protection of IBM and its users; it does not change
13
+
your rights to use your own Contributions for any other purpose.
8
14
9
-
This version of the Agreement allows an entity (the "Corporation") to submit Contributions to the Project, to authorize Contributions submitted by its designated employees to the Project, and to grant copyright and patent licenses thereto.
15
+
This version of the Agreement allows an entity (the "Corporation") to submit
16
+
Contributions to the Project, to authorize Contributions submitted by its
17
+
designated employees to the Project, and to grant copyright and patent licenses
18
+
thereto.
10
19
11
-
If you have not already done so, please complete and sign, then scan and email a pdf file of this Agreement to [email protected].
20
+
If you have not already done so, please complete and sign, then scan and email
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Project. Except for the license granted herein to IBM and recipients of software distributed by IBM, You reserve all right, title, and interest in and to Your Contributions.
39
+
You accept and agree to the following terms and conditions for Your present and
40
+
future Contributions submitted to the Project. Except for the license granted
41
+
herein to IBM and recipients of software distributed by IBM, You reserve all
42
+
right, title, and interest in and to Your Contributions.
29
43
30
44
1. Definitions.
31
45
32
46
"You" (or "Your") shall mean the copyright owner or legal entity
33
47
authorized by the copyright owner that is making this Agreement
34
-
with IBM. For legal entities, the entity making a Contribution and
35
-
all other entities that control, are controlled by, or are under
36
-
common control with that entity are considered to be a single
37
-
Contributor. For the purposes of this definition, "control" means
48
+
with IBM. For legal entities, the entity making a Contribution and
49
+
all other entities that control, are controlled by, or are under
50
+
common control with that entity are considered to be a single
51
+
Contributor. For the purposes of this definition, "control" means
38
52
(i) the power, direct or indirect, to cause the direction or
39
53
management of such entity, whether by contract or otherwise, or
40
54
(ii) ownership of fifty percent (50%) or more of the outstanding
41
55
shares, or (iii) beneficial ownership of such entity.
42
56
43
57
"Contribution" shall mean the code, documentation or other original
44
58
works of authorship expressly identified in Schedule B, as well as
45
-
any original work of authorship, including any modifications or
59
+
any original work of authorship, including any modifications or
46
60
additions to an existing work, that is intentionally submitted by
47
61
You to IBM for inclusion in, or documentation of, the Project managed
48
62
by IBM (the "Work"). For the purposes of this definition, "submitted"
@@ -58,17 +72,17 @@ You accept and agree to the following terms and conditions for Your present and
58
72
59
73
Subject to the terms and conditions of this Agreement,
60
74
You hereby grant to IBM and to recipients of software
61
-
distributed by IBM a perpetual, worldwide, non-exclusive,
62
-
no-charge, royalty-free, irrevocable copyright license to
63
-
reproduce, prepare derivative works of, publicly display,
75
+
distributed by IBM a perpetual, worldwide, non-exclusive,
76
+
no-charge, royalty-free, irrevocable copyright license to
77
+
reproduce, prepare derivative works of, publicly display,
64
78
publicly perform, sublicense, and distribute Your Contributions
65
79
and such derivative works.
66
80
67
81
3. Grant of Patent License.
68
82
69
-
Subject to the terms and conditions of this Agreement,
70
-
You hereby grant to IBM and to recipients of software
71
-
distributed by IBM a perpetual, worldwide, non-exclusive,
83
+
Subject to the terms and conditions of this Agreement,
84
+
You hereby grant to IBM and to recipients of software
85
+
distributed by IBM a perpetual, worldwide, non-exclusive,
72
86
no-charge, royalty-free, irrevocable (except as
73
87
stated in this section) patent license to make, have made, use,
74
88
offer to sell, sell, import, and otherwise transfer the Work,
@@ -86,7 +100,7 @@ You accept and agree to the following terms and conditions for Your present and
86
100
4. You represent that You are legally entitled to grant the above
87
101
license.
88
102
89
-
You represent further that each employee of the Corporation
103
+
You represent further that each employee of the Corporation
90
104
designated on Schedule A below (or in a subsequent written
91
105
modification to that Schedule) is authorized to submit
0 commit comments