You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
611 B
21 lines
611 B
# Copyright (C) 2005-2025 Splunk Inc. All Rights Reserved.
|
|
|
|
from integrations.commons.server import Server
|
|
|
|
|
|
class Phantom(Server):
|
|
def __init__(self, auth_token, host_name):
|
|
self.auth_token = auth_token
|
|
self.host_name = host_name
|
|
|
|
def get_rest_endpoint(self):
|
|
return "{server}/rest/".format(server=self.host_name)
|
|
|
|
def get_rest_headers(self):
|
|
return {
|
|
"ph-auth-token": self.auth_token
|
|
}
|
|
|
|
def get_container_url(self, container_id):
|
|
return "{server}/mission/{container_id}".format(server=self.host_name, container_id=str(container_id))
|