import mysql.connector

from mocha.core import InstanceKey, InstanceReference
from mocha.oms import DatabaseOms

if __name__ == "__main__":
	
	oms = MySQLDatabaseOms("localhost", 13306, "mocha_user", "9Q5eLsKfL5AciM4U", "mocha_test")

	inst = oms.get_instance_by_key(InstanceKey(1, 1))
	iaName = oms.get_instance_by_key(InstanceKey(4, 1))

	val = oms.get_attribute_value(inst, iaName)
	print(val)