Skip to main content

Violin Memory Client API

Welcome to the Violin Memory Client Interface Library. This API provides an additional management interface to many Violin Memory products through a REST-like interface.

Supported Products and Versions

The following products are supported by this library:

v7000 Concerto Gateway

Support for this product is accomplished using the JSON REST API:

  • 7.50

v6000 Memory Gateway

Support for this product is accomplished using the XML REST API:

  • V6.x

  • V6.x / G6.x and prior

v6000 Memory Array

Support for this product is accomplished using the XML REST API:

  • Generic support for all versions

Getting Started

Getting a connection to your Violin Memory appliance is as simple as this:

import vmemclient
con = vmemclient.open(hostname, username, password)

The open() function automatically determines what kind of Violin Memory appliance it sees, and returns a version specific object that you can use to query and manage your array. It makes this connection over https preferably, but it can also fallback to http for the session authentication if https isn’t working.

When finished interacting with the Violin Memory array, close the connection like so:

con.close()

There are a few different object types that the open() function can return. Please refer to the open() documentation for more info on the specifics of using each object type, and the various functions available for your product / version.

Examples

Below are a few examples of how to use the core VXG python library:

Example 1: Get the system uptime

This example works on all MGs running 6.x and lower, and all ACMs.:

# Get the connection object
con = vmemclient.open(hostname, username, password)
if con is not None:
    node = '/system/uptime'
    answer = con.basic.get_node_values(node)
    uptime = datetime.timedelta(int(milliseconds=answer[node]))
    print '{0} uptime: {1}'.format(hostname, uptime)
    con.close()

Example 2: List all LUNs

This example works on all MGs running 6.x and lower.:

con = vmemclient.open(hostname, username, password)
if con is not None:
    base_node = '/vshare/state/local/container/*'
    containers = con.basic.get_node_values(base_node)
    for container in containers.values():
        print '[LUNs in container: {0}]'.format(container)
        luns_node = base_node[:-1] + container + '/lun/*'
        luns = con.basic.get_node_values(luns_node)
        for lun in luns.values():
            print ' - {0}'.format(lun)
        print
    con.close()

Example 3: Create a LUN

Each object returned from vmemclient.open() has a number of namespaces, and each namespace will have a collection of functions. This example will demonstrate how to do LUN creation on a MG running 6.x. Pairing these functions with the version specific REST API documentation will tell what types of input are expected, and any acceptible values.:

# Create the object connection like normal
con = vmemclient.open(hostname, username, password)
if con is not None:
    answer = con.basic.get_node_values('/vshare/state/local/container/*')
    if not answer:
        print 'No container present'
    else:
        # Use the first container on this MG
        container = answer.values()[0]

        # Create a single, read-only, thick LUN of size 10G
        result = con.lun.create_lun(container, 'MyNewLun', size='10',
                                    quantity=1, nozero='nozero',
                                    thin='0', readonly='r',
                                    startnum=1)

        # Actions return a dict with two keys: 'code' and 'message'
        if result['code'] == 0:
            print 'Created LUN OK: {0}'.format(result['message'])
        else:
            print 'Failed ({code}): {message}'.format(**result)

    # Done
    con.close()

Changelog

Version 1.1.9

  • Ensure port 443 is used if https protocol is specified

Version 1.1.8

  • Added support for Encryption

Version 1.1.7

  • Added support for Replication

Version 1.1.5 / 1.1.6

  • Added support for iSCSI operations

  • Minor bug fixes

Version 1.1.4

  • Added support for snapgroup operations

  • Added function to remap thin clones

  • Minor bug fixes

Version 1.1.3

  • vmemclient.open() raises AuthenticationError on auth error

  • Minor bug fixes

Version 1.1.2

  • Moving .snapshot.get_snapshot_copy_status() to .lun.get_lun_copy_status()

  • Adding .snapshot.get_snapshot_copy_status()

Version 1.1.1

  • Minor bug fixes

Version 1.1.0

  • Added support for Concerto 7.5.2

Version 1.0.1

  • Updated licensing

Version 1.0.0

  • Initial version of this package

  • Support for VShare 5.x / 6.x

  • Support for ACM (generic)

  • Support for Concerto 7.50

Metadata

Release files for vmemclient 1.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vmemclient 1.1.9
File Size Uploaded Provenance Actions
vmemclient-1.1.9.tar.gz 58.7 kB Without provenance Details for vmemclient-1.1.9.tar.gz

Release files / vmemclient-1.1.9.tar.gz

Download URL vmemclient-1.1.9.tar.gz
Size 58.7 kB
Tags Source
SHA-256 checksum
How to use checksums
17a082c5691abbd141b9fb328aa03d14b6bf731a603aaa98caabb2b3d110ffdc
BLAKE2b-256 checksum
How to use checksums
102c24327c6abe9d899137471cc4186a5fd21f0885fcbbbcd280259520f64e49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for vmemclient 1.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page