Skip to content

Commit

Permalink
Update links now that PyLXD and LXD have moved to Canonical
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
  • Loading branch information
simondeziel committed Jul 11, 2023
1 parent fd83e0f commit e7d13e3
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 30 deletions.
7 changes: 3 additions & 4 deletions doc/source/clustering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The :py:class:`~pylxd.models.cluster.Cluster` object represents the json
object that is returned from `GET /1.0/cluster`.

.. note:: Please see the pylxd API documentation for more information on
storage pool methods and parameters. The following is a summary.
cluster methods and parameters. The following is a summary.

Cluster methods
^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -69,6 +69,5 @@ the `LXD Cluster REST API`_ documentation.

.. links
.. _LXD Storage Pools: https://linuxcontainers.org/lxd/docs/master/storage/
.. _LXD REST API: https://github.com/lxc/lxd/blob/master/doc/rest-api.md
.. _LXD Cluster REST API: https://github.com/lxc/lxd/blob/master/doc/rest-api.md#10cluster
.. _LXD Clustering: https://documentation.ubuntu.com/lxd/en/latest/clustering/
.. _LXD REST API: https://documentation.ubuntu.com/lxd/en/latest/api/
16 changes: 7 additions & 9 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ pyLXD development is done on `Github`_. Pull Requests and Issues should be
filed there. We try and respond to PRs and Issues within a few days.

If you would like to contribute major features or have big ideas, it's best to
post at the `Linux Containers disucssion forum
<https://discuss.linuxcontainers.org/>`_ to discuss your ideas before
post at the `LXD category in Ubuntu's Discourse
<https://discourse.ubuntu.com/c/lxd/126>`_ to discuss your ideas before
submitting PRs. If you use ``[pylxd]`` in the title, it'll make it clearer.

Adding a Feature or Fixing a Bug
Expand All @@ -26,7 +26,7 @@ The main steps are:
* bug/number/descriptive-name-of-bug

