1.0.34 • Published 4 years ago

airties-cloud-cli v1.0.34

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

AirTies Cloud CLI

This CLI helps executing commands against AirTies Cloud Services. It has following commands available:

  • air set [var-name] [value]: stores a value into a variable in the global context
  • air print [var-name]: prints the value of a given variable in the global context
  • air token: get an access token from the server and stores it into a variable 'api-token' in the global context. It requires following variables to be set into the global context prior to executing it: 'api-host', 'api-user', 'api-password', 'api-domain-id'.

Following commands require a value for 'api-token' to be set into the global context prior to executing them.

  • air read [var-name] [file-path]: reads a given file's content into a variable in the global context
  • air live [serial] [var-name]: sends the request in the variable to the target serial.
  • air lset [serial] [tr69-path] [value]: sets the given value to the given tr69 path.
  • air lget [serial] [tr69-path]: prints the value of the given tr69 path.
  • air ltop [serial]: prints the live topology of the given serial.
  • air lstat [serial]: prints the live status of the given serial.
  • air pdel [serial]: deletes the provisioning of the given serial.

In order to have a global context across executions, a global context is stored in a file named '.env' in the execution folder. The format of content is JSON. When you complete your work, please clean your sensitive data from the file or delete it.

In order to use the CLI take following actions:

sudo npm install -g airties-cloud-cli
air set api-host your-api-host for example https://api.example.com
air set api-user your-user
air set api-password your-password
air set api-domain-id your-domain-id

Get a token.

air token

Now you have token stored into the context.

Get a single value from the given serial.

air lget serial-1 Device.DeviceInfo.ModelName

Read a file that has a predefined setParams or getParams into the context.

air read request ./set.json

The file is being read; send it to a serial.

air live serial-1 request

When -v is added to the command as the last argument, the request and response are printed to console.

air live serial-1 request -v

If serials are given in a text file named serials.txt and you are required to run a command towards those serials, you may run this to execute commands in batch towards serials.

	air csv live devices.csv

In this case, csv is the main command while live is the command executed in iterations. The rest of parameters required for the iterated command are given in the csv file on each line separated by commas.

serial-1,request

When a long running job is executed, access token may expire. To enable automatic token refresh, execute the below prior to running the job.

air set api-token-refresh yes

Please be informed that this is an unofficial toolkit and is not officially supported by AirTies.

1.0.33

4 years ago

1.0.34

4 years ago

1.0.28

4 years ago

1.0.32

4 years ago

1.0.30

4 years ago

1.0.26

4 years ago

1.0.27

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.23

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago