Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.managers['Workflow'] = WorkflowManager(
self.endpoints['api'], cacert=self.cacert, debug=self.debug)
# Service Registry
self.managers['ServiceRegistryGroups'] = ServiceRegistryGroupsManager(
models.ServiceRegistryGroup, self.endpoints['api'], cacert=self.cacert,
debug=self.debug)
self.managers['ServiceRegistryMembers'] = ServiceRegistryMembersManager(
models.ServiceRegistryMember, self.endpoints['api'], cacert=self.cacert,
debug=self.debug)
# RBAC
self.managers['Role'] = ResourceManager(
models.Role, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['UserRoleAssignment'] = ResourceManager(
models.UserRoleAssignment, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
models.Sensor, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['TriggerType'] = ResourceManager(
models.TriggerType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Trigger'] = ResourceManager(
models.Trigger, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['TriggerInstance'] = TriggerInstanceResourceManager(
models.TriggerInstance, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['KeyValuePair'] = ResourceManager(
models.KeyValuePair, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Webhook'] = WebhookManager(
models.Webhook, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Timer'] = ResourceManager(
models.Timer, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Trace'] = ResourceManager(
models.Trace, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['RuleEnforcement'] = ResourceManager(
models.RuleEnforcement, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Stream'] = StreamManager(
self.endpoints['stream'], cacert=self.cacert, debug=self.debug)
self.managers['Workflow'] = WorkflowManager(
self.endpoints['api'], cacert=self.cacert, debug=self.debug)
# Service Registry
self.managers['ServiceRegistryGroups'] = ServiceRegistryGroupsManager(
models.ServiceRegistryGroup, self.endpoints['api'], cacert=self.cacert,
debug=self.debug)
self.managers['ServiceRegistryMembers'] = ServiceRegistryMembersManager(
models.ServiceRegistryMember, self.endpoints['api'], cacert=self.cacert,
debug=self.debug)
# RBAC
self.managers['Execution'] = ExecutionResourceManager(
models.Execution, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
# NOTE: LiveAction has been deprecated in favor of Execution. It will be left here for
# backward compatibility reasons until v3.2.0
self.managers['LiveAction'] = self.managers['Execution']
self.managers['Inquiry'] = InquiryResourceManager(
models.Inquiry, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Pack'] = PackResourceManager(
models.Pack, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Policy'] = ResourceManager(
models.Policy, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['PolicyType'] = ResourceManager(
models.PolicyType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Rule'] = ResourceManager(
models.Rule, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Sensor'] = ResourceManager(
models.Sensor, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['TriggerType'] = ResourceManager(
models.TriggerType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Trigger'] = ResourceManager(
models.Trigger, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['TriggerInstance'] = TriggerInstanceResourceManager(
models.TriggerInstance, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['KeyValuePair'] = ResourceManager(
models.KeyValuePair, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Webhook'] = WebhookManager(
models.Webhook, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Timer'] = ResourceManager(
models.Timer, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Trace'] = ResourceManager(
models.Trace, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['RuleEnforcement'] = ResourceManager(
self.managers['ApiKey'] = ResourceManager(
models.ApiKey, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Config'] = ConfigManager(
models.Config, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['ConfigSchema'] = ResourceManager(
models.ConfigSchema, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Execution'] = ExecutionResourceManager(
models.Execution, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
# NOTE: LiveAction has been deprecated in favor of Execution. It will be left here for
# backward compatibility reasons until v3.2.0
self.managers['LiveAction'] = self.managers['Execution']
self.managers['Inquiry'] = InquiryResourceManager(
models.Inquiry, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Pack'] = PackResourceManager(
models.Pack, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Policy'] = ResourceManager(
models.Policy, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['PolicyType'] = ResourceManager(
models.PolicyType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Rule'] = ResourceManager(
models.Rule, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Sensor'] = ResourceManager(
models.Sensor, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['TriggerType'] = ResourceManager(
models.TriggerType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Trigger'] = ResourceManager(
models.Trigger, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['TriggerInstance'] = TriggerInstanceResourceManager(
models.TriggerInstance, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['KeyValuePair'] = ResourceManager(
models.KeyValuePair, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Webhook'] = WebhookManager(
self.debug = debug
# Note: This is a nasty hack for now, but we need to get rid of the decrator abuse
if token:
os.environ['ST2_AUTH_TOKEN'] = token
self.token = token
if api_key:
os.environ['ST2_API_KEY'] = api_key
self.api_key = api_key
# Instantiate resource managers and assign appropriate API endpoint.
self.managers = dict()
self.managers['Token'] = ResourceManager(
models.Token, self.endpoints['auth'], cacert=self.cacert, debug=self.debug)
self.managers['RunnerType'] = ResourceManager(
models.RunnerType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Action'] = ActionResourceManager(
models.Action, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['ActionAlias'] = ActionAliasResourceManager(
models.ActionAlias, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['ActionAliasExecution'] = ActionAliasExecutionManager(
models.ActionAliasExecution, self.endpoints['api'],
cacert=self.cacert, debug=self.debug)
self.managers['ApiKey'] = ResourceManager(
models.ApiKey, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Config'] = ConfigManager(
models.Config, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['ConfigSchema'] = ResourceManager(
models.ConfigSchema, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.api_key = api_key
# Instantiate resource managers and assign appropriate API endpoint.
self.managers = dict()
self.managers['Token'] = ResourceManager(
models.Token, self.endpoints['auth'], cacert=self.cacert, debug=self.debug)
self.managers['RunnerType'] = ResourceManager(
models.RunnerType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Action'] = ActionResourceManager(
models.Action, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['ActionAlias'] = ActionAliasResourceManager(
models.ActionAlias, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['ActionAliasExecution'] = ActionAliasExecutionManager(
models.ActionAliasExecution, self.endpoints['api'],
cacert=self.cacert, debug=self.debug)
self.managers['ApiKey'] = ResourceManager(
models.ApiKey, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Config'] = ConfigManager(
models.Config, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['ConfigSchema'] = ResourceManager(
models.ConfigSchema, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Execution'] = ExecutionResourceManager(
models.Execution, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
# NOTE: LiveAction has been deprecated in favor of Execution. It will be left here for
# backward compatibility reasons until v3.2.0
self.managers['LiveAction'] = self.managers['Execution']
self.managers['Inquiry'] = InquiryResourceManager(
models.Inquiry, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Pack'] = PackResourceManager(
models.Pack, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Policy'] = ResourceManager(
models.Policy, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
models.PolicyType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Rule'] = ResourceManager(
models.Rule, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Sensor'] = ResourceManager(
models.Sensor, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['TriggerType'] = ResourceManager(
models.TriggerType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Trigger'] = ResourceManager(
models.Trigger, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['TriggerInstance'] = TriggerInstanceResourceManager(
models.TriggerInstance, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['KeyValuePair'] = ResourceManager(
models.KeyValuePair, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Webhook'] = WebhookManager(
models.Webhook, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Timer'] = ResourceManager(
models.Timer, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Trace'] = ResourceManager(
models.Trace, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['RuleEnforcement'] = ResourceManager(
models.RuleEnforcement, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Stream'] = StreamManager(
self.endpoints['stream'], cacert=self.cacert, debug=self.debug)
self.managers['Workflow'] = WorkflowManager(
self.endpoints['api'], cacert=self.cacert, debug=self.debug)
# Service Registry
self.managers['ServiceRegistryGroups'] = ServiceRegistryGroupsManager(
models.ServiceRegistryGroup, self.endpoints['api'], cacert=self.cacert,
debug=self.debug)
self.managers['ServiceRegistryMembers'] = ServiceRegistryMembersManager(
self.managers['LiveAction'] = self.managers['Execution']
self.managers['Inquiry'] = InquiryResourceManager(
models.Inquiry, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Pack'] = PackResourceManager(
models.Pack, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Policy'] = ResourceManager(
models.Policy, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['PolicyType'] = ResourceManager(
models.PolicyType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Rule'] = ResourceManager(
models.Rule, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Sensor'] = ResourceManager(
models.Sensor, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['TriggerType'] = ResourceManager(
models.TriggerType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Trigger'] = ResourceManager(
models.Trigger, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['TriggerInstance'] = TriggerInstanceResourceManager(
models.TriggerInstance, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['KeyValuePair'] = ResourceManager(
models.KeyValuePair, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Webhook'] = WebhookManager(
models.Webhook, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Timer'] = ResourceManager(
models.Timer, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Trace'] = ResourceManager(
models.Trace, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['RuleEnforcement'] = ResourceManager(
models.RuleEnforcement, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Stream'] = StreamManager(
self.endpoints['stream'], cacert=self.cacert, debug=self.debug)
self.managers['Workflow'] = WorkflowManager(
# Note: This is a nasty hack for now, but we need to get rid of the decrator abuse
if token:
os.environ['ST2_AUTH_TOKEN'] = token
self.token = token
if api_key:
os.environ['ST2_API_KEY'] = api_key
self.api_key = api_key
# Instantiate resource managers and assign appropriate API endpoint.
self.managers = dict()
self.managers['Token'] = ResourceManager(
models.Token, self.endpoints['auth'], cacert=self.cacert, debug=self.debug)
self.managers['RunnerType'] = ResourceManager(
models.RunnerType, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Action'] = ActionResourceManager(
models.Action, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['ActionAlias'] = ActionAliasResourceManager(
models.ActionAlias, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['ActionAliasExecution'] = ActionAliasExecutionManager(
models.ActionAliasExecution, self.endpoints['api'],
cacert=self.cacert, debug=self.debug)
self.managers['ApiKey'] = ResourceManager(
models.ApiKey, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Config'] = ConfigManager(
models.Config, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['ConfigSchema'] = ResourceManager(
models.ConfigSchema, self.endpoints['api'], cacert=self.cacert, debug=self.debug)
self.managers['Execution'] = ExecutionResourceManager(
models.Execution, self.endpoints['api'], cacert=self.cacert, debug=self.debug)