HP Matrix Operating Environment Software manual Example 2 reports.py, Pageindex =

Page 98

Example 2 reports.py

import suds import datetime import locale

import root.reports.reports_file

from reportlab.platypus import Table, TableStyle, Paragraph from reportlab.platypus.flowables import PageBreak

from reportlab.lib import colors

from reportlab.lib.colors import Color, PCMYKColor, HexColor, black, white from reportlab.lib.styles import getSampleStyleSheet

from reportlab.graphics.shapes import Drawing

from reportlab.graphics.charts.piecharts import Pie from reportlab.graphics.charts.legends import Legend

styleSheet = getSampleStyleSheet() resourcescolumntitles_fontsize = 8 resourcescolumnvalues_fontsize = 7 PAGE_SIZE = 100

PAGE_INDEX = 0

pdf_chart_colors = [ HexColor("#0000e5"), HexColor("#1f1feb"), HexColor("#5757f0"), HexColor("#8f8ff5"), HexColor("#c7c7fa"), HexColor("#f5c2c2"), HexColor("#eb8585"), HexColor("#e04747"), HexColor("#d60a0a"), HexColor("#cc0000"), HexColor("#ff0000"),

]

class PeriodInformation(object):

def __init__(self, startDate, endDate): self.start = startDate

self.end = endDate

def getDailyPeriodObj(self, chargebackservice): reportPeriod = chargebackservice.factory.create('period') reportPeriod.startDate = self.start reportPeriod.endDate = self.end

periodType = chargebackservice.factory.create('periodType') reportPeriod.type = periodType.DAILY

return reportPeriod

def getPeriodObj(self, chargebackservice):

reportPeriod = chargebackservice.factory.create('period') reportPeriod.startDate = self.start reportPeriod.endDate = self.end

periodType = chargebackservice.factory.create('periodType') reportPeriod.type = periodType.PERIOD

return reportPeriod

class Filters(object):

def __init__(self, organizationid="", billingcode="", owner="", service=""): self.organizationid = organizationid

self.billing_code = billingcode self.owner = owner self.service = service

def getFiltersObj(self, chargebackservice): filterCollection = []

attributefilter = chargebackservice.factory.create("serviceFilterAttribute") connectorfilter = chargebackservice.factory.create("filterConnector") operatorfilter = chargebackservice.factory.create("filterOperator")

if len(self.organizationid) > 0:

organizationfilter = chargebackservice.factory.create('serviceFilter') organizationfilter.filterAttribute = attributefilter.ORGANIZATION_ID organizationfilter.filterOperator = operatorfilter.EQUAL organizationfilter.serviceFilterValue = self.organizationid filterCollection.append(organizationfilter)

if len(self.billing_code) >0 :

billingcodefilter = chargebackservice.factory.create('serviceFilter') billingcodefilter.filterAttribute = attributefilter.BILLING_CODE billingcodefilter.filterOperator = operatorfilter.EQUAL billingcodefilter.serviceFilterValue = self.billing_code billingcodefilter.filterConnector = connectorfilter.AND filterCollection.append(billingcodefilter)

if len(self.owner) > 0:

ownerfilter = chargebackservice.factory.create('serviceFilter') ownerfilter.filterAttribute = attributefilter.OWNER ownerfilter.filterOperator = operatorfilter.EQUAL ownerfilter.serviceFilterValue = self.owner ownerfilter.filterConnector = connectorfilter.AND filterCollection.append(ownerfilter)

98 Sample Python Client

