The Endpoint (server, container, VM/Cloud Image) object represents where a deployment will be sent. An Endpoint object can be retrieved by accessing the servers array from an Environment or – more typically – by running a psloop. This iterates through the current Endpoint list, pushing an Endpoint object onto the stack each time through the loop. This Endpoint object can be referenced by $server.


The following properties can be accessed for an Endpoint object:


Property

Type

Description

id

Integer

Endpoint id, as used in the database.

name

String

Endpoints name.

fqdomain

String

Fully qualified domain name.

summary

String

Summary text.

domain

Object

Domain in which the Endpoint is contained.

owner

Object

User or UserGroup that owns the Endpoint.

hostname

String

Hostname (if set) or name otherwise.

basedir

String

Base Directory for Deployments.

type

String

Endpoint Type, ie: windows, unix, as400 etc.

credential

Object

The Credential Object used to access this Endpoint.

Components

Array

An Array of Component Objects – the Components currently installed on this Endpoint.

creator

User

User Object representing the user who created this Endpoint.

modifier

User

User Object representing the user who last modified this Endpoint.

ctime

Date

Date Object representing the date/time the Endpoint was created.

mtime

Date

Date Object representing the date/time the Endpoint was last modified.

attributes

Array

Array of Strings, keyed by Attribute Name.



The following methods can be called on the Endpoint object:


Method

Return Type

Description

append(path1,path2)

String

Appends path2 to path1, returning the combined path formatted according to the Endpoint type. See append in the previous section for more information.

appendstd(path1,path2)

String

Appends path2 to path1, returning the combined path formatted according to the Endpoint type. See appendstd in the previous section for more information.

basename(path)

String

Returns the filename Component of the specified path. The structure of the path is based on the Endpoint type.

dirname(path)

String

Returns the directory path Component of the specified path. The structure of the path (and the returned String) is based on the Endpoint type.

getatt(attname)

String

Returns the value of the specified attribute held against the Endpoint. Parameter is the attribute name.

deptime(Component)

Date

Returns a Date object representing the last time the specified Component was deployed to the Endpoint. Returns null if the Component is not currently on the Endpoint.



Note, that the owner attribute returns an Object. Such objects have their own attributes.

So, for example, one can get the owner name of an Endpoint by writing:


set owner = ${server.owner};

echo ${owner.name};


or, more simply:


echo ${server.owner.name};