doc/clustering: fix examples and cleanup doc
@@ -9,18 +9,6 @@ Cluster object
The :py:class:`~pylxd.models.cluster.Cluster` object represents the json
object that is returned from `GET /1.0/cluster`.
-There is also a :py:class:`~pylxd.models.cluster.ClusterMember` and object that represents a
-cluster member at `GET
-/1.0/cluster/members`. Note that it should be
-accessed from the cluster object. For example:
-
-.. code:: python
-
- client = pylxd.Client()
- cluster = client.cluster.get()
- member = cluster.members.get('node-5')
-
-
.. note:: Please see the pylxd API documentation for more information on
storage pool methods and parameters. The following is a summary.
@@ -44,23 +32,23 @@ the `LXD Cluster REST API`_ documentation.
- `member_config` - configuration information for new cluster members.
-Cluster Members
----------------
+Cluster Members objects
+-----------------------
-Cluster Members are stored in a cluster. On the `pylxd` API they are
-accessed from a cluster object:
+The :py:class:`~pylxd.models.cluster.ClusterMember` object represents the
+json object that is returned from `GET /1.0/cluster/members/<name>`. For
+example:
-.. code:: Python
+.. code:: python
- cluster = client.cluster.get()
- members = cluster.members.all()
- named_member = cluster.members.get('membername')
+ client = pylxd.Client()
+ member = client.cluster.members.get('node-5')
-Methods available on `<cluster_object>.members`
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Methods available on `<clustermember_object>`
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The following methods are accessed from the `members` attribute on the cluster object.
+A cluster member can be queried through the following manager methods:
- `all` - get all the members of the cluster.
- `get` - a get a single named member of the cluster.
