Home Reference Source
import ResourceParser from 'openshift-resource-parser'
public class | source

ResourceParser

Provides a set of functions for retrieving various OpenShift resources and parsing them into a specific format.

Constructor Summary

Public Constructor
public

constructor(config: Object)

Construct a new ResourceParser

Member Summary

Public Members
public

config: *

public

Method Summary

Public Methods
public

getProvisionedMWService(authToken: string, namespace: string, serviceName: string): Promise<ProvisionedService>

Get a ProvisionedService from a specified namespace, by name.

public

Retrieve a list of provisioned services in a namespace.

Public Constructors

public constructor(config: Object) source

Construct a new ResourceParser

Params:

NameTypeAttributeDescription
config Object

Configuration for the parser.

config.openshiftURL string

The URL of OpenShift.

config.mockData boolean

Whether the parser should use mock data or not.

Public Members

public config: * source

public provisionedServiceClient: * source

Public Methods

public getProvisionedMWService(authToken: string, namespace: string, serviceName: string): Promise<ProvisionedService> source

Get a ProvisionedService from a specified namespace, by name.

Params:

NameTypeAttributeDescription
authToken string

An auth token for a user.

namespace string

The namespace to find the service in.

serviceName string

The name of the service to retrieve.

public listProvisionedMWServices(authToken: string, namespace: string): Promise<ProvisionedService> source

Retrieve a list of provisioned services in a namespace.

Params:

NameTypeAttributeDescription
authToken string
namespace string