HP Matrix Operating Environment Software manual Sample Python Client

Page 96

14 Sample Python Client

The following sample client was developed in Python 2.7.2 with the use of open source libraries. It provides the user with a UI to query the chargeback API and returns the report in a formatted PDF.

To create the sample client environment:

Download and install Python 2.7 from python.org

Download and install Suds, a lightweight SOAP python client for consuming web services, from https://fedorahosted.org/suds/

Download and install the Reportlab Toolkit, a Python library for creating reports in PDF, from http://www.reportlab.com/software/opensource/

Create a directory called ChargebackSample/root

Save connection.py and reports.py in /root/chargeback

Save GUI.py in /root/GUI

Save reports_file.py in /root/reports

Execute the sample as:

>python GUI.py

Figure 6 Sample client UI

Known limitations in the sample:

Only the first page of each report is returned.

The report is filtered by one tenant name (organization ID) or one billing code.

It is not possible to use ‘OR’ to filter reports.

The output path must exist, otherwise the sample will throw an exception.

96 Sample Python Client

Image 96
Contents API and CLI Operations Reference Guide Abstract7.1 Update 1 7.1Contents CMS Data Model Contents Exceptions Example UsageAccessing the Chargeback Web Service Interfaces Sample Java ClientRequiredParameterException Part I Matrix API Introduction New features in 7.1 Update Integration interface overviewIntroduction New features PowerCycleLogicalServersNew features in 7.1 EditLogicalServers RemoveLogicalServers QuiesceCms UnquiesceCms GetCmsQuiesceStatusLogicalServerGroupDetails LogicalServerInfoServiceInfo ChargebackRequestInfo TemplateInfoAccessing the Web Service Interfaces Accessing WsdlCommand Line Interface SecurityOperations ImportTemplateExportTemplate List TemplateInfoService ListServicesGetService CreateServiceDeleteService DeactivateServiceActivateService ChangeServiceLeasePowerOffService PowerOnService DeleteReplicaServiceRequest ListRequestsGetRequestInfo GetRequestSetRequestApprovalState ContinueRequestCancelRequest Logical Server GroupGetLogicalServerGroup AddServersToLogicalServerGroupAddDiskToLogicalServerGroup AddNewDiskToLogicalServerGroupSetLogicalServerGroupActiveServerCount RawMappingTypeEnumGetLogicalServer DeactivateLogicalServersLogicalServerInfo LogicalServerDetailsPowerOffLogicalServers PowerOnLogicalServersActivateLogicalServers LogicalServerNotFound Exception Logical ServerPowerCycleLogicalServers EditLogicalServersRemoveLogicalServers ByteSizeEnumServer Pool ListServerPoolsGetServerPool CreateServerPoolDeleteServerPool MoveServerToServerPoolAssignUsersToServerPool Server UnassignUsersFromServerPoolGetComputeServer GetVmHostSoftware SubnetListSanVolumes GetSanVolumeListSanVolumeTemplates GetSanVolumeTemplateOrganization ListOrganizationsGetOrganization AssignTemplateToOrganizationBy a Service Provider Administrator AssignServerToOrganizationUnassignServerFromOrganization OrganizationName Returns None ExceptionsAssignSubnetToOrganization UnassignSubnetFromOrganizationAssignSoftwareToOrganization BeginCmsMaintenance UnassignSoftwareFromOrganizationSyncOrganizations EndCmsMaintenance CountRunningRequestsForCmsAddCms QuiesceCmsLoadBalancer GetCmsQuiesceStatusListLoadBalancers AddLoadBalancerSetLoadBalancerPassword RemoveLoadBalancerAddLoadBalancerCertificate RemoveLoadBalancerCertificateUnsetLoadBalancerPassword LogicalLoadBalancerCreateLogicalLoadBalancerGroup DeleteLogicalLoadBalancerGroupFirewallRuleGroup AddLogicalLoadBalancerGroupMemberRemoveLogicalLoadBalancerGroupMember GetFirewallRuleGroupAddRuleToFirewallRuleGroup RemoveRuleFromFirewallRuleGroupSyncFirewallRuleGroups Name AddRuleToFirewallRuleFloatingIPAddress AddFloatingIPAddressMoveFloatingIPAddress RemoveFloatingIPAddressServerSnapshot ReleaseFloatingIPAddressListUnassociatedFloatingIPAddresses ListServerSnapshotsCreateServerSnapshot RevertServerSnapshotDeleteServerSnapshot Snapshot, recursively. Defaults to false Data Model Data ModelByteSize ByteSizeEnumCidrIpRange CmsQuiesceStateCost CostFrequencyCostFrequencyEnum CustomAddressAssignmentTypeAttributeCustomStorageVolumeAttribute CustomProcessorAttributeCustomSubnetBindingAttribute CustomTemplateAttributesDeploymentService DeploymentServiceTypeDeploymentServiceTypeEnum DrModeFirewallRule FirewallRuleGroupInfoFirewallRuleGroupDetails ImageTypeIPType IPTypeEnumLeasePeriod LoadBalancerInfoLogicalDisk LogicalFirewallRuleGroupLogicalIPAddress LogicalLoadBalancerDetails LogicalLoadBalancerGroupDetailsLogicalLoadBalancerGroupInfo LogicalLoadBalancerGroupMemberLogicalLoadBalancerProtocol LogicalLoadBalancerProtocolEnumLogicalNetworkInterface LogicalServerDetailsServiceEntityStatus status LogicalServerGroupInfoLogicalServerInfo LogicalSoftware LogicalSubnetMessageSeverity MessageSeverityEnumNatEntry NatTypePacketProtocol PacketProtocolEnumProcessorArchitecture ProcessorArchitectureEnumRequestDetails RequestHistoryItemRequestHistoryItemLevel RequestHistoryItemLevelEnumRequestStatus RequestStatusEnumRequestType RequestTypeEnumSanVolume SanVolumeStateSanVolumeStateEnum SanVolumeTemplate ServerPoolState cannot be determined IDs of the cloud capacity pools in the server poolServiceAction ServiceActionTrigger triggerServerPoolResourceNote ServerResourceServiceActionTrigger ServiceActionTriggerEnumServiceDetails ServiceEntityStatusServiceInfo SoftwareDiskDefinitionSoftwareType SoftwareTypeEnumStorageProvisioningType StorageProvisioningTypeEnumStorageType StorageTypeEnumTemplateInfo VirtualizationTypeVirtualizationTypeEnum VirtualSwitch VmHostVmHostDataStore WorkflowExceptions SanVolumeNotFoundException SanVolumeTemplateNotFoundExceptionServiceNotFoundException OrganizationNotFoundExceptionSoftwareNotFoundException SubnetNotFoundExceptionTemplateNotFoundException UserNotFoundExceptionPhysical Server Maintenance Example Physical Server Maintenance ExampleExample Usage Sample Java Client Sample CodeSample Java Client Sample Code Sample Java Client IOClientPasswordHandler.java Sample Java Client Sample VisualStudio/.NET/C# Client Add this codeSample VisualStudio/.NET/C# Client String.Format0s, DateTime.NowPage Part II Chargeback API Chargeback Soap API Chargeback Soap APIAccessing the Chargeback Web Service Interfaces Accessing the Chargeback Web Service InterfacesHttps//cms-ip-address55443/hpio/chargeback/soap/v1?wsdl Operations Summary Usage ReportDetailed Usage Report List ServiceFilter Aggregated Usage ReportOne entry with consolidated data for the entire period ServiceUsagePage Data Model ServiceFilter ServiceFilterAttribute enumFilterConnector enum PeriodServiceInformation ResourceUsageSummaryServerUsageSummary DiskUsageSummaryServiceUsagePage ServiceUsageSummaryAggregateServiceUsage ServiceUsageDetailPageDiskUsageDetail IpAddressUsageDetailAuthenticationException AuthorizationExceptionChargebackDataBaseException ChargebackExceptionPeriodStartDateGreaterThanEndDateException PeriodStartDateTooOldExceptionRequiredParameterException PeriodStartDateGreaterThanEndDateExceptionSample Python Client Sample Python ClientPage Example 2 reports.py Pageindex =Page Sample Python Client 101 Sample Python Client Example 3 GUI.py 103Sample Python Client 105 Example 4 reportsfile.py Sample Chargeback Usage Report 107References ReferencesHow to contact HP Support and other resourcesInformation to collect before contacting HP Information to collect before contacting HPWarranty information HP authorized resellersDocumentation feedback Subscribing to security bulletinsRelated information Documentation and supportRelated information
Related manuals
Manual 79 pages 57.42 Kb Manual 12 pages 7.25 Kb

