Client SDK Version 2.0.0
Ionic Security client SDK for Python users
|
ProfileManager handles management of profiles, including interfacing with persistors to save and load, and loading json profile data, as well as active profiles. More...
Public Member Functions | |
def | __init__ (self, profilelist=None, json=None, _cProfileManager=None) |
A ProfileManager can be initialized with an array of existing profiles, or a json string of profile data. More... | |
def | hasactiveprofile (self) |
Determine if any device profile is active. More... | |
def | setactiveprofile (self, deviceid) |
Set the current device profile of the agent. More... | |
def | getactiveprofile (self) |
Get the current device profile of the agent. More... | |
def | hasanyprofiles (self) |
Determine if any device profiles are loaded. More... | |
def | getallprofiles (self) |
Get all available device profiles. More... | |
def | addprofile (self, deviceprofile, makeactive=False) |
Add a device profile to the agent device profile collection. More... | |
def | removeprofile (self, deviceid) |
Remove a device profile from the agent device profile list. More... | |
def | getprofileforkeyid (self, keyid) |
Determine which device profile is associated with the provided key ID. More... | |
def | loadprofiles (self, persistor) |
Load device profiles using the provided profile persistor. More... | |
def | saveprofiles (self, persistor) |
Save device profiles using the specified profile persistor. More... | |
def | loadfromjson (self, jsonstring) |
def | savetojson (self) |
ProfileManager handles management of profiles, including interfacing with persistors to save and load, and loading json profile data, as well as active profiles.
def ionicsdk.profilemanager.ProfileManager.__init__ | ( | self, | |
profilelist = None , |
|||
json = None , |
|||
_cProfileManager = None |
|||
) |
A ProfileManager can be initialized with an array of existing profiles, or a json string of profile data.
profilelist | (DeviceProfileList, optional): A device profile list to initialize the manager with. If unspecified or None, will start with an empty list and profiles must be added later. |
jsonstring | (string, optional): A string containing profile data in json format. Can be read from a SEP file or downloaded from a server. |
def ionicsdk.profilemanager.ProfileManager.addprofile | ( | self, | |
deviceprofile, | |||
makeactive = False |
|||
) |
Add a device profile to the agent device profile collection.
deviceprofile | (DeviceProfile): The device profile object. |
makeactive | (bool, optional): If true, then this profile will be set as the active profile (default: False). |
def ionicsdk.profilemanager.ProfileManager.getactiveprofile | ( | self | ) |
Get the current device profile of the agent.
def ionicsdk.profilemanager.ProfileManager.getallprofiles | ( | self | ) |
Get all available device profiles.
def ionicsdk.profilemanager.ProfileManager.getprofileforkeyid | ( | self, | |
keyid | |||
) |
Determine which device profile is associated with the provided key ID.
keyid | (string): The key ID for which to retrieve the associated device profile. |
def ionicsdk.profilemanager.ProfileManager.hasactiveprofile | ( | self | ) |
Determine if any device profile is active.
def ionicsdk.profilemanager.ProfileManager.hasanyprofiles | ( | self | ) |
Determine if any device profiles are loaded.
def ionicsdk.profilemanager.ProfileManager.loadprofiles | ( | self, | |
persistor | |||
) |
Load device profiles using the provided profile persistor.
Attempts to load device profiles using the specified profile persistor.
If loading is successful, all existing profiles associated with the agent will be discarded in favor of the newly loaded profiles. The active profile provided by the persistor will replace the previous active profile (if any). It is also possible that the persistor does not provide an active profile, in which case the agent object will be left without an active profile.
If loading is not successful, then no changes are made to the state of the agent.
persistor | (DeviceProfilePersistorBase): The device profile persistor. |
def ionicsdk.profilemanager.ProfileManager.removeprofile | ( | self, | |
deviceid | |||
) |
Remove a device profile from the agent device profile list.
deviceid | (string): The device id of the profile to remove. |
def ionicsdk.profilemanager.ProfileManager.saveprofiles | ( | self, | |
persistor | |||
) |
Save device profiles using the specified profile persistor.
persistor | (DeviceProfilePersistorBase): The device profile persistor. |
def ionicsdk.profilemanager.ProfileManager.setactiveprofile | ( | self, | |
deviceid | |||
) |
Set the current device profile of the agent.
deviceid | (str): A string device id of a loaded profile to set as the active profile for the agent. If a DeviceProfile object is given instead it will use the deviceid parameter of the object as the string source. |
You acknowledge your access, review and use of the documentation on this page is subject to the Ionic Security Inc. Documentation Use Rights.
© 2016-2020 Ionic Security Inc. All rights reserved. -
Generated on Thu Jul 2 2020 12:40:01 for Client SDK Version 2.0.0 by
1.8.18