4.7 Sneak Preview vsctl The Improved Command Line Interface by Eskil September 14, 2016 Howto With Vidispine 4.7 you'll get a new and improved command line interface called vsvtl. vsctl can be used to inspect and control a running Vidispine server. It is targeted at operations and developers working with Vidispine.
All information and operations are performed using the API, so this can also be seen as an example on how to interact with Vidispine from Python. We have selected a few commands that we believe are of importance to you, and will slowly but steady continue to improve on the tool.
Usage Let's start with an overview of everything you can do with vsctl. Just run the command without any arguments to see the full help, and you'll get this list.
Usage: vsctl [SWITCHES] [SUBCOMMAND [SWITCHES]] args... Meta-switches: --help Prints this help message and quits --help-all Print help messages of all subcommands and quit -v, --version Prints the programs version and quits Switches: -a, --auth VALUE:str Vidispine user (and password); the default is admin:admin --color Always print colored output --debug Print HTTP requests and responses -h, --host VALUE:str Vidispine server host; the default is localhost:8080 Subcommands: audit Query the audit log; see vsctl audit --help for more info find Find items matching keywords or query; see vsctl find --help for more info health Show current Vidispine health; see vsctl health --help for more info import Import files by path or by direct upload; see vsctl import --help for more info indexing View reindex status; see vsctl indexing --help for more info jobs Show job status; see vsctl jobs --help for more info property Manage configuration properties; see vsctl property --help for more info service Manage services; see vsctl service --help for more info status Show current Vidispine status; see vsctl status --help for more info threads Print stack trace from Vidispine; see vsctl threads --help for more info
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Usage:
vsctl [SWITCHES] [SUBCOMMAND [SWITCHES]] args...
Meta-switches:
--help Prints this help message and quits
--help-all Print help messages of all subcommands and quit
-v, --version Prints the programs version and quits
Switches:
-a, --auth VALUE:str Vidispine user (and password); the default is admin:admin
--color Always print colored output
--debug Print HTTP requests and responses
-h, --host VALUE:str Vidispine server host; the default is localhost:8080
Subcommands:
audit Query the audit log; see vsctl audit --help for more info
find Find items matching keywords or query; see vsctl find --help for more info
health Show current Vidispine health; see vsctl health --help for more info
import Import files by path or by direct upload; see vsctl import --help for more info
indexing View reindex status; see vsctl indexing --help for more info
jobs Show job status; see vsctl jobs --help for more info
property Manage configuration properties; see vsctl property --help for more info
service Manage services; see vsctl service --help for more info
status Show current Vidispine status; see vsctl status --help for more info
threads Print stack trace from Vidispine; see vsctl threads --help for more info
Below we'll present a few of the commands in more detail, and as we continue to work on it we'll present more commands in another blog post.
File import The import commands imports a single file and displays the job id, which could then be checked using GET API/job/{id} or using the job command.
$ ./vsctl import media/squirrel.jpg VX-128963
1
2
$ ./vsctl import media/squirrel.jpg
VX-128963
Item search The find command can be used to perform simple queries by field.
$ ./vsctl find originalFilename=squirrel.jpg VX-491810
1
2
$ ./vsctl find originalFilename=squirrel.jpg
VX-491810
$ ./vsctl find -f title originalFilename=squirrel.jpg VX-491810 Small squirrel
1
2
$ ./vsctl find -f title originalFilename=squirrel.jpg
VX-491810 Small squirrel
Job status The job command displays the status of all running jobs.
$ vsctl jobs $ vsctl import media/squirrel.jpg VX-128958
1
2
3
$ vsctl jobs
$ vsctl import media/squirrel.jpg
VX-128958
$ vsctl jobs VX-128958 - PLACEHOLDER_IMPORT STARTED [== ] 11%
1
2
$ vsctl jobs
VX-128958 - PLACEHOLDER_IMPORT STARTED [== ] 11%
$ vsctl jobs VX-128958 - PLACEHOLDER_IMPORT STARTED [===== ] 29%
1
2
$ vsctl jobs
VX-128958 - PLACEHOLDER_IMPORT STARTED [===== ] 29%
$ vsctl jobs VX-128958 - PLACEHOLDER_IMPORT STARTED [======= ] 35%
1
2
$ vsctl jobs
VX-128958 - PLACEHOLDER_IMPORT STARTED [======= ] 35%
$ vsctl jobs $
1
2
$ vsctl jobs
$
As you can see, the program displays the status and then exits. To avoid having to run the program repeatedly, use watch.
$ watch -n1 vsctl jobs
1
$ watch -n1 vsctl jobs
Configuration A common task in setting up a Vidispine system is tuning the configuration properties. The property command is meant to aid with this.
$ ./vsctl property solrpath=http://localhost:8983/solr validatexml=false
1
2
3
$ ./vsctl property
solrpath=http://localhost:8983/solr
validatexml=false
$ ./vsctl property solrpath solrpath=http://localhost:8983/solr
1
2
$ ./vsctl property solrpath
solrpath=http://localhost:8983/solr
$ ./vsctl property solrpath=http://solr.example.com:8983/solr solrpath=http://solr.example.com:8983/solr
1
2
$ ./vsctl property solrpath=http://solr.example.com:8983/solr
solrpath=http://solr.example.com:8983/solr
Open for suggestions The vsctl is very much open for suggestions, so i










