PlacementManager
- class SoftLayer.managers.PlacementManager(client)[source]
Manages SoftLayer Reserved Capacity Groups.
Product Information
https://console.test.cloud.ibm.com/docs/vsi/vsi_placegroup.html#placement-groups
https://softlayer.github.io/reference/services/SoftLayer_Account/getPlacementGroups/
https://softlayer.github.io/reference/services/SoftLayer_Virtual_PlacementGroup_Rule/
Existing instances cannot be added to a placement group. You can only add a virtual server instance to a placement group at provisioning. To remove an instance from a placement group, you must delete or reclaim the instance.
- Parameters:
client (SoftLayer.API.BaseClient) – the client instance
Methods
__init__
(client)create
(placement_object)Creates a placement group
delete
(group_id)Deletes a PlacementGroup
Returns all available rules for creating a placement group
get_backend_router_id_from_hostname
(hostname)Finds the backend router Id that matches the hostname given
get_object
(group_id[, mask])Returns a PlacementGroup Object
Calls SoftLayer_Virtual_PlacementGroup::getAvailableRouters()
get_rule_id_from_name
(name)Finds the rule that matches name.
list
([mask])List existing placement groups
resolve_ids
(identifier)Takes a string and tries to resolve to a list of matching ids.
Attributes
resolvers
- create(placement_object)[source]
Creates a placement group
A placement_object is defined as:
placement_object = { 'backendRouterId': 12345, 'name': 'Test Name', 'ruleId': 12345 }
- Parameters:
placement_object (dictionary)
- delete(group_id)[source]
Deletes a PlacementGroup
Placement group must be empty to be deleted. https://softlayer.github.io/reference/services/SoftLayer_Virtual_PlacementGroup/deleteObject
- get_backend_router_id_from_hostname(hostname)[source]
Finds the backend router Id that matches the hostname given
No way to use an objectFilter to find a backendRouter, so we have to search the hard way.
- get_object(group_id, mask=None)[source]
Returns a PlacementGroup Object
https://softlayer.github.io/reference/services/SoftLayer_Virtual_PlacementGroup/getObject
- get_rule_id_from_name(name)[source]
Finds the rule that matches name.
SoftLayer_Virtual_PlacementGroup_Rule.getAllObjects doesn’t support objectFilters.
- resolve_ids(identifier)
Takes a string and tries to resolve to a list of matching ids.
What exactly ‘identifier’ can be depends on the resolvers
- Parameters:
identifier (string) – identifying string
- Returns list: