예제 #1
0
# 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'
	}
CT.log('get_memory_usage')
client.test(api, data)
예제 #2
0
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'}
CT.log('get_memory_usage')
client.test(api, data)

api = 'get_mysql_usage'
data = {'role': 'mysql_servers'}
CT.log('get_disk_usage')
client.test(api, data)
예제 #3
0
# Test scheduler || client.test() supports: enable_response=True if you want
# to see the raw api output
#-----------------------------------------------------------------------#
print '----Test scheduler---------------'

client = AxolApiClient('10.100.10.59')

api = 'create_scheduled_task'
data = {
	"time": 300,
	"task_name": 'integration_test',
	"api_name": 'get_null',
	"role": 'production_servers'
	}

client.test(api, data, enable_response=True)

api = 'get_scheduled_tasks'
data = {}

client.test(api, data, enable_response=True)


api = 'remove_scheduled_task'
data = {
	"task_name": "integration_test'",
	}

client.test(api, data, enable_response=True)