vas.tc_server

Applications

class vas.tc_server.Applications.Application[source]

Bases: vas.shared.Resource.Resource, vas.shared.Deletable.Deletable

An application

Variables:
  • context_path (str) – The application’s context path
  • host (str) – The host the application will deploy its revisions to
  • instance (vas.tc_server.Instances.Instance) – The instance that contains the application
  • name (str) – The application’s name
  • node_applications (list) – The application’s individual node applications
  • revisions (vas.tc_server.Revisions.Revisions) – The application’s revisions
  • security (vas.shared.Security.Security) – The resource’s security
  • service (str) – The service the application will deploy its revisions to
delete()

Performs a delete. If a collection is available it is reloaded.

reload()[source]

Reloads the application’s details from the server


class vas.tc_server.Applications.Applications[source]

Bases: vas.shared.MutableCollection.MutableCollection

Used to enumerate, create, and delete applications

Variables:security (vas.shared.Security.Security) – The resource’s security
create(name, context_path, service, host)[source]

Creates an new application

Parameters:
  • name (str) – The name of the application
  • context_path (str) – The context path of the application
  • service (str) – The service that the application will deploy its revisions to
  • host (str) – The host that the application will deploy its revisions to
Return type:

vas.tc_server.Applications.Application

Returns:

The new application

reload()

Reloads the resource’s details from the server

Groups

class vas.tc_server.Groups.Group[source]

Bases: vas.shared.Groups.MutableGroup

A tc Server group

Variables:
delete()

Performs a delete. If a collection is available it is reloaded.

reload()

Reloads the group’s details from the server

update(nodes)

Update the group to contain the given nodes

Parameters:nodes (list) – The group’s nodes

class vas.tc_server.Groups.Groups[source]

Bases: vas.shared.Groups.Groups

Used to enumerate, create, and delete tc Server groups

Variables:security (vas.shared.Security.Security) – The security configuration for the collection
create(name, nodes)

Creates a new group

Parameters:
  • name (str) – The group’s name
  • nodes (list) – The group’s nodes
Return type:

vas.shared.Groups.Group

Returns:

The new group

reload()

Reloads the resource’s details from the server

InstallationImages

class vas.tc_server.InstallationImages.InstallationImage[source]

Bases: vas.shared.InstallationImages.InstallationImage

A tc Server installation image

Variables:
delete()

Performs a delete. If a collection is available it is reloaded.

reload()

Reloads the installation image’s details from the server


class vas.tc_server.InstallationImages.InstallationImages[source]

Bases: vas.shared.InstallationImages.InstallationImages

Used to enumerate, create, and delete tc Server installation images

Variables:security (vas.shared.Security.Security) – The resource’s security
create(path, version)

Creates an installation image by uploading a file to the server and assigning it a version

Parameters:
  • path (str) – The path of the file to upload
  • version (str) – The installation image’s version
Return type:

vas.shared.InstallationImages.InstallationImage

Returns:

The new installation image

reload()

Reloads the resource’s details from the server

Installations

class vas.tc_server.Installations.Installation[source]

Bases: vas.shared.Installations.Installation

A tc Server installation

Variables:
delete()

Performs a delete. If a collection is available it is reloaded.

reload()[source]

Reloads the installation’s details from the server


class vas.tc_server.Installations.Installations[source]

Bases: vas.shared.Installations.Installations

Used to enumerate, create, and delete tc Server installations

Variables:security (vas.shared.Security.Security) – The resource’s security
create(installation_image)

Create a new installation

Parameters:installation_image (vas.shared.InstallationImages.InstallationImage) – The installation image to use to create the installation
Return type:vas.shared.Installations.Installation
Returns:The new installation
reload()

Reloads the resource’s details from the server

Instances

class vas.tc_server.Instances.Instance[source]

Bases: vas.shared.Instance.Instance

A tc Server instance

Variables:
delete()

Performs a delete. If a collection is available it is reloaded.

reload()[source]

Reloads the instance’s details from the server

start(serial=False)

Starts the resource

Parameters:serial (bool) – Whether to start the node instance serially
stop(serial=False)

Stops the resource

Parameters:serial (bool) – Whether to stop the node instance serially
update(installation, runtime_version=None)[source]

Updates the installation and, optionally, the runtime_version used by the instance

Parameters:

class vas.tc_server.Instances.Instances[source]

Bases: vas.shared.MutableCollection.MutableCollection

Used to enumerate, create, and delete tc Server instances

Variables:security (vas.shared.Security.Security) – The resource’s security
create(installation, name, layout=None, properties=None, runtime_version=None, templates=None)[source]

Creates a new instance

Parameters:
  • installation (vas.tc_server.Installations.Installation) – The installation to be used by the instance
  • name (str) – The name of the instance
  • layout (str) – The layout to use when creating the instance. Valid values are COMBINED and SEPARATE. The default is SEPARATE.
  • properties (dict) – Configuration properties that customise the instance
  • runtime_version (str) – The version of the runtime to be used by the instance. Must be one of the runtime_versions available in the installation. Defaults to the latest version that is available in the installation.
  • templates (list) – The templates to use when creating the instance
Return type:

