HP CloudSystem Matrix/Matrix Operating Environment 7.1 Integration Interfaces API and CLI Operations Reference Guide
Figure 7 Example of a report for getAggregatedUsage generated from sample client
Example 1 connection.py
import suds
PORT = "55443"
SERVICE = "/hpio/chargeback/soap/v1?wsdl"
TRANSPORT = "https://"
URL = "{0}{1}:{2}{3}"
class Connection(object):
 '''
 classdocs
 '''
 def __init__(self, server, username, password):
 '''
 Constructor
 '''
 endpoint = URL.format(TRANSPORT, server, PORT, SERVICE)
 self.client = suds.client.Client(url=endpoint)
 security = suds.wsse.Security()
 token = suds.wsse.UsernameToken(username, password)
 security.tokens.append(token)
 security.tokens.append(suds.wsse.Timestamp())
 self.client.set_options(wsse=security, autoblend = True)
97