Matrix Operating Environment Software specifications

HP Matrix Operating Environment (MOE) is an innovative software platform designed to deliver efficient management and orchestration of IT resources across physical, virtual, and cloud infrastructures. It provides a comprehensive solution for organizations that require a robust and flexible environment to manage their IT operations seamlessly.

One of the main features of HP MOE is its ability to optimize resource utilization by automating the provisioning and management of infrastructure components. This includes the ability to rapidly deploy servers, storage, and networking resources in a manner that meets the dynamic needs of modern businesses. This automation significantly reduces the time and effort required for manual configurations, enabling IT teams to focus on strategic initiatives rather than routine tasks.

The software offers a unified management interface that provides visibility into the entire IT environment. Users can monitor performance metrics, track resource allocation, and manage workflows through a single dashboard. This centralized control not only simplifies operations but also enhances decision-making capabilities by providing real-time insights into system health and performance.

Another critical characteristic of HP MOE is its support for both physical and virtual resources. The platform is designed to seamlessly integrate with existing infrastructure, making it easier for organizations to adopt virtualization and hybrid cloud strategies. Its compatibility with industry-standard hypervisors allows businesses to leverage their current investments while taking advantage of the benefits of virtualization.

HP MOE incorporates advanced technologies such as automation scripts, APIs, and tools for workload balancing. This technological backbone enables organizations to implement elasticity in their environments, allowing them to scale resources up or down based on demand. The software also supports a service-oriented architecture, facilitating integration with other enterprise applications and systems.

Security is a top priority in the design of HP MOE. The software provides robust security features that ensure data integrity and protect against unauthorized access. This includes role-based access controls, encryption, and compliance reporting, all of which contribute to a secure operating environment.

In summary, HP Matrix Operating Environment Software is a powerful solution that addresses the complexities of managing modern IT resources. Its key features include automation, unified management, support for physical and virtual environments, and strong security measures. With its ability to enhance efficiency and streamline operations, HP MOE is an essential tool for organizations looking to stay competitive in an increasingly digital landscape.