Skip to main content

Octave Cloud IoT Command Line Interface (CLI)

Project description

ocsw-cli - Octave Cloud command-line tool

Build Status PyPI version License: MIT codecov

This is not an official implementation of the command line interface (CLI) for the Octave Cloud REST API.

The ocsw makes calls to Octave Cloud Infrastructure APIs to provide the functionality implemented for the various services. These are REST APIs that use HTTPS requests and responses.

API Reference

This package includes a client implementing the api described in https://rest.octave.dev/

Requirements

To install and use the CLI, you must have:

  • An Octave Cloud Infrastructure account. A user created in that account, in a group with a policy that grants the desired permissions. This account user can be that calls the API.

  • System use token-based authentication. You can get the API token for your user by logging into Octave Cloud, On the lower left side of the main page, you will see Master Token option. Click here and a pop up will display your token along with the user you will use with the Octave Cloud APIs.

Installation

As per usual:

pip install ocsw

Environment variables

VARIABLE Description
OCTAVE_CLOUD_API_URL default: https://octave-api.sierrawireless.io/v5.0
End point octave cloud
OCTAVE_CLOUD_TOKEN Master Token
OCTAVE_CLOUD_USER Your user id
OCTAVE_CLOUD_COMPANY Identifier of one of the company

Usage

usage: ocsw-cli [-h] [-H] [-C PATH] [-D] [-v] [--show-secrets]  ...

Manage and monitor your devices

optional arguments:
  -h, --help      show this help message and exit
  -H              show help from all command
  -C PATH         location of configuration path (default ".")
  -D, --debug     enable debug output
  -v, --version   show program's version number and exit
  --show-secrets  decrypt secrets and displays plain text

commands:

    blueprint     Manage blueprints
    cloud         Manage cloud
    cloud_action  Manage cloud actions
    company       Manage companies
    device        Manage devices
    edge_action   Manage edge actions
    firmware      Manage firmware's
    group         Manage user groups
    stream        Manage streams
    user          Manage users
    identity      Display detailed information about current user
    login         Log in to a Octave Cloud
    logout        Log out from a Octave Cloud
    release       Display Octave API Version Information

Command: blueprint

usage: ocsw-cli blueprint [-h] COMMAND ...

Manage blueprints

positional arguments:
  COMMAND
    ls        display blueprint list
    inspect   display detailed information on one or more blueprints
    diff      differences between blueprint versions

optional arguments:
  -h, --help  show this help message and exit

Command: cloud

usage: ocsw-cli cloud [-h] COMMAND ...

Manage Cloud

positional arguments:
  COMMAND
    fetch     download objects and refs from cloud
    export    download objects and refs from cloud

optional arguments:
  -h, --help  show this help message and exit

Command: cloud_action

usage: ocsw-cli cloud_action [-h] COMMAND ...

Manage cloud actions

positional arguments:
  COMMAND
    inspect   display detailed information on one or more cloud actions
    ls        list cloud action
    diff      differences in javascript between cloud action versions

optional arguments:
  -h, --help  show this help message and exit

Command: company

usage: ocsw-cli company [-h] COMMAND ...

Manage companies

positional arguments:
  COMMAND
    ls        display company list
    inspect   display detailed information on one or more companies
    switch    set company active

optional arguments:
  -h, --help  show this help message and exit

Command: device

usage: ocsw-cli device [-h] COMMAND ...

Manage devices

positional arguments:
  COMMAND
    actions   list device edge actions
    create    creating device
    inspect   display detailed information on one or more devices
    lc        list devices configuration
    li        list devices identity
    ls        list devices connectivity
    rm        remove one or more devices
    tags      set device tags
    events    display recent events
    changes   display recent changes

optional arguments:
  -h, --help  show this help message and exit

Command: edge_action

usage: ocsw-cli edge_action [-h] COMMAND ...

Manage edge actions

positional arguments:
  COMMAND
    inspect   display detailed information on one or more edge actions
    ls        list edge action
    diff      differences in javascript between edge action versions

optional arguments:
  -h, --help  show this help message and exit

Command: firmware

usage: ocsw-cli firmware [-h] COMMAND ...

Manage firmware

positional arguments:
  COMMAND
    ls        list of available firmware
    note      display notes on one or more firmware

optional arguments:
  -h, --help  show this help message and exit

Command: group

usage: ocsw-cli group [-h] COMMAND ...

Manage user groups

positional arguments:
  COMMAND
    ls        display user group list
    inspect   display detailed information on one or more user groups

optional arguments:
  -h, --help  show this help message and exit

Command: stream

usage: ocsw-cli stream [-h] COMMAND ...

Manage streams

positional arguments:
  COMMAND
    ls        display streams list
    inspect   display detailed information on one or more streams
    events    display stream events list

optional arguments:
  -h, --help  show this help message and exit

Command: user

usage: ocsw-cli user [-h] COMMAND ...

Manage users

positional arguments:
  COMMAND
    ls        display user list
    inspect   display detailed information on one or more users

optional arguments:
  -h, --help  show this help message and exit

Command: identity

usage: ocsw-cli identity [-h]

Display detailed information about current user

optional arguments:
  -h, --help  show this help message and exit

Command: login

usage: ocsw-cli login [-h] [-t] [-u] [COMPANY]

Log in to a Octave Cloud

positional arguments:
  COMPANY           company name

optional arguments:
  -h, --help        show this help message and exit
  -t , --token      token
  -u , --username   username

Command: logout

usage: ocsw-cli logout [-h]

Log out from a Octave Cloud

optional arguments:
  -h, --help  show this help message and exit

Command: release

usage: ocsw-cli release [-h]

Display Octave API Version Information

optional arguments:
  -h, --help  show this help message and exit

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

ocsw-0.2.0.dev2.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

ocsw-0.2.0.dev2-py3-none-any.whl (63.4 kB view details)

Uploaded Python 3

File details

Details for the file ocsw-0.2.0.dev2.tar.gz.

File metadata

  • Download URL: ocsw-0.2.0.dev2.tar.gz
  • Upload date:
  • Size: 29.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for ocsw-0.2.0.dev2.tar.gz
Algorithm Hash digest
SHA256 962d9d9d335ba4d447a393d2d2c19ca722712c8499fc4b2699caa223fe476fc4
MD5 72ea6cf00147f3a5e9ea3179a933d88b
BLAKE2b-256 0bd51f35e8712c5f99894823f9ec3df7982f5a7c370c4e7c1a8731c1b1f71409

See more details on using hashes here.

File details

Details for the file ocsw-0.2.0.dev2-py3-none-any.whl.

File metadata

  • Download URL: ocsw-0.2.0.dev2-py3-none-any.whl
  • Upload date:
  • Size: 63.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for ocsw-0.2.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 8394e327a467ea99027ad299459ba84eb76f7cf47ac7f33a3fff4190f9dc7443
MD5 76c476f030c4592ee3436eb609c9c37d
BLAKE2b-256 51595a7e84bbecb807c2b38b75193e7c9c132652d7c6e44bc66394526c270bb9

See more details on using hashes here.

Supported by

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