Code Monkey home page Code Monkey logo

nr-dell-objectstore_admin's Introduction

python-ecsclient

Build Status Read the docs Python Versions Version Coverage

This library is the Python Software Development Kit (SDK) for Dell EMC ECS. It allows developers to interact with the ECS Management API. You can find the ECS API specification here.

This library is the successor of ECS Minion.

Quick Start

You can install python-ecsclient using pip.

$ pip install python-ecsclient

Creating an instance of the ECSClient class allows the following arguments:

Name Required Default Value Description
version Yes None Version of the target ECS system. Options are 2 and 3
username No None The username used to fetch the ECS token
password No None The password used to fetch the ECS token
token No None Pass a token to ECSClient (username/password are ignored then)
ecs_endpoint Yes None The ECS API endpoint, ex: https://192.168.0.149:4443
token_endpoint No None The ECS API endpoint, ex: https://192.168.0.149:4443/login
verify_ssl No False Whether to check a host's SSL certificate
token_path No /tmp/ecsclient.tkn The location to store the temporary token file
request_timeout No 15.0 Stop waiting for a response after a given number of seconds, this is a decimal value. Ex: 10.0 is ten seconds
cache_token No True Whether to cache the token, by default this is true you should only switch this to false when you want to directly fetch a token for a user

This is how you can instantiate the Client class and use the library.

from ecsclient.client import Client

client = Client('3',
                username='ecsadmin@internal',
                password='PASSWORD',
                token_endpoint='https://192.168.0.149:4443/login',
                ecs_endpoint='https://192.168.0.149:4443')

print(client.user_info.whoami())

Take a look at our documentation to find a list of all supported ECS endpoints and services.

Supply a token

You can pass an authentication token directly to the client which means you don't need to supply a username/password.

client = Client('3',
                token='ALAcbGZtbjh6eVB3eUF1TzFEZWNmc0M2VVl2QjBVPQM',
                ecs_endpoint='https://192.168.1.146:4443')

Token caching

By default, the client caches the auth token. But you can disable caching by setting the cache_token parameter to false.

client = Client('3',
                username='someone',
                password='password',
                token_endpoint='https://192.168.1.146:4443/login',
                ecs_endpoint='https://192.168.1.146:4443',
                cache_token=False)

Alternatively, when token caching is enabled, you may want to force the client to obtain a new token on the next call. To do so, you can remove the cached token.

client.remove_cached_token()

Supported endpoints

The following table shows the supported endpoints per API version.

v2 v3
Configuration
Certificate

Configuration Properties

✓*

✓*

Licensing

Feature

Syslog

✓*

Snmp

✓*

CAS
CAS User Profile

✓*

✓*

File System Access
NFS

Metering
Billing

~

~

Migration
Transformation

Monitoring
Capacity

Dashboard

✓*

✓*

Events

✓*

✓*

Alerts

✓*

✓*

Multi-tenancy
Namespace

✓*

✓*

Geo-Replication
Replication Group

Temporary Failed Zone

✓*

✓*

Provisioning
Base URL

✓*

✓*

Bucket

✓*

Data Store

✓*

Node

~

~

Storage Pool

Virtual Data Center

VDC Keystore

Support
Call Home

User Management
Authentication Provider

~

~

Password Group (Swift)

Secret Key

Secret Key Self-Service

User (Object)

User (Management)

✓*

Other
Who am I

Legend:

Supported and tested

✓*

Supported but not tested yet

~

Partially supported

Not supported yet
Not available in this API version

Development

Getting Started

Assuming that you have Python and virtualenv installed, set up your environment and install the required dependencies like this instead of the pip install python-ecsclient defined above:

$ git clone https://github.com/EMCECS/python-ecsclient.git
$ cd python-ecsclient
$ virtualenv venv
...
$ . venv/bin/activate
$ pip install -r requirements.txt

Running Tests

You can run tests in all supported Python versions using tox. By default, it will run all of the unit tests, but you can also specify your own nosetests options. Note that this requires that you have all supported versions of Python installed, otherwise you must pass -e or run the nosetests command directly:

$ tox
$ tox -e py27,py35 tests/functional

You can also run individual tests with your default Python version:

$ nosetests tests/unit

License

This software library is released to you under the Apache License 2.0. See LICENSE for more information.


ECS is an Dell EMC product, trademarked, copyrighted, etc.

nr-dell-objectstore_admin's People

Contributors

bcgov-csnr-cd avatar repo-mountie[bot] avatar webgismd avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nr-dell-objectstore_admin's Issues

It's Been a While Since This Repository has Been Updated

This issue is a kind reminder that your repository has been inactive for 180 days. Some repositories are maintained in accordance with business requirements that infrequently change thus appearing inactive, and some repositories are inactive because they are unmaintained.

To help differentiate products that are unmaintained from products that do not require frequent maintenance, repomountie will open an issue whenever a repository has not been updated in 180 days.

  • If this product is being actively maintained, please close this issue.
  • If this repository isn't being actively maintained anymore, please archive this repository. Also, for bonus points, please add a dormant or retired life cycle badge.

Thank you for your help ensuring effective governance of our open-source ecosystem!

Add missing topics

TL;DR

Topics greatly improve the discoverability of repos; please add the short code from the table below to the topics of your repo so that ministries can use GitHub's search to find out what repos belong to them and other visitors can find useful content (and reuse it!).

Why Topic

In short order we'll add our 800th repo. This large number clearly demonstrates the success of using GitHub and our Open Source initiative. This huge success means its critical that we work to make our content as discoverable as possible; Through discoverability, we promote code reuse across a large decentralized organization like the Government of British Columbia as well as allow ministries to find the repos they own.

What to do

Below is a table of abbreviation a.k.a short codes for each ministry; they're the ones used in all @gov.bc.ca email addresses. Please add the short codes of the ministry or organization that "owns" this repo as a topic.

add a topic

That's in, you're done!!!

How to use

Once topics are added, you can use them in GitHub's search. For example, enter something like org:bcgov topic:citz to find all the repos that belong to Citizens' Services. You can refine this search by adding key words specific to a subject you're interested in. To learn more about searching through repos check out GitHub's doc on searching.

Pro Tip 🤓

  • If your org is not in the list below, or the table contains errors, please create an issue here.

  • While you're doing this, add additional topics that would help someone searching for "something". These can be the language used javascript or R; something like opendata or data for data only repos; or any other key words that are useful.

  • Add a meaningful description to your repo. This is hugely valuable to people looking through our repositories.

  • If your application is live, add the production URL.

Ministry Short Codes

Short Code Organization Name
AEST Advanced Education, Skills & Training
AGRI Agriculture
ALC Agriculture Land Commission
AG Attorney General
MCF Children & Family Development
CITZ Citizens' Services
DBC Destination BC
EMBC Emergency Management BC
EAO Environmental Assessment Office
EDUC Education
EMPR Energy, Mines & Petroleum Resources
ENV Environment & Climate Change Strategy
FIN Finance
FLNR Forests, Lands, Natural Resource Operations & Rural Development
HLTH Health
FLNR Indigenous Relations & Reconciliation
JEDC Jobs, Economic Development & Competitiveness
LBR Labour Policy & Legislation
LDB BC Liquor Distribution Branch
MMHA Mental Health & Addictions
MAH Municipal Affairs & Housing
BCPC Pension Corporation
PSA Public Safety & Solicitor General & Emergency B.C.
SDPR Social Development & Poverty Reduction
TCA Tourism, Arts & Culture
TRAN Transportation & Infrastructure

NOTE See an error or omission? Please create an issue here to get it remedied.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.