cloudmesh-inventory


Namecloudmesh-inventory JSON
Version 5.0.2 PyPI version JSON
download
home_page
SummaryA cloudmesh command called inventory
upload_time2023-12-23 05:58:34
maintainer
docs_urlNone
author
requires_python>=3.8
licenseApache License Version 2.0, January 2004 http://www.apache.org/licenses/ Copyright 2017 Gregor von Laszewski, Indiana University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords helper library cloudmesh
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # Cloudmesh Inventory

[![Version](https://img.shields.io/pypi/v/cloudmesh-inventory.svg)](https://pypi.python.org/pypi/cloudmesh-inventory)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/cloudmesh/cloudmesh-inventory/blob/main/LICENSE)
[![Python](https://img.shields.io/pypi/pyversions/cloudmesh-inventory.svg)](https://pypi.python.org/pypi/cloudmesh-inventory)
[![Format](https://img.shields.io/pypi/format/cloudmesh-inventory.svg)](https://pypi.python.org/pypi/cloudmesh-inventory)
[![Format](https://img.shields.io/pypi/status/cloudmesh-inventory.svg)](https://pypi.python.org/pypi/cloudmesh-inventory)
[![Travis](https://travis-ci.com/cloudmesh/cloudmesh-inventory.svg?branch=main)](https://travis-ci.com/cloudmesh/cloudmesh-inventory)


<!--TOC-->

- [Cloudmesh Inventory](#cloudmesh-inventory)
  - [Introduction](#introduction)
  - [Cloudmesh Manual](#cloudmesh-manual)
  - [Instalation and Documentation](#instalation-and-documentation)
    - [Instalation with pip](#instalation-with-pip)
    - [Instalation from source](#instalation-from-source)
    - [Configuration](#configuration)
  - [BUGS](#bugs)
  - [Manpage](#manpage)

<!--TOC-->

## Introduction

Often we need a convenient way to manage inventories for Computers and Services. One way to do this is in databases or flat files, or dedicated services. Cloudmesh Inventory is designed to be at this time super simple and provides a list of computer entries that are used to document if a service is running on it. It uses a very small set of metadata to keep it extremely simple. All attribute values are strings. An example is 

    g001:
      cluster: gregor
      comment: test
      host: g001
      ip: 127.0.0.1
      label: g001
      metadata: None
      name: g001
      owners: gvonlasz
      project: cloudmesh
      service: compute

We explain our intended use of the attributes next 

| Attribute | Description |
| --- | ---| 
| cluster | The name of the cluster this entry is associated with | 
| description | a description | 
| comment | a comment | 
| host | the unique name of the host | 
| ip | the ip address |
| name | a unique hostname for the entry |
| label | a unique label that may include more than the hostname |
| metadata | a string in which metadata can be placed |
| owners | a list of owners of the machine (comma separated) |
| project | a string representiing a project name |
| service | a string representing the service |
| os | name of the operating system |


## Cloudmesh Manual

The manual for cloudmesh can be found at 

* https://cloudmesh.github.io/cloudmesh-manual/

Cloudmesh Inventory, however can also be used as standalone product.

## Instalation and Documentation

Make sure you have a new version of python and pip. We tested with with versions greater then

* python 3.7.3
* pip 19.0.3

### Instalation with pip

You will need the followng other cloudmesh modules before you can
install via pip:

```bash
$ pip insatll cloudmesh-common
$ pip insatll cloudmesh-cmd5
$ pip insatll cloudmesh-inventory
```

### Instalation from source

As developer we recommend yo use the instalation from source. For this we have a convenient cloudmesh installer program that outomates fetching the source and does the install for you.
To install it form source use:


    $ mkdir ~/cm
    $ cd ~/cm
    
    $ pip install cloudmesh-installer    
    $ cloudmesh-installer git clone inventory
    $ cloudmesh-installer install inventory
    
This will clone a number of repositories in the `cm` directory and
install them with  `pip` from them.

### Configuration

Your inventory will be located at

    ~/.cloudmesh/inventory.yaml

An example file will look as follows:

    g001:
      cluster: gregor
      comment: test
      host: g001
      ip: 127.0.0.1
      label: g001
      metadata: None
      name: g001
      owners: gvonlasz
      project: cloudmesh
      service: compute
      os: ubuntu20.04
    g002:
      cluster: gregor
      comment: test
      host: g002
      ip: 127.0.0.1
      label: g002
      metadata: None
      name: g002
      owners: gvonlasz
      project: cloudmesh
      service: compute
      os: ubuntu20.04

## BUGS

If you like to see fetures added or find bugs, please let us know.

## Manpage

<!--MANUAL-->
```
    inventory add NAMES [--label=LABEL]
                        [--services=SERVICES]
                        [--project=PROJECT]
                        [--owners=OWNERS]
                        [--comment=COMMENT]
                        [--inventory=INVENTORY]
                        [--cluster=CLUSTER]
                        [--ip=IP]
                        [--service=SERVICE]
                        [--tag=TAG]
                        [--keyfile=KEYFILE]
                        [--router=ROUTER]
                        [--locale=LOCALE]
                        [--timezone=TIMEZONE]
    inventory create TAG [--hostnames=NAMES]
                         [--ip=IP]
                         [--inventory=INVENTORY]
                         [--keyfile=KEYFILE]
    inventory set NAMES ATTRIBUTE to VALUES [--inventory=INVENTORY] [--listvalue]
    inventory delete NAMES [--inventory=INVENTORY]
    inventory clone NAMES from SOURCE [--inventory=INVENTORY]
    inventory list [NAMES] [--format=FORMAT] [--columns=COLUMNS] [--inventory=INVENTORY]
    inventory info [--inventory=INVENTORY]
    inventory remove --inventory=INVENTORY

Arguments:
  NAMES     Name of the resources (example i[10-20])
  FORMAT    The format of the output is either txt,
            yaml, dict, table [default: table].
  OWNERS    a comma separated list of owners for this resource
  LABEL     a unique label for this resource
  SERVICE   a string that identifies the service
  PROJECT   a string that identifies the project
  SOURCE    a single host name to clone from
  COMMENT   a comment

Options:
   -v       verbose mode
   --keyfile=KEYFILE      Keyfile to assign [default: ~/.ssh/id_rsa.pub]

Description:

      add -- adds a resource to the resource inventory
      list -- lists the resources in the given format
      delete -- deletes objects from the table
      clone -- copies the content of an existing object
               and creates new once with it
      set   -- sets for the specified objects the attribute
               to the given value or values. If multiple values
               are used the values are assigned to the and
               objects in order. See examples
      map   -- allows to set attributes on a set of objects
               with a set of values

Examples:

  cms inventory add x[0-3] --service=openstack
      adds hosts x0, x1, x2, x3 and puts the string
      openstack into the service column

  cms inventory list
      lists the repository

  cms inventory set x[3-4] temperature to 32
      sets for the resources x3, x4 the value of the
      temperature to 32

  cms inventory set x[7-8] ip to 128.0.0.[0-1]
      sets the value of x7 to 128.0.0.0
      sets the value of x8 to 128.0.0.1

  cms inventory set x1 services to bridge,kubernetes --listvalue
      sets the value of x1 to [bridge, kubernetes]
      The --listvalue option indicates the value set is a list

  cms inventory clone x[5-6] from x3
      clones the values for x5, x6 from x3

```
<!--MANUAL-->

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "cloudmesh-inventory",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Gregor von Laszewski <laszewski@gmail.com>",
    "keywords": "helper library,cloudmesh",
    "author": "",
    "author_email": "Gregor von Laszewski <laszewski@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/4a/7b/9e18e4c8703892a6449d4fc356be092b164be15340494df11f7d2ebe424a/cloudmesh-inventory-5.0.2.tar.gz",
    "platform": null,
    "description": "# Cloudmesh Inventory\n\n[![Version](https://img.shields.io/pypi/v/cloudmesh-inventory.svg)](https://pypi.python.org/pypi/cloudmesh-inventory)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/cloudmesh/cloudmesh-inventory/blob/main/LICENSE)\n[![Python](https://img.shields.io/pypi/pyversions/cloudmesh-inventory.svg)](https://pypi.python.org/pypi/cloudmesh-inventory)\n[![Format](https://img.shields.io/pypi/format/cloudmesh-inventory.svg)](https://pypi.python.org/pypi/cloudmesh-inventory)\n[![Format](https://img.shields.io/pypi/status/cloudmesh-inventory.svg)](https://pypi.python.org/pypi/cloudmesh-inventory)\n[![Travis](https://travis-ci.com/cloudmesh/cloudmesh-inventory.svg?branch=main)](https://travis-ci.com/cloudmesh/cloudmesh-inventory)\n\n\n<!--TOC-->\n\n- [Cloudmesh Inventory](#cloudmesh-inventory)\n  - [Introduction](#introduction)\n  - [Cloudmesh Manual](#cloudmesh-manual)\n  - [Instalation and Documentation](#instalation-and-documentation)\n    - [Instalation with pip](#instalation-with-pip)\n    - [Instalation from source](#instalation-from-source)\n    - [Configuration](#configuration)\n  - [BUGS](#bugs)\n  - [Manpage](#manpage)\n\n<!--TOC-->\n\n## Introduction\n\nOften we need a convenient way to manage inventories for Computers and Services. One way to do this is in databases or flat files, or dedicated services. Cloudmesh Inventory is designed to be at this time super simple and provides a list of computer entries that are used to document if a service is running on it. It uses a very small set of metadata to keep it extremely simple. All attribute values are strings. An example is \n\n    g001:\n      cluster: gregor\n      comment: test\n      host: g001\n      ip: 127.0.0.1\n      label: g001\n      metadata: None\n      name: g001\n      owners: gvonlasz\n      project: cloudmesh\n      service: compute\n\nWe explain our intended use of the attributes next \n\n| Attribute | Description |\n| --- | ---| \n| cluster | The name of the cluster this entry is associated with | \n| description | a description | \n| comment | a comment | \n| host | the unique name of the host | \n| ip | the ip address |\n| name | a unique hostname for the entry |\n| label | a unique label that may include more than the hostname |\n| metadata | a string in which metadata can be placed |\n| owners | a list of owners of the machine (comma separated) |\n| project | a string representiing a project name |\n| service | a string representing the service |\n| os | name of the operating system |\n\n\n## Cloudmesh Manual\n\nThe manual for cloudmesh can be found at \n\n* https://cloudmesh.github.io/cloudmesh-manual/\n\nCloudmesh Inventory, however can also be used as standalone product.\n\n## Instalation and Documentation\n\nMake sure you have a new version of python and pip. We tested with with versions greater then\n\n* python 3.7.3\n* pip 19.0.3\n\n### Instalation with pip\n\nYou will need the followng other cloudmesh modules before you can\ninstall via pip:\n\n```bash\n$ pip insatll cloudmesh-common\n$ pip insatll cloudmesh-cmd5\n$ pip insatll cloudmesh-inventory\n```\n\n### Instalation from source\n\nAs developer we recommend yo use the instalation from source. For this we have a convenient cloudmesh installer program that outomates fetching the source and does the install for you.\nTo install it form source use:\n\n\n    $ mkdir ~/cm\n    $ cd ~/cm\n    \n    $ pip install cloudmesh-installer    \n    $ cloudmesh-installer git clone inventory\n    $ cloudmesh-installer install inventory\n    \nThis will clone a number of repositories in the `cm` directory and\ninstall them with  `pip` from them.\n\n### Configuration\n\nYour inventory will be located at\n\n    ~/.cloudmesh/inventory.yaml\n\nAn example file will look as follows:\n\n    g001:\n      cluster: gregor\n      comment: test\n      host: g001\n      ip: 127.0.0.1\n      label: g001\n      metadata: None\n      name: g001\n      owners: gvonlasz\n      project: cloudmesh\n      service: compute\n      os: ubuntu20.04\n    g002:\n      cluster: gregor\n      comment: test\n      host: g002\n      ip: 127.0.0.1\n      label: g002\n      metadata: None\n      name: g002\n      owners: gvonlasz\n      project: cloudmesh\n      service: compute\n      os: ubuntu20.04\n\n## BUGS\n\nIf you like to see fetures added or find bugs, please let us know.\n\n## Manpage\n\n<!--MANUAL-->\n```\n    inventory add NAMES [--label=LABEL]\n                        [--services=SERVICES]\n                        [--project=PROJECT]\n                        [--owners=OWNERS]\n                        [--comment=COMMENT]\n                        [--inventory=INVENTORY]\n                        [--cluster=CLUSTER]\n                        [--ip=IP]\n                        [--service=SERVICE]\n                        [--tag=TAG]\n                        [--keyfile=KEYFILE]\n                        [--router=ROUTER]\n                        [--locale=LOCALE]\n                        [--timezone=TIMEZONE]\n    inventory create TAG [--hostnames=NAMES]\n                         [--ip=IP]\n                         [--inventory=INVENTORY]\n                         [--keyfile=KEYFILE]\n    inventory set NAMES ATTRIBUTE to VALUES [--inventory=INVENTORY] [--listvalue]\n    inventory delete NAMES [--inventory=INVENTORY]\n    inventory clone NAMES from SOURCE [--inventory=INVENTORY]\n    inventory list [NAMES] [--format=FORMAT] [--columns=COLUMNS] [--inventory=INVENTORY]\n    inventory info [--inventory=INVENTORY]\n    inventory remove --inventory=INVENTORY\n\nArguments:\n  NAMES     Name of the resources (example i[10-20])\n  FORMAT    The format of the output is either txt,\n            yaml, dict, table [default: table].\n  OWNERS    a comma separated list of owners for this resource\n  LABEL     a unique label for this resource\n  SERVICE   a string that identifies the service\n  PROJECT   a string that identifies the project\n  SOURCE    a single host name to clone from\n  COMMENT   a comment\n\nOptions:\n   -v       verbose mode\n   --keyfile=KEYFILE      Keyfile to assign [default: ~/.ssh/id_rsa.pub]\n\nDescription:\n\n      add -- adds a resource to the resource inventory\n      list -- lists the resources in the given format\n      delete -- deletes objects from the table\n      clone -- copies the content of an existing object\n               and creates new once with it\n      set   -- sets for the specified objects the attribute\n               to the given value or values. If multiple values\n               are used the values are assigned to the and\n               objects in order. See examples\n      map   -- allows to set attributes on a set of objects\n               with a set of values\n\nExamples:\n\n  cms inventory add x[0-3] --service=openstack\n      adds hosts x0, x1, x2, x3 and puts the string\n      openstack into the service column\n\n  cms inventory list\n      lists the repository\n\n  cms inventory set x[3-4] temperature to 32\n      sets for the resources x3, x4 the value of the\n      temperature to 32\n\n  cms inventory set x[7-8] ip to 128.0.0.[0-1]\n      sets the value of x7 to 128.0.0.0\n      sets the value of x8 to 128.0.0.1\n\n  cms inventory set x1 services to bridge,kubernetes --listvalue\n      sets the value of x1 to [bridge, kubernetes]\n      The --listvalue option indicates the value set is a list\n\n  cms inventory clone x[5-6] from x3\n      clones the values for x5, x6 from x3\n\n```\n<!--MANUAL-->\n",
    "bugtrack_url": null,
    "license": "Apache License Version 2.0, January 2004 http://www.apache.org/licenses/  Copyright 2017 Gregor von Laszewski, Indiana University  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.  You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License. ",
    "summary": "A cloudmesh command called inventory",
    "version": "5.0.2",
    "project_urls": {
        "Changelog": "https://github.com/cloudmesh/cloudmesh-inventory/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/cloudmesh/cloudmesh-inventory/blob/main/README.md",
        "Homepage": "https://github.com/cloudmesh/cloudmesh-inventory",
        "Issues": "https://github.com/cloudmesh/cloudmesh-inventory/issues",
        "Repository": "https://github.com/cloudmesh/cloudmesh-inventory.git"
    },
    "split_keywords": [
        "helper library",
        "cloudmesh"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0788c22cb8311f0f9ed90717bf4cf06aff575d93cff8aaa9898b26e51dfba867",
                "md5": "c6169b84c795b79bad944651d6fd2e63",
                "sha256": "e8cbb0b22efdfaa2993b0269f57f5501468a06617a2ad83447829f639bdad9b4"
            },
            "downloads": -1,
            "filename": "cloudmesh_inventory-5.0.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c6169b84c795b79bad944651d6fd2e63",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 12453,
            "upload_time": "2023-12-23T05:58:32",
            "upload_time_iso_8601": "2023-12-23T05:58:32.653635Z",
            "url": "https://files.pythonhosted.org/packages/07/88/c22cb8311f0f9ed90717bf4cf06aff575d93cff8aaa9898b26e51dfba867/cloudmesh_inventory-5.0.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a7b9e18e4c8703892a6449d4fc356be092b164be15340494df11f7d2ebe424a",
                "md5": "037915d231c8c530ca5590b58c5fce4f",
                "sha256": "ef585c0fb596df5779758beb7a8558ca2e144bb84aee78833102c486428a9b17"
            },
            "downloads": -1,
            "filename": "cloudmesh-inventory-5.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "037915d231c8c530ca5590b58c5fce4f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 15290,
            "upload_time": "2023-12-23T05:58:34",
            "upload_time_iso_8601": "2023-12-23T05:58:34.487876Z",
            "url": "https://files.pythonhosted.org/packages/4a/7b/9e18e4c8703892a6449d4fc356be092b164be15340494df11f7d2ebe424a/cloudmesh-inventory-5.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-23 05:58:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cloudmesh",
    "github_project": "cloudmesh-inventory",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "cloudmesh-inventory"
}
        
Elapsed time: 0.22303s