Home Manual Reference Source Test Repository
public class | source

Bundles

Extends:

BaseProvision → Bundles

This is a base object that contains all you can do about Bundles.

Constructor Summary

Public Constructor
public

Constructor

Method Summary

Public Methods
public

This invoke a request to OpenGate North API and the callback is managed by promises This function activates a bundle

public

Create deployment element that is asociated to the Bundle

public

Creates a new bundle

public

This invoke a request to OpenGate North API and the callback is managed by promises This function deactivates a bundle

public

Deploy all elements of a bundle in only one method

public

Updates a bundle

public

Set the active attribute

public

withDescription(description: string): Bundles

Set the description attribute

public

Set the hardware attribute

public

Set the name attribute

public

withPostaction(postactions: string): Bundles

Set the postactions attribute

public

Set the preaction attribute

public

The request will have a specific time out if it will be exceeded then the promise throw an exception

public

Set the userNotes attribute

public

Set the version attribute

public

Set the workgroup attribute

Inherited Summary

From class BaseProvision
public

This invoke a request to OpenGate North API and the callback is managed by promises This function create a entity of provision

public

delete(body: *): Promise

This invoke a request to OpenGate North API and the callback is managed by promises This function deletes a entity of provision

public

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision

Public Constructors

public constructor(Reference: InternalOpenGateAPI) source

Constructor

Override:

BaseProvision#constructor

Params:

NameTypeAttributeDescription
Reference InternalOpenGateAPI

to the API object.

Public Methods

public activate(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function activates a bundle

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(result: object, statusCode: number)

When request it is OK

catch function(error: string)

When request it is NOK

Example:

 ogapi.bundlesBuilder().activate()

public addDeploymentElement(progressEvent: *): DeploymentElement source

Create deployment element that is asociated to the Bundle

Params:

NameTypeAttributeDescription
progressEvent *

Example:

 ogapi.bundlesBuilder().newDeploymentElement()

public create(): Promise source

Creates a new bundle

Override:

BaseProvision#create

Return:

Promise

Example:

 ogapi.bundlesBuilder().create()

public deactivate(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function deactivates a bundle

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(result: object, statusCode: number)

When request it is OK

catch function(error: string)

When request it is NOK

Example:

 ogapi.bundlesBuilder().deactivate()

public deployAndActivate(): DeploymentElement source

Deploy all elements of a bundle in only one method

Example:

 ogapi.bundlesBuilder().deployAndActivate()

public update(): Promise source

Updates a bundle

Override:

BaseProvision#update

Return:

Promise

Example:

 ogapi.bundlesBuilder().update()

public withActive(active: string): Bundles source

Set the active attribute

Params:

NameTypeAttributeDescription
active string

Return:

Bundles

public withDescription(description: string): Bundles source

Set the description attribute

Params:

NameTypeAttributeDescription
description string

Return:

Bundles

public withHardware(hardware: string): Bundles source

Set the hardware attribute

Params:

NameTypeAttributeDescription
hardware string

Return:

Bundles

public withName(name: string): Bundles source

Set the name attribute

Params:

NameTypeAttributeDescription
name string

required field

Return:

Bundles

public withPostaction(postactions: string): Bundles source

Set the postactions attribute

Params:

NameTypeAttributeDescription
postactions string

Return:

Bundles

public withPreaction(preaction: string): Bundles source

Set the preaction attribute

Params:

NameTypeAttributeDescription
preaction string

Return:

Bundles

public withTimeout(ms: number): Bundles source

The request will have a specific time out if it will be exceeded then the promise throw an exception

Params:

NameTypeAttributeDescription
ms number

timeout in milliseconds

Return:

Bundles

public withUserNotes(userNotes: string): Bundles source

Set the userNotes attribute

Params:

NameTypeAttributeDescription
userNotes string

Return:

Bundles

public withVersion(version: string): Bundles source

Set the version attribute

Params:

NameTypeAttributeDescription
version string

Return:

Bundles

public withWorkgroup(workgroup: string): Bundles source

Set the workgroup attribute

Params:

NameTypeAttributeDescription
workgroup string

Return:

Bundles