Skip to main content

An example cloudmesh command

Project description

Cloudmesh Command bar

GitHub Repo image image License

General badge GitHub issues Contributors General badge

Linux macOS Windows

The cloudmesh command bar is a sample command so you can see how easy it is to generate a command. You can clone is and replace the "bar" with the command name you like.

However there is an easier way, with

pip install cloudmesh-sys

Now you need to clone the cloudmesh-common repo

git clone ...

Next you can generate comands in directories with

cms sys generate xyz

which will create a directory cloudmesh-xyz, where the new command xyz is defined. You can cd into that command and install it with

make local

::

Usage: bar --file=FILE bar list bar [--parameter=PARAMETER] [--experiment=EXPERIMENT] [COMMAND...]

This command does some useful things.

Arguments: FILE a file name PARAMETER a parameterized parameter of the form "a[0-3],a5"

Options: -f specify the file

Description:

> cms bar --parameter="a[1-2,5],a10"
>    example on how to use Parameter.expand. See source code at
>      https://github.com/cloudmesh/cloudmesh-bar/blob/main/cloudmesh/bar/command/bar.py
>    prints the expanded parameter as a list
>    ['a1', 'a2', 'a3', 'a4', 'a5', 'a10']

> bar exp --experiment=a=b,c=d
> example on how to use Parameter.arguments_to_dict. See source code at
>      https://github.com/cloudmesh/cloudmesh-bar/blob/main/cloudmesh/bar/command/bar.py
> prints the parameter as dict
>   {'a': 'b', 'c': 'd'}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudmesh-bar-5.0.20.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

cloudmesh_bar-5.0.20-py2.py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page