libsolace.items.SolaceClientProfile module¶
-
class
libsolace.items.SolaceClientProfile.
SolaceClientProfile
[source]¶ Create / Manage client profiles
This plugin manages Client Profiles within Solace. Typically you should invoke this plugin via
libsolace.SolaceAPI.SolaceAPI
Please see
libsolace.plugin.Plugin
for how plugins are instantiated and used.Example of direct instantiation and passing in a instance SolaceAPI
>>> import libsolace.settingsloader as settings >>> import libsolace >>> from libsolace.SolaceAPI import SolaceAPI >>> clazz = libsolace.plugin_registry("SolaceClientProfile", settings=settings) >>> api = SolaceAPI("dev") >>> scp = clazz(settings=settings, api=api) >>> client_dict = scp.get(api=api, name="default", vpn_name="default")
Example of Instantiation via the SolaceAPI manage method
>>> import libsolace.settingsloader as settings >>> from libsolace.SolaceAPI import SolaceAPI >>> api = SolaceAPI("dev") >>> scp = api.manage("SolaceClientProfile") >>> client_dict = scp.get(api=api, name="default", vpn_name="default") >>> list_xml = api.manage("SolaceClientProfile", name="myprofile", vpn_name="dev_testvpn").commands.commands
-
allow_bridging
(**kwargs)[source]¶ Allow bridging
Example:
>>> import libsolace.settingsloader as settings >>> from libsolace.SolaceAPI import SolaceAPI >>> plugin = SolaceAPI("dev", version="soltr/7_1_1").manage("SolaceClientProfile") >>> request = plugin.allow_bridging(name="default", vpn_name="default") >>> request.xml '<rpc semp-version="soltr/7_1_1"><client-profile><name>default</name><vpn-name>default</vpn-name><allow-bridge-connections/></client-profile></rpc>' >>> # api.rpc(request)
Parameters: - name (str) – name of the profile
- vpn_name (str) – the name of the vpn to scope the request to
Returns: SEMP request
Return type:
-
allow_consume
(**kwargs)[source]¶ Allow consume permission
Example:
>>> import libsolace.settingsloader as settings >>> from libsolace.SolaceAPI import SolaceAPI >>> api = SolaceAPI("dev") >>> plugin_response = api.manage("SolaceClientProfile").allow_consume(name="default", vpn_name="default")
Parameters: - name (str) – name of the profile
- vpn_name (str) – the name of the vpn to scope the request to
Returns: SEMP request
Return type:
-
allow_endpoint_create
(**kwargs)[source]¶ Allow endpoint creation permission
Example:
>>> import libsolace.settingsloader as settings >>> from libsolace.SolaceAPI import SolaceAPI >>> api = SolaceAPI("dev") >>> request = api.manage("SolaceClientProfile").allow_endpoint_create(name="default", vpn_name="default") >>> # response = api.rpc(request)
Parameters: - name (str) – name of the profile
- vpn_name (str) – the name of the vpn to scope the request to
Returns: SEMP request
Return type:
-
allow_send
(**kwargs)[source]¶ Allow send permission
Example:
>>> import libsolace.settingsloader as settings >>> from libsolace.SolaceAPI import SolaceAPI >>> api = SolaceAPI("dev") >>> plugin_response = api.manage("SolaceClientProfile").allow_send(name="default", vpn_name="default")
Parameters: - name (str) – name of the profile
- vpn_name (str) – the name of the vpn to scope the request to
Returns: SEMP request
Return type:
-
allow_transacted_sessions
(**kwargs)[source]¶ Allow transaction sessions permission
Example:
>>> import libsolace.settingsloader as settings >>> from libsolace.SolaceAPI import SolaceAPI >>> api = SolaceAPI("dev") >>> request = api.manage("SolaceClientProfile").allow_transacted_sessions(name="default", vpn_name="default") >>> # response = api.rpc(request)
Parameters: - name (str) – name of the profile
- vpn_name (str) – the name of the vpn to scope the request to
Returns: SEMP request
Return type:
-
defaults
= {'max_clients': 1000}¶
-
delete
(**kwargs)[source]¶ Delete a client profile
Example:
>>> import libsolace.settingsloader as settings >>> from libsolace.SolaceAPI import SolaceAPI >>> api = SolaceAPI("dev") >>> plugin_response = api.manage("SolaceClientProfile").delete(name="default", vpn_name="default")
Parameters: - name (str) – name of the profile
- vpn_name (str) – the name of the vpn to scope the request to
Returns: SEMP request
Return type:
-
get
(**kwargs)[source]¶ Returns a ClientProfile immediately from both appliances
Example:
>>> import libsolace.settingsloader as settings >>> from libsolace.SolaceAPI import SolaceAPI >>> api = SolaceAPI("dev") >>> response = api.manage("SolaceClientProfile").get(name="default", vpn_name="default")
Parameters: - name (str) – name of the profile
- vpn_name (str) – the name of the vpn to scope the request to
- details (bool) – get more details boolean
Return type: libsolace.SolaceReplyHandler
Returns: dictionary representation of client profile
-
new_client_profile
(**kwargs)[source]¶ Create a new client profile
Enqueues the request in self.commands and returns the SEMP request via PluginResponse.
Example:
>>> import libsolace.settingsloader as settings >>> from libsolace.SolaceAPI import SolaceAPI >>> api = SolaceAPI("dev") >>> plugin_response = api.manage("SolaceClientProfile").new_client_profile(name="default", vpn_name="default")
Parameters: - name (str) – name of the profile
- vpn_name (str) – the name of the vpn to scope the request to
Returns: dictionary representation of client profile
Return type:
-
plugin_name
= 'SolaceClientProfile'¶
-
set_max_clients
(**kwargs)[source]¶ Set max clients for profile
Example:
>>> import libsolace.settingsloader as settings >>> from libsolace.SolaceAPI import SolaceAPI >>> api = SolaceAPI("dev") >>> request = api.manage("SolaceClientProfile").set_max_clients(name="default", vpn_name="default", max_clients=500) >>> # response = api.rpc(request)
Parameters: - name (str) – name of the profile
- vpn_name (str) – the name of the vpn to scope the request to
- max_clients (int) – max number of clients
Returns: SEMP request
Return type:
-