This can be done with ``git checkout -b feature/name-of-feature`` from the
master branch.
main branch.
4. Work on that branch, push to the personal GitHub repository and then create
a Pull Request. It's a good idea to create the Pull Request early,
particularly for features, so that it can be discussed and help sought (if
Expand All @@ -42,9 +42,7 @@ In order for a Pull Request to be merged the following criteria needs to be
met:

1. All of the commits in the PR need to be `signed off using the '-s' option
with git commit <https://git-scm.com/docs/git-commit>`_. This is a
requirement for all projects in the `Github Linux Containers projects space
<https://github.com/lxc>`_.
with git commit <https://git-scm.com/docs/git-commit>`_.
2. Unit tests are required for the changes. These are in the ``pylxd/tests``
directory and follow the same directory structure as the module.
3. The unit test code coverage for the project shouldn't drop. This means that
Expand Down Expand Up @@ -93,8 +91,8 @@ Unit Testing
^^^^^^^^^^^^

pyLXD tries to follow best practices when it comes to testing. PRs are gated
by `GitHub Actions <https://github.com/lxc/pylxd/actions>`_ and
`CodeCov <https://codecov.io/gh/lxc/pylxd>`_. It's best to submit tests
by `GitHub Actions <https://github.com/canonical/pylxd/actions>`_ and
`CodeCov <https://codecov.io/gh/canonical/pylxd>`_. It's best to submit tests
with new changes, as your patch is unlikely to be accepted without them.

To run the tests, you should use `Tox`_::
Expand All @@ -107,6 +105,6 @@ Integration Testing
Integration testing requires a running LXD system. They can be tested locally
in LXD container with nesting support; ``tox -e integration-in-lxd``.

.. _Github: https://github.com/lxc/pylxd
.. _Github: https://github.com/canonical/pylxd
.. _Tox: https://documentation.ubuntu.com/lxd/en/latest/clustering/
.. _Multipass: https://github.com/canonical/multipass
2 changes: 1 addition & 1 deletion doc/source/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ needed. The `ws4py` library is used to establish the connection; please
see the `ws4py` documentation for more information.

The stream of events can be filtered to include only specific types of
events, as defined in the LXD /endpoint `documentation <https://github.com/lxc/lxd/blob/master/doc/rest-api.md#10events>`_.
events, as defined in the LXD /endpoint `documentation <https://documentation.ubuntu.com/lxd/en/latest/events/>`_.

To receive all events of type 'operation' or 'logging', generated by the
LXD server:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ the `LXD documentation`_.
- `uploaded_at` - The date and time the image was uploaded
- `update_source` - A dict of update informations

.. _LXD documentation: https://github.com/lxc/lxd/blob/master/doc/rest-api.md#10imagesfingerprint
.. _LXD documentation: https://documentation.ubuntu.com/lxd/en/latest/api/#/images/image_get

Image methods
-------------
Expand Down
2 changes: 1 addition & 1 deletion doc/source/instances.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ A instance object (returned by `get` or `all`) has the following methods:
- `rename` - rename a snapshot
- `publish` - create an image from a snapshot. However, this may fail if the
image from the snapshot is bigger than the logical volume that is allocated
by lxc. See https://github.com/lxc/lxd/issues/2201 for more details. The solution
by lxc. See https://github.com/canonical/lxd/issues/2201 for more details. The solution
is to increase the `storage.lvm_volume_size` parameter in lxc.
- `restore` - restore the instance to this snapshot.

Expand Down
5 changes: 2 additions & 3 deletions doc/source/storage-pools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,5 @@ following methods are available:

.. links
.. _LXD Storage Pools: https://linuxcontainers.org/lxd/docs/master/storage/
.. _LXD REST API: https://github.com/lxc/lxd/blob/master/doc/rest-api.md
.. _LXD Storage Pools REST API: https://github.com/lxc/lxd/blob/master/doc/rest-api.md#10storage-pools
.. _LXD Storage Pools: https://documentation.ubuntu.com/lxd/en/latest/storage/
.. _LXD REST API: https://documentation.ubuntu.com/lxd/en/latest/api/
2 changes: 1 addition & 1 deletion integration/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_put(self):
self.assertEqual(p.description, new_desc)

# can't test this as patch doesn't seem to work for storage pools.
# Need to wait until bug: https://github.com/lxc/lxd/issues/4709
# Need to wait until bug: https://github.com/canonical/lxd/issues/4709
# fix is released.
@unittest.skip("Can't test until fix to lxd bug #4709 is released")
def test_patch(self):
Expand Down
2 changes: 1 addition & 1 deletion pylxd/models/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
def _image_create_from_config(client, config, wait=False):
"""Create an image from the given configuration.
See: https://github.com/lxc/lxd/blob/master/doc/rest-api.md#post-6
See: https://documentation.ubuntu.com/lxd/en/latest/api/#/instances/instances_post
"""
response = client.api.images.post(json=config)
if wait:
Expand Down
4 changes: 2 additions & 2 deletions pylxd/models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def _resolve_headers(headers=None, mode=None, uid=None, gid=None):

def delete_available(self):
"""File deletion is an extension API and may not be available.
https://github.com/lxc/lxd/blob/master/doc/api-extensions.md#file_delete
https://documentation.ubuntu.com/lxd/en/latest/api-extensions/#file-delete
"""
return self._instance.client.has_api_extension("file_delete")

Expand Down Expand Up @@ -853,7 +853,7 @@ def publish(self, public=False, wait=False):
If wait=True, an Image is returned.
This functionality is currently broken in LXD. Please see
https://github.com/lxc/lxd/issues/2201 - The implementation
https://github.com/canonical/lxd/issues/2201 - The implementation
here is mostly a guess. Once that bug is fixed, we can verify
that this works, or file a bug to fix it appropriately.
"""
Expand Down
9 changes: 4 additions & 5 deletions pylxd/models/storage_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def create(cls, client, definition):
Note that **all** fields in the `definition` parameter are strings.
For further details on the storage pool types see:
https://linuxcontainers.org/lxd/docs/master/storage/
https://documentation.ubuntu.com/lxd/en/latest/explanation/storage/
The function returns the a `StoragePool` instance, if it is
successfully created, otherwise an Exception is raised.
Expand Down Expand Up @@ -410,8 +410,8 @@ def create(cls, storage_pool, *args, **kwargs):
Implements POST /1.0/storage-pools/<pool>/volumes/custom
See https://github.com/lxc/lxd/blob/master/doc/rest-api.md#post-19 for
more details on what the `definition` parameter dictionary should
See https://documentation.ubuntu.com/lxd/en/latest/api/#/storage/storage_pool_volumes_type_post
for more details on what the `definition` parameter dictionary should
contain for various volume creation.
At the moment the only type of volume that can be created is 'custom',
Expand Down Expand Up @@ -491,8 +491,7 @@ def rename(self, _input, wait=False):
method does not override any items in the input definition, although it
does check that the 'name' and 'pool' parameters are set.
Please see: https://github.com/lxc/lxd/blob/master/doc/rest-api.md
#10storage-poolspoolvolumestypename
Please see: https://documentation.ubuntu.com/lxd/en/latest/api/#/storage/storage_pool_volume_type_post
for more details.
:param _input: The `input` specification for the rename.
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = 2.3.2a
description = python library for LXD
long_description = file: README.rst
author = Paul Hummer and others (see CONTRIBUTORS.rst)
author_email = lxc-devel@lists.linuxcontainers.org
home_page = http://www.linuxcontainers.org
author_email = lxd@lists.canonical.com
home_page = https://ubuntu.com/lxd
classifier =
Intended Audience :: Information Technology
Intended Audience :: System Administrators
Expand Down

0 comments on commit e7d13e3

Please sign in to comment.