Skip to main content

No project description provided

Project description

VASTPY

This package is a Python SDK to the VMS (VAST Management System) REST API.

While developing against the VMS API use the documentation locally available at https://vms-host-name/docs.

Install

pip install vastpy

The package is hosted in PyPI: https://pypi.org/project/vastpy/

Usage

Initialization:

from vastpy import VASTClient

client = VASTClient(user='user', password='********', address='vast-vms')

The API is straightforward:

client.<collection>.get()
client.<collection>.post()
client.<collection>[<object>].get()
client.<collection>[<object>].patch()
client.<collection>[<object>].delete()

Accessing collections:

for view in client.views.get():
    print(view)

Creating objects:

policy, = client.viewpolicies.get(name='default')

view = client.views.post(path='/prod/pgsql', policy_id=policy['id'], create_dir=True)

Modifying/deleting objects:

view, = client.views.get(path='/prod/pgsql')

view = client.views[view['id']].patch(protocols=['NFS', 'SMB'])

client.views[view['id']].delete()

Reading metrics:

client.monitors.ad_hoc_query.get(object_type='cluster',
                                 time_frame='5m',
				 prop_list=['ProtoMetrics,proto_name=ProtoCommon,iops',
				            'ProtoMetrics,proto_name=ProtoCommon,bw'])

Version Compatibility

This package is compatible with any VAST version as it's schema-less.

Python objects are simply translated to URLs: client.collection[object].get() is translated to GET /api/collection/object.

Project details


Download files

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

Source Distribution

vastpy-0.2.3.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

vastpy-0.2.3-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file vastpy-0.2.3.tar.gz.

File metadata

  • Download URL: vastpy-0.2.3.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.9 Darwin/23.5.0

File hashes

Hashes for vastpy-0.2.3.tar.gz
Algorithm Hash digest
SHA256 236c3c1eca6a8a0a83ebdebbf1b00f9ec25dd0945cb15d47256b956a1f9100d8
MD5 12a392ec8e0605485cdb7ea46f81e65d
BLAKE2b-256 76c864e597a723c71ba9ae6c54d0673fcd78a3f362ecff9c6e0c1d6e1db48e86

See more details on using hashes here.

File details

Details for the file vastpy-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: vastpy-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.9 Darwin/23.5.0

File hashes

Hashes for vastpy-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 41ca4595c381082095843c43a4e353227e261d42de96233ef812ad1e1ce0c5d5
MD5 0d278ded7356c391d74c20eb1708900f
BLAKE2b-256 4d9ea4079825a40a10458cd40c72fb9ed573dd2a279a23d0909cc561caeddce4

See more details on using hashes here.

Supported by

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