vas.tc_server.Instances.Instance

Returns:

The new instance

reload()

Reloads the resource’s details from the server

LiveConfigurations

class vas.tc_server.LiveConfigurations.LiveConfiguration[source]

Bases: vas.shared.LiveConfiguration.LiveConfiguration

A live configuration file in a tc Server instance

Variables:
  • content (str) – The configuration’s content
  • instance (vas.tc_server.Instances.Instance) – The instance that owns the configuration
  • path (str) – The configuration’s path
  • node_configurations (list) – The configuration’s node configurations
  • security (vas.shared.Security.Security) – The resource’s security
  • size (int) – The configuration’s size
reload()

Reloads the live configuration’s details from the server


class vas.tc_server.LiveConfigurations.LiveConfigurations[source]

Bases: vas.shared.Collection.Collection

Used to enumerate an instance’s live configuration

Variables:security (vas.shared.Security.Security) – The resource’s security
reload()

Reloads the resource’s details from the server

Logs

class vas.tc_server.Logs.Log[source]

Bases: vas.shared.Logs.Log

A log file in a tc Server node instance

Variables:
content(start_line=None, end_line=None)

Get the content of the log

Parameters:
  • start_line (int) – The start point, in lines, of the content to return. A value of None will result in content from the start of the file being returned. If the provided value is greater than the number of lines in the file, the returned content will be empty.
  • end_line (int) – The end point, in lines, of the content to return. A value of None will result in content up to the end of the file being returned. If the provided value is greater than the number of lines in the file, content up to and including the last line in the file will be returned.
Return type:

str

Returns:

The root directory of the extracted agent

delete()

Performs a delete. If a collection is available it is reloaded.

reload()

Reloads the log’s details from the server


class vas.tc_server.Logs.Logs[source]

Bases: vas.shared.Logs.Logs

Used to enumerate a tc Server node instance’s logs

Variables:security (vas.shared.Security.Security) – The resource’s security
reload()

Reloads the resource’s details from the server

NodeApplications

class vas.tc_server.NodeApplications.NodeApplication[source]

Bases: vas.shared.Resource.Resource

An application on a node instance

Variables:
reload()

Reloads the resource’s details from the server


class vas.tc_server.NodeApplications.NodeApplications[source]

Bases: vas.shared.Collection.Collection

Used to enumerate a node instance’s applications

Variables:security (vas.shared.Security.Security) – The resource’s security
reload()

Reloads the resource’s details from the server

NodeInstances

class vas.tc_server.NodeInstances.NodeInstance[source]

Bases: vas.shared.NodeInstances.NodeInstance

A tc Server node instance

Variables:
reload()[source]

Reloads the instance’s details from the server

start()

Starts the resource

stop()

Stops the resource


class vas.tc_server.NodeInstances.NodeInstances[source]

Bases: vas.shared.NodeInstances.NodeInstances

Used to enumerate tc Server instances on an individual node

Variables:security (vas.shared.Security.Security) – The resource’s security
reload()

Reloads the resource’s details from the server

NodeLiveConfigurations

class vas.tc_server.NodeLiveConfigurations.NodeLiveConfiguration[source]

Bases: vas.shared.NodeConfiguration.NodeConfiguration

A live configuration file in a node instance

Variables:
reload()

Reloads the configuration’s details from the server


class vas.tc_server.NodeLiveConfigurations.NodeLiveConfigurations[source]

Bases: vas.shared.Collection.Collection

Used to enumerate a node instance’s live configuration

Variables:security (vas.shared.Security.Security) – The resource’s security
reload()

Reloads the resource’s details from the server

NodeLiveRevisions

class vas.tc_server.NodeRevisions.NodeRevision[source]

Bases: vas.shared.StateResource.StateResource

A revision of a node application

Variables:
reload()

Reloads the resource’s details from the server

start()

Starts the resource

stop()

Stops the resource


class vas.tc_server.NodeRevisions.NodeRevisions[source]

Bases: vas.shared.Collection.Collection

Used to enumerate revisions of a node application

Variables:security (vas.shared.Security.Security) – The resource’s security
reload()

Reloads the resource’s details from the server

Nodes

class vas.tc_server.Nodes.Node[source]

Bases: vas.shared.Nodes.GroupableNode

A tc Server node

Variables:
  • agent_home (str) – The location of the vFabric Administration Agent
  • architecture (str) – The architecture of the node’s operating system
  • groups (list) – The groups that contain this node
  • host_names (list) – The node’s host names
  • instances (vas.tc_server.Instances.Instances) – The node’s instances
  • ip_addresses (list) – The node’s IP addresses
  • ipv4_addresses (list) – The node’s IPv4 addresses
  • ipv6_addresses (list) – The node’s IPv6 addresses
  • java_home (str) – The node’s Java home
  • metadata (dict) – The node’s metadata
  • operating_system (str) – The node’s operating system
  • security (vas.shared.Security.Security) – The resource’s security
reload()[source]

Reloads the node’s details from the server

update(metadata)

Updates the node’s metadata

Parameters:metadata (dict) – The node’s new metadata

class vas.tc_server.Nodes.Nodes[source]

