Skip to content

Commit

Permalink
Merge pull request #553 from simondeziel/move-to-canonical
Browse files Browse the repository at this point in the history
Update links now that PyLXD and LXD have moved to Canonical
  • Loading branch information
tomponline committed Jul 13, 2023
2 parents aee4807 + e7d13e3 commit fd70a6d
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 48 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CI tests
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
lint-python:
Expand Down
27 changes: 14 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ pylxd

.. image:: http://img.shields.io/pypi/v/pylxd.svg
:target: https://pypi.python.org/pypi/pylxd
.. image:: https://github.com/lxc/pylxd/workflows/CI%20tests/badge.svg
:target: https://github.com/lxc/pylxd/actions?query=workflow%3A%22CI+tests%22
.. image:: https://codecov.io/github/lxc/pylxd/coverage.svg?branch=master
:target: https://codecov.io/github/lxc/pylxd
.. image:: https://github.com/canonical/pylxd/workflows/CI%20tests/badge.svg
:target: https://github.com/canonical/pylxd/actions?query=workflow%3A%22CI+tests%22
.. image:: https://codecov.io/github/canonical/pylxd/coverage.svg?branch=main
:target: https://codecov.io/github/canonical/pylxd
.. image:: https://readthedocs.org/projects/pylxd/badge/?version=latest
:target: https://pylxd.readthedocs.io/en/latest/?badge=latest

Expand All @@ -20,26 +20,27 @@ Bug reports
===========

Bug reports can be filed on the `GitHub repository
<https://github.com/lxc/pylxd/issues/new>`_.
<https://github.com/canonical/pylxd/issues/new>`_.

Support and discussions
=======================

We use the `LXC mailing-lists for developer and user discussions
<https://lists.linuxcontainers.org>`_.
We use the `LXD category on Ubuntu's Discourse
<https://discourse.ubuntu.com/c/lxd/126>`_.

If you prefer live discussions, some of us also hang out in
`#lxcontainers
<http://webchat.freenode.net/?channels=#lxcontainers>`_ on irc.freenode.net.
`#lxd
<https://web.libera.chat/#lxd>`_ on irc.libera.chat.

What is LXD? `LXD: Introduction <https://linuxcontainers.org/lxd/>`_
LXD Documentation: `https://documentation.ubuntu.com/lxd/en/latest/
https://documentation.ubuntu.com/lxd/en/latest/`_

PyLXD API Documentation: `http://pylxd.readthedocs.io/en/latest/
<http://pylxd.readthedocs.io/en/latest/>`_
PyLXD API Documentation: `https://pylxd.readthedocs.io/en/latest/
<https://pylxd.readthedocs.io/en/latest/>`_

Contributing to pyLXD
=====================

If you wish to contribute to pyLXD please read the `Contributing Guide
<http://pylxd.readthedocs.io/en/latest/contributing.html>`_, particularly
<https://pylxd.readthedocs.io/en/latest/contributing.html>`_, particularly
around unit tests, integration tests and signing commits.
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/
20 changes: 9 additions & 11 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
.. _Tox: https://tox.readthedocs.io/en/latest/
.. _Multipass: https://github.com/CanonicalLtd/multipass
.. _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/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. pylxd documentation master file, created by
.. pylxd documentation primary file, created by
sphinx-quickstart on Tue Jul 9 22:26:36 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
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 @@ -864,7 +864,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 fd70a6d

Please sign in to comment.