Shared service instances
Use the command-line interface to administer shared service instances.
SharedServiceInstance object
A SharedServiceInstance object
represents a particular shared service instance defined on Cloud Pak System.
Use the SharedServiceInstance object to query and
manipulate the shared service instance definition. Attributes of
the shared service instance and relationships between the shared service
instance and other resources on Cloud Pak System are
represented as Jython attributes on the SharedServiceInstance object.
Manipulate these Jython attributes using standard Jython mechanisms
to make changes to the corresponding data on Cloud Pak System.
To get help for the SharedServiceInstance object,
pass it as an argument to the help() function, as
shown in the following example:
>>> help(deployer.sharedserviceinstance)SharedServiceInstances object
A SharedServiceInstances object
represents the collection of shared service instances defined to Cloud Pak System.
Objects of this type are used to create, delete, iterate over, list
and search for shared service instances on Cloud Pak System.
To get help for the SharedServiceInstances object,
pass it as an argument to the help() function, as
shown in the following example:
>>> help(deployer.sharedserviceinstances)Methods
SharedServiceInstance and SharedServiceInstances object
have the following methods: - List all shared service instances
Format:
deployer.sharedserviceinstancesordeployer.sharedserviceinstances.list()Sample output:>>> deployer.sharedserviceinstances [ { "acl": (nested object), "app_id": "a-af897fab-c968-41da-8a82-940d736d7c07", "app_type": "service", "appmodel": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/appmodeljson", "cloud": (nested object), "dbusers": (nested object), "deployment": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/deployent.json", "deployment_name": "System Monitoring for WebSphere Application Server", "environment_profile": (nested object), "history": (nested object), "id": "d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff", "instances": (nested object), "ip_group": (nested object), "maintenance_mode": False, "monitoring": (nested object), "operations": (nested object), "patterntype": "itm", "priority": (nested object), "role_error": False, "roles": (nested object), "start_time": "2016-01-19T17:48:09.063Z", "status": "RUNNING", "topology": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/topologyjson", "version": "1.0", "virtualmachines": (nested object) }, { "acl": (nested object), "app_id": "a-32919f55-c994-4492-a9c4-5a3851a8a167", "app_type": "service", "appmodel": "https://127.0.0.1:9444/storehouse/user/deployments/d-2852549e-ba99-425d-b408-2e0cb753a35b/appmodeljson", "cloud": (nested object), "dbusers": (nested object), "deployment": "https://127.0.0.1:9444/storehouse/user/deployments/d-2852549e-ba99-425d-b408-2e0cb753a35b/deployent.json", "deployment_name": "System Monitoring for DB2 Application Server", "environment_profile": (nested object), "history": (nested object), "id": "d-2852549e-ba99-425d-b408-2e0cb753a35b", "instances": (nested object), "ip_group": (nested object), "maintenance_mode": False, "monitoring": (nested object), "operations": (nested object), "patterntype": "itm", "priority": (nested object), "role_error": False, "roles": (nested object), "start_time": "2016-01-26T07:00:42.985Z", "status": "RUNNING", "topology": "https://127.0.0.1:9444/storehouse/user/deployments/d-2852549e-ba99-425d-b408-2e0cb753a35b/topologyjson", "version": "1.0", "virtualmachines": (nested object) } ]- Search for shared service instances with a filter(dict format):
Format: deployer.sharedserviceinstances.list(<filter in dict format>)
Example:
>>> deployer.sharedserviceinstances.list({"deployment_name": "System Monitoring for WebSphere Application Server"})Sample output:>>> deployer.sharedserviceinstances.list({"deployment_name": "System Monitoring for WebSphere Application Server"}) [{ "acl": (nested object), "app_id": "a-af897fab-c968-41da-8a82-940d736d7c07", "app_type": "service", "appmodel": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/appmodel.json", "cloud": (nested object), "dbusers": (nested object), "deployment": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/deployment.json", "deployment_name": "System Monitoring for WebSphere Application Server", "environment_profile": (nested object), "history": (nested object), "id": "d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff", "instances": (nested object), "ip_group": (nested object), "maintenance_mode": False, "monitoring": (nested object), "operations": (nested object), "patterntype": "itm", "priority": (nested object), "role_error": False, "roles": (nested object), "start_time": "2016-01-19T17:48:09.063Z", "status": "RUNNING", "topology": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/topology.json", "version": "1.0", "virtualmachines": (nested object) }]- Get a single shared service instance by index:
Format:
deployer.sharedserviceinstances[<index>]Example:
>>>deployer.sharedserviceinstances[0]Sample output:>>>deployer.sharedserviceinstances[0] { "acl": (nested object), "app_id": "a-af897fab-c968-41da-8a82-940d736d7c07", "app_type": "service", "appmodel": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/appmodel.json", "cloud": (nested object), "dbusers": (nested object), "deployment": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/deployment.json", "deployment_name": "System Monitoring for WebSphere Application Server", "environment_profile": (nested object), "history": (nested object), "id": "d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff", "instances": (nested object), "ip_group": (nested object), "maintenance_mode": False, "monitoring": (nested object), "operations": (nested object), "patterntype": "itm", "priority": (nested object), "role_error": False, "roles": (nested object), "start_time": "2016-01-19T17:48:09.063Z", "status": "RUNNING", "topology": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/topology.json", "version": "1.0", "virtualmachines": (nested object) }- Get a single shared service instance with a deployment ID (depl_id)
Format:
deployer.sharedserviceinstances.get(<depl_id>)Example:
>>> deployer.sharedserviceinstances.get("d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff")Sample output:>>> deployer.sharedserviceinstances.get("d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff") { "acl": (nested object), "app_id": "a-af897fab-c968-41da-8a82-940d736d7c07", "app_type": "service", "appmodel": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/appmodel.json", "cloud": (nested object), "dbusers": (nested object), "deployment": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/deployment.json", "deployment_name": "System Monitoring for WebSphere Application Server", "environment_profile": (nested object), "history": (nested object), "id": "d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff", "instances": (nested object), "ip_group": (nested object), "maintenance_mode": False, "monitoring": (nested object), "operations": (nested object), "patterntype": "itm", "priority": (nested object), "role_error": False, "roles": (nested object), "start_time": "2016-01-19T17:48:09.063Z", "status": "RUNNING", "topology": "https://127.0.0.1:9444/storehouse/user/deployments/d-b65eaff7-f314-4e9b-a8cd-4d7499ef83ff/topology.json", "version": "1.0", "virtualmachines": (nested object) }- Make the deployed shared services available for use in another multi-cloud environment profile
Format:
((sharedserviceinstance).addToEnvironmentProfile(<env profile>)Sample output:>>> ss=deployer.sharedserviceinstances.list()[0] >>> ss.addToEnvironmentProfile(deployer.environmentprofiles.list({"name":"Development"})[0]) Making shared service available in environment profile "Development" ...Ensure that the IP group routing and external network routing between the various management IP groups for environment profiles is properly configured. For more information about IP and network connectivity, see Related concepts and Related information.
- List the additional multi-cloud environment profiles the shared service instance is available for use
- Format:
sharedserviceinstance).listEnvironmentProfiles()Sample output:>>> ss.listEnvironmentProfiles() [{ "acl": (nested object), "clouds": (nested object), "created": May 12, 2015 3:47:36 PM, …..................... "currentmessage_text": "Environment profile can now be used for deployments", "description": "Development environment profile", "environment": 1, "id": 3, "uuid": "ep-cb5d020c-3ea6-41ce-8a64-88b9ff9e5ddb", "name": "Development" }]
- Remove the shared service instance from being available for use in another multi-cloud environment profile (The deployed shared service instance is not deleted)
Format:
(sharedserviceinstance).deleteFromEnvironmentProfile(<env profile>)Sample output:>>> ss.deleteFromEnvironmentProfile(deployer.environmentprofiles.list({"name":"Development"})[0]) Removing shared service availability from environment profile "Development" … >>> ss.listEnvironmentProfiles() []