예제 #1
0
# Written by Kelcey Damage, 2013

# Imports
#-----------------------------------------------------------------------#
from axol_api_client import AxolApiClient
import sys
sys.path.append("/opt/AXOL_Management/AXOL")
sys.path.append("C:\Users\kelcey.damage.CORP\Documents\GitHub\AXOL")
sys.path.append("D:\GitHub\Payfirma\AXOL")
from axol_common.classes.common_timer import CommonTimer

# Test metrics || client.test() supports: enable_response=True if you want
# to see the raw api output
#-----------------------------------------------------------------------#
print '----Test metrics-----------------'
CT = CommonTimer()

client = AxolApiClient('10.100.10.130')

api = 'get_processor_usage'
data = {'role': 'production_servers'}
CT.start()
client.test(api, data)

api = 'get_memory_usage'
data = {'role': 'production_servers'}
CT.log('get_processor_usage')
client.test(api, data)

api = 'get_disk_usage'
data = {'role': 'production_servers'}
예제 #2
0
#-----------------------------------------#
# Written by Kelcey Damage, 2013

# Imports
#-----------------------------------------------------------------------#
from axol_api_client import AxolApiClient
import sys
sys.path.append("/opt/AXOL_Management/AXOL")
sys.path.append("C:\Users\kelcey.damage.CORP\Documents\GitHub\AXOL")
from axol_common.classes.common_timer import CommonTimer

# Test administration || client.test() supports: enable_response=True if
# you want to see the raw api output
#-----------------------------------------------------------------------#
print '----Admin Tests------------------'
CT = CommonTimer()

client = AxolApiClient('10.100.10.34', )

api = 'get_all_roles'
data = {'network': 'external'}
CT.start()
client.test(api, data)

api = 'get_alert_servers'
data = {}
CT.log('get_all_roles')
client.test(api, data)

api = 'remove_alert_server'
data = {'server_name': 'live_axol_auto_scheduler_v1.0.0'}
예제 #3
0
# Written by Kelcey Damage, 2013

# Imports
#-----------------------------------------------------------------------#
from axol_api_client import AxolApiClient
import sys
sys.path.append("/opt/AXOL_Management/AXOL")
sys.path.append("C:\Users\kelcey.damage.CORP\Documents\GitHub\AXOL")
sys.path.append("D:\GitHub\Payfirma\AXOL")
from axol_common.classes.common_timer import CommonTimer

# Test metrics || client.test() supports: enable_response=True if you want
# to see the raw api output
#-----------------------------------------------------------------------#
print '----Test metrics-----------------'
CT = CommonTimer()


client = AxolApiClient('10.100.10.130')

api = 'get_processor_usage'
data = {
	'role': 'production_servers'
	}
CT.start()
client.test(api, data)

api = 'get_memory_usage'
data = {
	'role': 'production_servers'
	}
예제 #4
0
# Written by Kelcey Damage, 2013

# Imports
#-----------------------------------------------------------------------#
from axol_api_client import AxolApiClient
import sys
sys.path.append("/opt/AXOL_Management/AXOL")
sys.path.append("C:\Users\kelcey.damage.CORP\Documents\GitHub\AXOL")
sys.path.append("D:\GitHub\Payfirma\AXOL")
from axol_common.classes.common_timer import CommonTimer

# Test events || client.test() supports: enable_response=True if you want
# to see the raw api output
#-----------------------------------------------------------------------#
print '----Event Tests------------------'
CT = CommonTimer()

client = AxolApiClient('10.100.10.130')

api = 'create_event_notice'
data = {
    'alert_type': [],
    'source': 'api_test',
    'group': 'none',
    'data': {
        'test_field': 'test_string'
    },
}
CT.start()
client.test(api, data)
CT.log('create_event_notice')
예제 #5
0
#-----------------------------------------#
# Written by Kelcey Damage, 2013

# Imports
#-----------------------------------------------------------------------#
from axol_api_client import AxolApiClient
import sys
sys.path.append("/opt/AXOL_Management/AXOL")
sys.path.append("C:\Users\kelcey.damage.CORP\Documents\GitHub\AXOL")
from axol_common.classes.common_timer import CommonTimer

# Test administration || client.test() supports: enable_response=True if
# you want to see the raw api output
#-----------------------------------------------------------------------#
print '----Admin Tests------------------'
CT = CommonTimer()

client = AxolApiClient('10.100.10.34', )

api = 'get_all_roles'
data = {
	'network': 'external'
	}
CT.start()
client.test(api, data)

api = 'get_alert_servers'
data = {}
CT.log('get_all_roles')
client.test(api, data)