clouds2env


Nameclouds2env JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/stephenfin/clouds2env
SummaryA script to generate environment variables based on clouds.yaml details
upload_time2023-03-24 11:57:49
maintainer
docs_urlNone
authorStephen Finucane
requires_python
licenseMIT
keywords openstack
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ============
 clouds2env
============

A tool to convert from an OpenStack ``clouds.yaml`` file to environment
variables. This can be useful when all you have is a ``clouds.yaml`` file but
you need to work with a legacy tool like *novaclient*.

Like *openstacksdk*, *clouds2env* will look in the following location for
``clouds.yaml`` files:

* ``.`` (the current directory)
* ``$HOME/.config/openstack``
* ``/etc/openstack``

The first file found wins.

You can also set the environment variable ``OS_CLIENT_CONFIG_FILE`` to an
absolute path of a file to look for and that location will be inserted at the
front of the file search list.

You can specify the cloud to generate environment variables for by setting the
``OS_CLOUD`` environment variable. Alternatively, you may provide the cloud
name as an argument to tool.

Usage
-----

.. code-block:: shell

    $ clouds2env --help
    usage: clouds2env [-h] [--set | --unset] [cloud]

    A tool to convert from an OpenStack 'clouds.yaml' file to 'OS_'-prefixed
    environment variables suitable for use with legacy tooling like novaclient.

    positional arguments:
      cloud       the cloud to use

    options:
      -h, --help  show this help message and exit
      --set       set environment variables (default)
      --unset     unset environment variables

Example
-------

.. code-block:: shell

    $ export OS_CLOUD=devstack-admin
    $ clouds2env
    export OS_AUTH_URL=http://10.0.108.84/identity
    export OS_PASSWORD=password
    export OS_PROJECT_DOMAIN_ID=default
    export OS_PROJECT_NAME=admin
    export OS_USER_DOMAIN_ID=default
    export OS_USERNAME=admin
    export OS_IDENTITY_API_VERSION=3
    export OS_REGION_NAME=RegionOne
    export OS_VOLUME_API_VERSION=3
    $ eval $(clouds2env)

MIT License

Copyright (c) 2022 Stephen Finucane <stephen@that.guru>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/stephenfin/clouds2env",
    "name": "clouds2env",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "openstack",
    "author": "Stephen Finucane",
    "author_email": "stephen@that.guru",
    "download_url": "https://files.pythonhosted.org/packages/fb/74/c9ab77453a5aaa64f73ff0368f729fb9dd7c4a9070180513934bea040acf/clouds2env-1.2.0.tar.gz",
    "platform": null,
    "description": "============\n clouds2env\n============\n\nA tool to convert from an OpenStack ``clouds.yaml`` file to environment\nvariables. This can be useful when all you have is a ``clouds.yaml`` file but\nyou need to work with a legacy tool like *novaclient*.\n\nLike *openstacksdk*, *clouds2env* will look in the following location for\n``clouds.yaml`` files:\n\n* ``.`` (the current directory)\n* ``$HOME/.config/openstack``\n* ``/etc/openstack``\n\nThe first file found wins.\n\nYou can also set the environment variable ``OS_CLIENT_CONFIG_FILE`` to an\nabsolute path of a file to look for and that location will be inserted at the\nfront of the file search list.\n\nYou can specify the cloud to generate environment variables for by setting the\n``OS_CLOUD`` environment variable. Alternatively, you may provide the cloud\nname as an argument to tool.\n\nUsage\n-----\n\n.. code-block:: shell\n\n    $ clouds2env --help\n    usage: clouds2env [-h] [--set | --unset] [cloud]\n\n    A tool to convert from an OpenStack 'clouds.yaml' file to 'OS_'-prefixed\n    environment variables suitable for use with legacy tooling like novaclient.\n\n    positional arguments:\n      cloud       the cloud to use\n\n    options:\n      -h, --help  show this help message and exit\n      --set       set environment variables (default)\n      --unset     unset environment variables\n\nExample\n-------\n\n.. code-block:: shell\n\n    $ export OS_CLOUD=devstack-admin\n    $ clouds2env\n    export OS_AUTH_URL=http://10.0.108.84/identity\n    export OS_PASSWORD=password\n    export OS_PROJECT_DOMAIN_ID=default\n    export OS_PROJECT_NAME=admin\n    export OS_USER_DOMAIN_ID=default\n    export OS_USERNAME=admin\n    export OS_IDENTITY_API_VERSION=3\n    export OS_REGION_NAME=RegionOne\n    export OS_VOLUME_API_VERSION=3\n    $ eval $(clouds2env)\n\nMIT License\n\nCopyright (c) 2022 Stephen Finucane <stephen@that.guru>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A script to generate environment variables based on clouds.yaml details",
    "version": "1.2.0",
    "split_keywords": [
        "openstack"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e72dcc8348508626817d10f333a0de1629a03199e3cdfdec829f836d9b328c6",
                "md5": "133c0d098b50afd40c34f1d1bda9fe60",
                "sha256": "d3bff51100ec2d32338b70dc3d46907efa5a794cf39bf7e932bceca00d2628d7"
            },
            "downloads": -1,
            "filename": "clouds2env-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "133c0d098b50afd40c34f1d1bda9fe60",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5059,
            "upload_time": "2023-03-24T11:57:47",
            "upload_time_iso_8601": "2023-03-24T11:57:47.167299Z",
            "url": "https://files.pythonhosted.org/packages/4e/72/dcc8348508626817d10f333a0de1629a03199e3cdfdec829f836d9b328c6/clouds2env-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb74c9ab77453a5aaa64f73ff0368f729fb9dd7c4a9070180513934bea040acf",
                "md5": "3ab61f5f4893d8281ddfaea179934f3f",
                "sha256": "a1d0856b914359b6d6063673b5facb7a7002199b0a437b5f24a980db6fde6589"
            },
            "downloads": -1,
            "filename": "clouds2env-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3ab61f5f4893d8281ddfaea179934f3f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4120,
            "upload_time": "2023-03-24T11:57:49",
            "upload_time_iso_8601": "2023-03-24T11:57:49.022250Z",
            "url": "https://files.pythonhosted.org/packages/fb/74/c9ab77453a5aaa64f73ff0368f729fb9dd7c4a9070180513934bea040acf/clouds2env-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-24 11:57:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "stephenfin",
    "github_project": "clouds2env",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "clouds2env"
}
        
Elapsed time: 0.06433s