HP CloudSystem Foundation Security Solutions

Technical white paper
Integrated Billing Solutions with HP CSA 4.00
Table of Contents
Introduction .................................................................................................................................................................................... 2
Part 1. HP CSA Concepts .............................................................................................................................................................. 2
Part 2. Billable Service Conditions ............................................................................................................................................. 4
Part 3. Billable Intervals ............................................................................................................................................................... 4
Part 4. How to Collect Information from HP CSA with REST Calls ..................................................................................... 5
Solution Developers’ Responsibilities .................................................................................................................................. 5
How to test REST Communication ........................................................................................................................................ 5
HP CSA Certificates ................................................................................................................................................................... 7
Part 5. Sample API Sequence and Responses ........................................................................................................................ 7
Data Collection Sequence ....................................................................................................................................................... 7
Step 1: Get a credential token for an authenticated user ................................................................................................ 8
Step 2: Retrieve the list of organizations ............................................................................................................................ 8
Step 3: For each organization, get lists of subscribers and other information ........................................................... 9
Step 4: For each subscriber, get subscription information ............................................................................................ 10
Part 6. Utilization Properties ..................................................................................................................................................... 12
Get Utilization Information for a Subscription .................................................................................................................. 13
Part 7. Group Ownership ........................................................................................................................................................... 14
How to Determine Group Ownership and Original Subscriber ...................................................................................... 14
Part 8. HP CSA 4.00 Changes and Issues ............................................................................................................................... 15

Introduction

This document is intended to help solution developers create billing solutions using the subscription and resource information in HP Cloud Service Automation (HP CSA). See the HP CSA Concepts Guide for an overview of HP CSA concepts.
Chargeback data from HP CSA is used to support internal or external billing functions. Elements of the data can include infrastructure, application licensing, and network costs. The same information might be used for showback reports, allowing an IT department to analyze usage without actually cross-charging costs.

Part 1. HP CSA Concepts

Services HP CSA allows providers to define and offer catalogs of services they offer to their subscribers. These catalogs
include service offerings such as basic infrastructure services, application services, or complex services with configuration management and performance monitoring.
Figure 1. Example Catalog of Services
Service Prices Providers can assign prices to service offerings. The price information can include both initial (start-up)
pricing and recurring costs. The prices can also be tied to the cost of subscriber-selected options, such as the number of servers or the amount of storage.
Figure 2. Base Pricing Information
Service Details When a subscriber selects an item from a service catalog, they can specify detailed information for their
order. This information includes:
– A subscriber-specified name for the order. If a billing solution is to track individual subscriptions, this would be the field
that could be recognized by a subscriber.
2
– When the service is scheduled to start and end. Billing solutions report the cost of HP CSA services from the time they
are deployed until they expire or are cancelled. This is referred to as subscription-based billing. If no End Date is specified, the subscription will continue to run until it is cancelled.
– Group ownership. This option defines whether the subscription is to be owned (monitored, adjusted, or cancelled) by
only the original subscriber, or any member of that subscriber’s group.
– Subscriber-selectable options. A service provider may associate additional pricing information with service options.
Figure 3. Service Name, Description, and Start/Stop Dates
Figure 4. Group Ownership option
Figure 5. User-selectable options
Person In HP CSA terminology a person is a subscriber to HP CSA services. This person is defined by an LDAP user, and
can include other LDAP attributes such as organization and management relationships. HP CSA creates an internal representation of each person, including an ID number, membership in one or more groups, and a list of subscriptions. Billing solutions need to use this internal information to create billing records.
3
Organization In HP CSA terminology an organization contains a set of persons. HP CSA service catalogs and pricing are
assigned to specific organizations. Like HP CSA persons, organizations are defined in LDAP. For private HP CSA installations, organizations can include departments such as marketing, R&D, and payroll. For public HP CSA installations, organizations are independent customer organizations. Billing solutions also need to access the internal organization information.
Groups
HP CSA does not maintain any internal group relationships. Instead, it relies on directory services to identify
members of groups referenced by HP CSA.

Part 2. Billable Service Conditions

Before costs can be associated with a service order, several criteria must be met:
Any required approval steps must complete. If a request is denied explicitly or through a time-out, no service instance is
created, and no records are made available.
After a service request has been approved, a service instance is created. This service instance goes through the
initializing, reserving, and deploying stages before the requested service is online. Status information on service instances is available during all deployment stages. A billing solution should only bill for a service after it has been fully deployed.
After a service reaches the deployed stage, valid billing information is made available.
Be aware that in the deployed state, the following service state changes can occur:
The subscription can expire.
The subscription can be cancelled by a subscriber or an operator.
A subscriber may choose to “flex” (modify) the service instance by adding or deleting resources such as disk space,
memory, or CPUs. These resources may have associated costs that need to be tracked and billed.

Part 3. Billable Intervals

When a HP CSA service instance reaches the Deployed state, a billing solution can collect an initial snapshot of the service instance information. The billing solution must then periodically collect subsequent snapshots of the service instance. As long as the service continues to run, a billing solution can calculate the cost of those intervals and add them to the customer billing report.
This high-level flowchart shows how service records can be used to build chargeback reports.
Figure 6. Example of how to create billable interv als
The service costs, currency, and billing interval are specified within the service instance. Figure 7 shows many of the billing­related fields that are contained in a service instance. Part 4 of this document describes how to collect this information with API calls.
4
Figure 7. Information in a Service Instance
If a service expires, is cancelled, or fails, the billing solution should stop accruing charges against that service.

Part 4. How to Collect Information from HP CSA with REST Calls

HP CSA exposes usage and billing information in the service instances through a set of REST (REpresentational State Transfer) APIs. Data can be returned in either XML or JSON format. The format of the returned data is specified by the user
making the REST API call in the Accept Content-Type header setting. The examples in this paper use the XML format.

Solution Developers’ Responsibilities

Solution developers communicate with HP CSA over http (or https) and parse the data structures returned by HP CSA. The default https port for communication with HP CSA is port 8444. A developer can modify this port as needed in the HP CSA JBoss configuration.
The developer must configure authentication (also called authorization) and headers as needed. Common headers include application-Type:application/xml and accept:application/xml.

How to test REST Communication

A convenient way to test communication with HP CSA is to use a REST Console such as those provided in Google™ Chrome and other browsers. You can add this Google Chrome plug-in as follows:
Start Google Chrome.
Open Chrome Web Store.
Use search box to search for REST Console.
Select Add to Chrome.
5
Loading...
+ 11 hidden pages