Skip to main content

A Python interface to the Alcatel 5620 SAM

Project description

The ‘sam’ module is a Python interface to Alcatel’s 5620 Service Aware Manager.

It connects to the SAM-O (SOAP/XML) interface of the 5620. It allows you to query any object defined in the “OSS XML Schema” section of the 5620 SAM-O documentation, retrieving the results as a Python dictionary. No more wasting your time with XML!


  • An Alcatel 5620 SAM installation
  • The optional SAM-O XML interface
  • Network access to the SAM-O interface
  • The 5620 SAM XML Schema documentation, to form generic_query parameters


  • When connecting, you can use a password or a password_hash
  • You can filter your parameters to limit the number of results returned.
  • You can also instruct SAM-O to restrict the attributes returned as part of its result set.


  • SAM-O’s responses are extremely voluminous. You should restrict the attributes returned from a generic query, or use a query shortcut (like saps() or ports()), which do that for you, where-ever possible.


import sam.sam

samo = sam.sam.SAM('', port=8080,
                   username='samo', password='foobar')

# Query voluminous detail about all SAPs on your network
saps = samo.generic_query('service.AccessInterface')

# Use a query filter
saps = samo.generic_query('service.AccessInterface', {'siteId': ''})

# Use a query filter and ask SAM to restrict the attributes returned
saps = samo.generic_query('service.AccessInterface', {'siteId': ''}, ['siteId', 'objectFullName', 'description', ...])

# Short-cut: query just some useful bits about SAPs on your network
saps = samo.saps()

for service_type, list_of_saps in saps.iteritems():
    # List of SAPs is a sequence of dictionaries
    for sap in list_of_saps:
        print sap.items()

In short: this library makes Alcatel’s 5620 SAM Pythonic!

Project details

Download files

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

Files for sam, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size sam-0.1.tar.bz2 (5.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page