From c11bd1fa1a42ae2c5c2a85fcd378cdb4495d0488 Mon Sep 17 00:00:00 2001 From: Francesco Faraone Date: Fri, 9 Oct 2020 18:00:17 +0200 Subject: [PATCH 1/2] change default query for list products to the same one used in UI --- README.md | 2 +- cnctcli/commands/product.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c45cd338..5777ac36 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ To use `connect-cli` you need any *nix system with python 3.6 or later installed The preferred way to install `connect-cli` is using a [virtualenv](https://virtualenv.pypa.io/en/latest/): -``` +```sh $ virtualenv psync $ source pysync/bin/activate $ pip install connect-cli diff --git a/cnctcli/commands/product.py b/cnctcli/commands/product.py index 595b9f32..c34e69d2 100644 --- a/cnctcli/commands/product.py +++ b/cnctcli/commands/product.py @@ -52,8 +52,16 @@ def cmd_list_products(config, query, page_size, always_continue): fg='blue', ) ) + if acc_id.startswith('VA'): + default_query = 'and(eq(visibility.owner,true),eq(version,null()))' + else: + default_query = 'or(eq(visibility.listing,true),eq(visibility.syndication,true))' + + query = query or default_query + offset = 0 has_more = True + while has_more: products = get_products( config.active.endpoint, From 4a17564165545df4fab1328442b670436751301c Mon Sep 17 00:00:00 2001 From: Francesco Faraone Date: Fri, 9 Oct 2020 18:01:01 +0200 Subject: [PATCH 2/2] Fix downloadable version number --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5777ac36..47b8b8d3 100644 --- a/README.md +++ b/README.md @@ -50,16 +50,16 @@ You can it from the [Github Releases](https://github.com/cloudblue/connect-cli/r To install under linux: ``` - $ curl -O -J https://github.com/cloudblue/connect-cli/releases/download/21.0/connect-cli_21.0_linux_amd64.tar.gz - $ tar xvfz connect-cli_21.0_linux_amd64.tar.gz + $ curl -O -J https://github.com/cloudblue/connect-cli/releases/download/21.3/connect-cli_21.3_linux_amd64.tar.gz + $ tar xvfz connect-cli_21.3_linux_amd64.tar.gz $ sudo cp dist/ccli /usr/local/bin/ccli ``` To install under Mac OSX: ``` - $ curl -O -J https://github.com/cloudblue/connect-cli/releases/download/21.0/connect-cli_21.0_osx_amd64.tar.gz - $ tar xvfz connect-cli_21.0_osx_amd64.tar.gz + $ curl -O -J https://github.com/cloudblue/connect-cli/releases/download/21.3/connect-cli_21.3_osx_amd64.tar.gz + $ tar xvfz connect-cli_21.3_osx_amd64.tar.gz $ sudo cp dist/ccli /usr/local/bin/ccli ``` @@ -69,7 +69,7 @@ To install under Mac OSX: To install under Windows -Download the windows single executable zipfile from [Github Releases](https://github.com/cloudblue/connect-cli/releases/download/21.0/connect-cli_21.0_windows_amd64.tar.gz), extract it and place it in a folder that is included in your `path` system variable. +Download the windows single executable zipfile from [Github Releases](https://github.com/cloudblue/connect-cli/releases/download/21.3/connect-cli_21.3_windows_amd64.tar.gz), extract it and place it in a folder that is included in your `path` system variable. ## Usage