Managing profiles
ioxclient facilitates working with multiple IOx devices. Connection information to each such device is stored as a profile. Any ioxclient command used, is always run in the context of the currently active profile.
Profiles can be managed via ioxclient profiles
and its subcommands.
~$ ioxclient profiles
Active Profile : default
NAME:
ioxclient profiles - Profile related commands
USAGE:
ioxclient profiles command [command options] [arguments...]
COMMANDS:
list, l List all existing profiles
show, s Show currently active profile
create, c Create a new profile
activate, a Activate specified profile
delete, d Delete specified profile
reset, rs Reset profile data
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help
--generate-bash-completion
Creating a profile
If you want to interact with a new IOx device, add relevant information by creating a profile. Give a handy name to the profile so that it is easier to remember while switching between profiles.
~$ ioxclient profiles create
Active Profile : default
Enter a name for this profile : sandbox
Your IOx platform's IP address[127.0.0.1] : 192.168.3.1
Your IOx platform's port number[8443] :
Authorized user name[root] : appdev
Password for appdev :
Local repository path on IOx platform[/software/downloads]:
URL Scheme (http/https) [https]:
API Prefix[/iox/api/v2/hosting/]:
Your IOx platform's SSH Port[2222]: 22
Your RSA key, for signing packages, in PEM format[]:
Your x.509 certificate in PEM format[]:
Activating Profile sandbox
Note: When a new profile is created, it automatically gets activated.
Listing existing profiles
~$ ioxclient profiles list
Active Profile : sandbox
Profile Name : default
Host IP: 72.163.111.112
Host Port: 8443
Auth Keys: YXBwZGV2OmFwcGRldg==
Auth Token:
Api Prefix: /iox/api/v2/hosting/
URL Scheme: https
RSA Key:
Certificate:
Profile Name : sandbox
Host IP: 192.168.3.1
Host Port: 8443
Auth Keys: YXBwZGV2OmFwcGRldg==
Auth Token:
Api Prefix: /iox/api/v2/hosting/
URL Scheme: https
RSA Key: /home/dev/Documents/iox/key.pem
Certificate: /home/dev/Documents/iox/cert.pem
Show currently activated profile
~$ ioxclient profiles show
Active Profile : sandbox
Profile Name : sandbox
Host IP: 192.168.3.1
Host Port: 8443
Auth Keys: YXBwZGV2OmFwcGRldg==
Auth Token:
Api Prefix: /iox/api/v2/hosting/
URL Scheme: https
RSA Key: /home/dev/Documents/iox/key.pem
Certificate: /home/dev/Documents/iox/cert.pem
Activating a profile
~$ ioxclient profiles activate sandbox
Active Profile : default
Activating Profile sandbox
Deleting a profile
~$ ioxclient profiles delete sandbox
Active Profile : sandbox
Deleting profile sandbox
Note that deleting "default" profile is not supported.
~$ ioxclient profiles delete default
Active Profile : default
Cannot delete the default profile
If you want startover, use the 'reset' command instead
Note: Editing an existing profile is not supported. If you would like to reuse an existing profile name, simply delete it and recreate it with desired values.
Overriding profile for a given command
ioxclient
commands operate in the context of the currently active profile. However, in some use cases you may want to use a specific profile for a given command without changing active profile. This can be achieved by passing a valid profile name to the global --profile
option.
When --profile
option is set, ioxclient
will use the profile name passed to the option for the currently run command. After the execution of the command, the previously active profile will be restored back.
$ ./ioxclient --profile local application list
Currently active profile : default
Overriding profile to local for this command
Activating Profile local
Command Name: application-list
List of installed App :
1. py ---> RUNNING
Activating Profile default
Resetting config information
This removes the existing configuration information stored by the tool. After this command, just type ioxclient
which will prompt for fresh config information.
~$ ioxclient profiles reset
Active Profile : default
Your current config details will be lost. Continue (Y/n) ? : Y
Current config backed up at /tmp/hvishwanath/ioxclient291276906
Config data deleted.
When reset is issued, the tool backs up the existing config into a temporary file. If you want to store it, make sure you copy the temporary file to a location you will remember.