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
Copy file name to clipboardExpand all lines: articles/cyclecloud/python-api.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,18 +8,18 @@ ms.author: rokeptne
8
8
9
9
# Python API
10
10
11
-
The CycleCloud Python API allows you to interact with the CycleCloud REST API without having to manually perform the HTTP requests. To acquire the API source distribution, navigate to */about* on your CycleCloud installation and click on the **Download Python API** link. Once you have the source distribution you can `pip install` it into your python environment and get started.
11
+
The CycleCloud Python API allows you to interact with the CycleCloud REST API without having to manually perform the HTTP requests. To acquire the API source distribution, navigate to */about* on your CycleCloud installation and click on the **Download Python API** link. Once you have the source distribution, you can do`pip install` it into your python environment and get started.
12
12
13
13
## Client Objects
14
14
15
-
A Client object can be constructed with or without a configuration specified. If you don't specify a config dictionary it will automatically attempt to pull the configuration from the default CycleCloud CLI ini file (*~/.cycle/config.ini*).
15
+
A Client object can be constructed with or without a configuration specified. If you don't specify a config dictionary it automatically attempts to pull the configuration from the default CycleCloud CLI ini file (*~/.cycle/config.ini*).
16
16
17
17
The configuration can be provided as a dict with the following key/value pairs:
18
18
19
19
-`url` - *required*, the url of the web interface to the CycleCloud installation
20
20
-`username` - *required*
21
21
-`password` - *required*, the plain text password of the user
22
-
-`timeout` - the time, in seconds, before a timeout error will occur when attempting to connect/communicate with the system (60 by default)
22
+
-`timeout` - the time, in seconds, before a timeout error occurs when attempting to connect/communicate with the system (60 by default)
23
23
-`verify_certificates` - a boolean indicating whether certificate checking should be enabled (True by default)
24
24
25
25
Alternatively, these values can be given as keyword arguments to the constructor.
-`get_status(nodes=False)` - Gets a [Cluster Status](api.md#clusterstatus) object of the cluster, optionally populating the node list as well.
77
77
78
-
-`scale_by_cores(node_array, total_core_count)` - Sets the system to scale the specified node array to the desired total core count. If the node array already contains more than `total_core_count` cores then the call will have no effect.
78
+
-`scale_by_cores(node_array, total_core_count)` - Sets the system to scale the specified node array to the desired total core count. If the node array already contains more than `total_core_count` cores, then the call has no effect.
79
79
80
-
-`scale_by_nodes(node_array, total_node_count)` - Sets the system to scale the specified node array to the desired total node count. If the node array already contains more than `total_node_count` nodes then the call will have no effect.
80
+
-`scale_by_nodes(node_array, total_node_count)` - Sets the system to scale the specified node array to the desired total node count. If the node array already contains more than `total_node_count` nodes, then the call has no effect.
81
81
82
82
## Direct API
83
83
84
-
The rest API can be accessed in a more direct manner by using the api at `cyclecloud.api` and `cyclecloud.model` which is generated directly from the [REST API](api.md). To do so you simply construct a Client object and make calls using the `session` property provided on it.
84
+
The rest API can be accessed in a more direct manner by using the API at `cyclecloud.api` and `cyclecloud.model` which is generated directly from the [REST API](api.md). To do so you construct a Client object and make calls using the `session` property provided on it.
0 commit comments