Bases: vas.shared.Collection.Collection

Used to enumerate tc Server nodes

Variables:security (vas.shared.Security.Security) – The resource’s security
reload()

Reloads the resource’s details from the server

PendingConfigurations

class vas.tc_server.PendingConfigurations.PendingConfiguration[source]

Bases: vas.shared.PendingConfigurations.PendingConfiguration

A configuration file that is pending

Variables:
delete()

Performs a delete. If a collection is available it is reloaded.

reload()

Reloads the configuration’s details from the server


class vas.tc_server.PendingConfigurations.PendingConfigurations[source]

Bases: vas.shared.PendingConfigurations.PendingConfigurations

Used to enumerate an instance’s pending configuration

Variables:security (vas.shared.Security.Security) – The resource’s security
create(path, content)

Creates a new configuration. The configuration will be pending until its instance is started at which point the configuration will become live.

Parameters:
  • path (str) – The configuration’s path
  • content (str) – The configuration’s content
Return type:

vas.shared.PendingConfigurations.PendingConfiguration

Returns:

The new configuration

reload()

Reloads the resource’s details from the server

RevisionImages

class vas.tc_server.RevisionImages.RevisionImage[source]

Bases: vas.shared.Resource.Resource, vas.shared.Deletable.Deletable

A revision image, i.e. a WAR file

Variables:
  • name (str) – The revision image’s name
  • security (vas.shared.Security.Security) – The resource’s security
  • size (int) – The revision image’s size
  • revisions (list) – The revisions that have been created from this revision image
  • version (str) – The revision image’s version
delete()

Performs a delete. If a collection is available it is reloaded.

reload()[source]

Reloads the revision image’s details from the server


class vas.tc_server.RevisionImages.RevisionImages[source]

Bases: vas.shared.MutableCollection.MutableCollection

Used to enumerate, create, and delete tc Server revision images

Variables:security (vas.shared.Security.Security) – The resource’s security
create(path, name, version)[source]

Creates a new revision image by uploading a war file to the server

Parameters:
  • path (str) – The path of the .WAR file
  • name (str) – The name of the revision image
  • version (str) – The version of the revision image
Return type:

vas.tc_server.RevisionImages.RevisionImages

Returns:

The new revision image

reload()

Reloads the resource’s details from the server

Revisions

class vas.tc_server.Revisions.Revision[source]

Bases: vas.shared.StateResource.StateResource, vas.shared.Deletable.Deletable

A revision of an application

Variables:
delete()

Performs a delete. If a collection is available it is reloaded.

reload()

Reloads the resource’s details from the server

start()

Starts the resource

stop()

Stops the resource


class vas.tc_server.Revisions.Revisions[source]

Bases: vas.shared.MutableCollection.MutableCollection

Used to enumerate, create, and delete application revisions

Variables:security (vas.shared.Security.Security) – The resource’s security
create(revision_image)[source]

Creates a revision by deploying the revision image

Parameters:revision_image (vas.tc_server.RevisionImages.RevisionImage) – The revision image to deploy
Return type:vas.tc_server.Revisions.Revision
Returns:The new revision
reload()

Reloads the resource’s details from the server

TcServer

class vas.tc_server.TcServer.TcServer[source]

Bases: object

The entry point to the API for administering tc Server

Variables:

TemplateImages

class vas.tc_server.TemplateImages.TemplateImage[source]

Bases: vas.shared.Resource.Resource, vas.shared.Deletable.Deletable

A template image

Variables:
  • name (str) – The template image’s name
  • security (vas.shared.Security.Security) – The resource’s security
  • size (int) – The template image’s size
  • templates (list) – The templates that have been created from the template image
  • version (str) – The template image’s version
delete()

Performs a delete. If a collection is available it is reloaded.

reload()[source]

Reloads the template image’s details from the server


class vas.tc_server.TemplateImages.TemplateImages[source]

Bases: vas.shared.MutableCollection.MutableCollection

Used to enumerate, create, and delete tc Server template images

Variables:security (vas.shared.Security.Security) – The resource’s security
create(path, name, version)[source]

Creates a new template image by uploading a .zip file to the server

Parameters:
  • path (str) – The path of the template image .zip file
  • name (str) – The name of the template image
  • version (str) – The version of the template image
Return type:

vas.tc_server.TemplateImages.TemplateImage

Returns:

The new template image

reload()

Reloads the resource’s details from the server

Templates

class vas.tc_server.Templates.Template[source]

Bases: vas.shared.Resource.Resource, vas.shared.Deletable.Deletable

A tc Server Template

Variables:
delete()

Performs a delete. If a collection is available it is reloaded.

reload()

Reloads the resource’s details from the server


class vas.tc_server.Templates.Templates[source]

Bases: vas.shared.MutableCollection.MutableCollection

Used to enumerate, create, and delete tc Server templates

Variables:security (vas.shared.Security.Security) – The resource’s security
create(template_image)[source]

Creates a new template

Parameters:template_image (vas.tc_server.TemplateImages.TemplateImage) – The template image to use to create the template
Return type:vas.tc_server.Templates.Template
Returns:The new template
reload()

Reloads the resource’s details from the server