Image 98
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 Introduction New features in 7.1 UpdateIntegration interface overview New features in 7.1 New featuresPowerCycleLogicalServers LogicalServerGroupDetails EditLogicalServers RemoveLogicalServersQuiesceCms UnquiesceCms GetCmsQuiesceStatus LogicalServerInfoRequestInfo ServiceInfoChargeback TemplateInfoCommand Line Interface Accessing the Web Service InterfacesAccessing Wsdl SecurityExportTemplate OperationsImportTemplate List TemplateInfoGetService ServiceListServices CreateServiceDeleteService DeactivateServicePowerOffService ActivateServiceChangeServiceLease Request PowerOnServiceDeleteReplicaService ListRequestsSetRequestApprovalState GetRequestInfoGetRequest ContinueRequestGetLogicalServerGroup CancelRequestLogical Server Group AddServersToLogicalServerGroupAddDiskToLogicalServerGroup AddNewDiskToLogicalServerGroupSetLogicalServerGroupActiveServerCount RawMappingTypeEnumLogicalServerInfo GetLogicalServerDeactivateLogicalServers LogicalServerDetailsActivateLogicalServers PowerOffLogicalServersPowerOnLogicalServers LogicalServerNotFound Exception Logical ServerRemoveLogicalServers PowerCycleLogicalServersEditLogicalServers ByteSizeEnumGetServerPool Server PoolListServerPools CreateServerPoolAssignUsersToServerPool DeleteServerPoolMoveServerToServerPool GetComputeServer ServerUnassignUsersFromServerPool GetVmHostSoftware SubnetListSanVolumeTemplates ListSanVolumesGetSanVolume GetSanVolumeTemplateGetOrganization OrganizationListOrganizations AssignTemplateToOrganizationUnassignServerFromOrganization By a Service Provider AdministratorAssignServerToOrganization OrganizationName Returns None ExceptionsAssignSoftwareToOrganization AssignSubnetToOrganizationUnassignSubnetFromOrganization SyncOrganizations BeginCmsMaintenanceUnassignSoftwareFromOrganization AddCms EndCmsMaintenanceCountRunningRequestsForCms QuiesceCmsListLoadBalancers LoadBalancerGetCmsQuiesceStatus AddLoadBalancerAddLoadBalancerCertificate SetLoadBalancerPasswordRemoveLoadBalancer RemoveLoadBalancerCertificateCreateLogicalLoadBalancerGroup UnsetLoadBalancerPasswordLogicalLoadBalancer DeleteLogicalLoadBalancerGroupRemoveLogicalLoadBalancerGroupMember FirewallRuleGroupAddLogicalLoadBalancerGroupMember GetFirewallRuleGroupSyncFirewallRuleGroups AddRuleToFirewallRuleGroupRemoveRuleFromFirewallRuleGroup Name AddRuleToFirewallRuleMoveFloatingIPAddress FloatingIPAddressAddFloatingIPAddress RemoveFloatingIPAddressListUnassociatedFloatingIPAddresses ServerSnapshotReleaseFloatingIPAddress ListServerSnapshotsDeleteServerSnapshot CreateServerSnapshotRevertServerSnapshot Snapshot, recursively. Defaults to false Data Model Data ModelCidrIpRange ByteSizeByteSizeEnum CmsQuiesceStateCostFrequencyEnum CostCostFrequency CustomAddressAssignmentTypeAttributeCustomSubnetBindingAttribute CustomStorageVolumeAttributeCustomProcessorAttribute CustomTemplateAttributesDeploymentServiceTypeEnum DeploymentServiceDeploymentServiceType DrModeFirewallRuleGroupDetails FirewallRuleFirewallRuleGroupInfo ImageTypeLeasePeriod IPTypeIPTypeEnum LoadBalancerInfoLogicalIPAddress LogicalDiskLogicalFirewallRuleGroup LogicalLoadBalancerGroupInfo LogicalLoadBalancerDetailsLogicalLoadBalancerGroupDetails LogicalLoadBalancerGroupMemberLogicalNetworkInterface LogicalLoadBalancerProtocolLogicalLoadBalancerProtocolEnum LogicalServerDetailsLogicalServerInfo ServiceEntityStatus statusLogicalServerGroupInfo LogicalSoftware LogicalSubnetNatEntry MessageSeverityMessageSeverityEnum NatTypeProcessorArchitecture PacketProtocolPacketProtocolEnum ProcessorArchitectureEnumRequestHistoryItemLevel RequestDetailsRequestHistoryItem RequestHistoryItemLevelEnumRequestType RequestStatusRequestStatusEnum RequestTypeEnumSanVolumeStateEnum SanVolumeSanVolumeState State cannot be determined SanVolumeTemplateServerPool IDs of the cloud capacity pools in the server poolServerPoolResourceNote ServiceActionServiceActionTrigger trigger ServerResourceServiceDetails ServiceActionTriggerServiceActionTriggerEnum ServiceEntityStatusSoftwareType ServiceInfoSoftwareDiskDefinition SoftwareTypeEnumStorageType StorageProvisioningTypeStorageProvisioningTypeEnum StorageTypeEnumVirtualizationTypeEnum TemplateInfoVirtualizationType VmHostDataStore VirtualSwitchVmHost WorkflowExceptions ServiceNotFoundException SanVolumeNotFoundExceptionSanVolumeTemplateNotFoundException OrganizationNotFoundExceptionTemplateNotFoundException SoftwareNotFoundExceptionSubnetNotFoundException UserNotFoundExceptionExample Usage Physical Server Maintenance ExamplePhysical Server Maintenance Example Sample Java Client Sample Java ClientSample Code 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 APIHttps//cms-ip-address55443/hpio/chargeback/soap/v1?wsdl Accessing the Chargeback Web Service InterfacesAccessing the Chargeback Web Service Interfaces Detailed Usage Report OperationsSummary Usage Report One entry with consolidated data for the entire period List ServiceFilterAggregated Usage Report ServiceUsagePage Data Model FilterConnector enum ServiceFilterServiceFilterAttribute enum PeriodServerUsageSummary ServiceInformationResourceUsageSummary DiskUsageSummaryAggregateServiceUsage ServiceUsagePageServiceUsageSummary ServiceUsageDetailPageDiskUsageDetail IpAddressUsageDetailChargebackDataBaseException AuthenticationExceptionAuthorizationException ChargebackExceptionRequiredParameterException PeriodStartDateGreaterThanEndDateExceptionPeriodStartDateTooOldException 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 ReferencesInformation to collect before contacting HP How to contact HPSupport and other resources Information to collect before contacting HPDocumentation feedback Warranty informationHP authorized resellers Subscribing to security bulletinsRelated information Related informationDocumentation and support
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.