Skip to main content

No project description provided

Project description

ntscli-client

Requirements

  • python 3.7 or later with matching pip
  • NTS-CLI compatible SSL configuration

Install

Installing on the OS python:

Ubuntu only: You might need to install pip3 on Ubuntu if you haven't already:

sudo apt install -y python3-pip

Then this only requires python 3.7 or later, which is already installed on Ubuntu 18.04 and later, and macOS Catalina.

pip3 install -U ntscli-client

Ubuntu only: Ubuntu doesn't set up the user PATH to include the local user's python binary path. You might have to do something like this if you can't find nts after install:

echo "export PATH=\"$(python3 -m site --user-base)/bin:$PATH\"" >> ~/.bashrc
source ~/.bashrc

Install your security certificate

You still need a security certificate, as documented here. Once it's a decrypted zip file, you can now install it pretty easily with this tool:

nts ssl install ~/Downloads/cloud.zip

Manually moving it to ~/.config/netflix/cloud/(files) still works as well.

Update Often

Use the same pip3 command, but especially for the first little while there will probably be frequent updates.

We suggest updating frequently anyway. For instance, for docker images or CI systems, you can install/update every time the image is created or run. If a released update to the RAE requires matching client or client library updates, you would not require any additional work to take the update.

Versioning

We will be following standard python semantic versioning, so if you really want to pin versions, you can follow standard python practices:

pip3 install ntscli-client<=3.0.0  # don't accidentally pick up a new major version, which could include breaking changes
pip3 install ntscli-client==0.1.4  # a specific older version
pip3 install ntscli-client>=0.1.5  # anything after a specific version

Enjoy

nts --help

export RAE=r3000334
export ESN=$(nts get-devices | jq -r 'map(.esn)[0]')  # actually just the first ESN I find
# or for powershell:
$env:RAE = 'r3000334'
$env:ESN = 'NFANDROID2-PRV-SHIELDANDROIDTV-NVIDISHIELD=ANDROID=TV-15895-BB9C5AF4E97B69BC1A51654A94304D3AD88169C2BA2F1338192C20E940AE669E'

nts get-plan  # prints to stdout

# get a plan dynamically
nts run --names AUDIO-001-TC1,ACT-004-TC11
# get a plan and run it immediately
nts get-plan | nts run --names AUDIO-001-TC1,ACT-004-TC11
# save the plan via shell redirection
nts get-plan > full_plan.json

# save the plan with an arg instead
nts get-plan --save-to full_plan.json

# Choosing what to run

## Just at run:
nts run --names AUDIO-001-TC1,ACT-004-TC11  # gets the test plan first, then filters
nts run --testplan full_plan.json --names AUDIO-001-TC1,ACT-004-TC11  # saves you the 1-2 minutes getting the test plan if you already have one

## using files
nts get-plan --save-to full_plan.json
cat full_plan.json | jq -r '{target: .target, testplan: {branch: .testplan.branch, sdkVersion: .testplan.sdkVersion, testcases: [.testplan.testcases[] | select(.category | startswith("Config"))] }}' > filtered_plan.json
cat filtered_plan.json | nts run 

## built-in filtering command
nts get-plan --save-to full_plan.json
nts filter --help
nts filter --names AUDIO-001-TC1 < full_plan.json > filtered_plan.json
nts filter --names AUDIO-001-TC1 --testplan full_plan.json --save-to filtered_plan.json
nts filter --names-re "AUDIO.*TC3" full_plan.json --save-to filtered_plan.json
nts get-plan | nts filter --eyepatch --tags batch | nts run

## DIY Filtering using external tools, if you -really- want to
CURRENT_EPOCH=$(date +%s) 
nts get-plan | jq -r '{target: .target, testplan: {branch: .testplan.branch, sdkVersion: .testplan.sdkVersion, testcases: [.testplan.testcases[] | select(.category | startswith("Config"))] }}' | nts run 2>${CURRENT_EPOCH}.stderr.txt > ${CURRENT_EPOCH}.json 

Features

  • JSON goes to stdout, logging goes to stderr: nts get-devices > device_list.json
  • Typical shell exit codes for commands, mean you can use shell checks such as: nts get-devices || echo FAIL
  • Multi-OS, multi-shell compatible
  • Tab completion available (see nts completion show --help)
  • Available via PYPI, using standard versioning

Alternative Installs

Pre-release installs:

pip3 install -U ntscli-client --pre

If Netflix posts a pre-release that might include a bug fix specifically for you, you might be asked to try this.

Install for any user of the OS (generally discouraged):

sudo pip3 install -U ntscli-client

If you are managing a server that might have lots of users that need the same install, this might be a good solution if you don't prefer using an alternate abstraction such as a virtual environment, conda environment, etc.

Installing in an isolation environment

Python is well known for isolation environments like virtualenv, conda, pyenv, etc. These all work, and you should have no trouble using these if you prefer.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ntscli_client-2.1.13-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file ntscli_client-2.1.13-py3-none-any.whl.

File metadata

  • Download URL: ntscli_client-2.1.13-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for ntscli_client-2.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 09ef0e030ddabf2de0a2e972ad2985c6b999a5d2250e8bb30412e48d604eaf42
MD5 580540ee0630726b1c7047aeff37dc33
BLAKE2b-256 a508b4e2313a86ff495f1556fb5cb3a97f93c8aaee8d01ca1b3d5b63f4cdc8f2

See more details on using hashes here.

Supported by

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