Package comodit_client :: Package api :: Module application :: Class Application

Class Application


Application entity representation. An application defines resources of an operating system (files, users, etc.) as well as handlers which define a way to interact with these resources when some event occurs (like application install, a setting's value update, etc.)

Parameters may be associated to an application: they define the settings that can be used to configure the application when installed on a host. The configuration of the application is then hold by an application context.

An application entity owns 2 collections:

Instance Methods
 
add_package(self, package)
Adds a package to this application.
 
add_service(self, service)
Adds a service to this application.
 
add_file(self, app_file)
Adds a file to this application.
ApplicationFileCollection
files(self)
Instantiates the collection of application files associated to the application.
 
get_file(self, name)
Fetches a particular file from remote collection.
 
add_custom_action(self, action)
Adds a custom action to this application.
 
add_handler(self, handler)
Adds a handler to this application.
Application
clone(self, clone_name)
Requests the cloning of remote entity.
 
add_repository(self, repo)
Adds a repository to this application.
 
add_compatibility_rule(self, rule)
Adds a compatibility rule to this application.

Inherited from parameters.HasParameters: add_parameter, get_parameter, parameters

Inherited from store.IsStoreCapable: get_thumbnail_content, read_thumbnail_content, set_thumbnail_content

Inherited from entity.Entity: __init__, create, delete, dump, load, refresh, rename, show, update

Inherited from util.json_wrapper.JsonWrapper: dump_json, get_json, get_real_json, load_json, print_json, set_json

Inherited from object: __long__, __native__, __nonzero__, __unicode__, next

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
list of Package packages
The packages associated to this application.
list of Group groups
The groups associated to this application.
list of User users
The users associated to this application.
list of Service services
The services associated to this application.
list of ApplicationFile files_f
The files associated to this application.
list of CustomAction actions
The custom actions associated to this application.
list of Handler handlers
The handlers associated to this application.
string organization
Name of the organization owning this application.
list of Repository repositories
The repositories associated to this application.
list of CompatibilityRule compatibility
The compatibility rules associated to this application.

Inherited from parameters.HasParameters: parameters_f

Inherited from store.IsStoreCapable: can_pull, can_push, documentation, license, price, published_as, purchased_as, url_f

Inherited from entity.Entity: client, description, identifier, label, name, url, uuid

Inherited from object: __class__

Method Details

add_package(self, package)

 

Adds a package to this application.

Parameters:

add_service(self, service)

 

Adds a service to this application.

Parameters:

add_file(self, app_file)

 

Adds a file to this application. This field will only be taken into account on application creation. Afterwards, use application files collection instead (see files).

Parameters:

get_file(self, name)

 

Fetches a particular file from remote collection.

Parameters:
  • name (string) - The name of the file.

add_custom_action(self, action)

 

Adds a custom action to this application.

Parameters:

add_handler(self, handler)

 

Adds a handler to this application.

Parameters:

clone(self, clone_name)

 

Requests the cloning of remote entity. Clone will have given name. This name should not already be in use.

Parameters:
  • clone_name (string) - The name of the clone.
Returns: Application
The representation of application's clone.

add_repository(self, repo)

 

Adds a repository to this application.

Parameters:

add_compatibility_rule(self, rule)

 

Adds a compatibility rule to this application.

Parameters:

Property Details

packages

The packages associated to this application.

Get Method:
unreachable.packages(self) - The packages associated to this application.
Set Method:
unreachable.packages(self, packages) - Sets the packages associated to this application.
Type:
list of Package

groups

The groups associated to this application.

Get Method:
unreachable.groups(self) - The groups associated to this application.
Type:
list of Group

users

The users associated to this application.

Get Method:
unreachable.users(self) - The users associated to this application.
Type:
list of User

services

The services associated to this application.

Get Method:
unreachable.services(self) - The services associated to this application.
Set Method:
unreachable.services(self, services) - Sets the services associated to this application.
Type:
list of Service

files_f

The files associated to this application. The entities returned in this list are "connected" to their collection, they can therefore be used to alter remote entities.

Get Method:
unreachable.files_f(self) - The files associated to this application.
Set Method:
unreachable.files_f(self, files) - Sets the files associated to this application.
Type:
list of ApplicationFile

actions

The custom actions associated to this application.

Get Method:
unreachable.actions(self) - The custom actions associated to this application.
Set Method:
unreachable.actions(self, actions) - Sets the actions associated to this application.
Type:
list of CustomAction

handlers

The handlers associated to this application.

Get Method:
unreachable.handlers(self) - The handlers associated to this application.
Set Method:
unreachable.handlers(self, handlers) - Sets the handlers associated to this application.
Type:
list of Handler

organization

Name of the organization owning this application.

Get Method:
unreachable.organization(self) - Name of the organization owning this application.
Type:
string

repositories

The repositories associated to this application.

Get Method:
unreachable.repositories(self) - The repositories associated to this application.
Set Method:
unreachable.repositories(self, repositories) - Sets the repositories associated to this application.
Type:
list of Repository

compatibility

The compatibility rules associated to this application.

Get Method:
unreachable.compatibility(self) - The compatibility rules associated to this application.
Set Method:
unreachable.compatibility(self, compatibility) - Sets the compatibility rules associated to this application.
Type:
list of CompatibilityRule