Exemple #1
0
int main(int argc, char *argv[])
{
	Oam oam;

	//get mysql user password
	string mysqlpw = oam::UnassignedName;
	try {
		mysqlpw = oam.getMySQLPassword();
	}
	catch (...)
	{
		cout << oam::UnassignedName << endl;
		exit (1);
	}

	if ( mysqlpw == oam::UnassignedName ) {
		cout << oam::UnassignedName << endl;
		exit (1);
	}

	cout << mysqlpw << endl;

	try {
		oam.setSystemConfig("MySQLPasswordConfig", "y");
	}
	catch(...) {}

	exit (0);

}
Exemple #2
0
	void test10() {
		Oam oamapi;
		oamapi.setSystemConfig("ModuleCPUMajorThreshold1", 7500);

		oamapi.getSystemConfig("ModuleCPUMajorThreshold1", Ivalue);

		CPPUNIT_ASSERT(Ivalue == 7500);
	};
Exemple #3
0
	void test8() {
		Oam oamapi;
		oamapi.setSystemConfig("ModuleHeartbeatPeriod", 5);

		oamapi.getSystemConfig("ModuleHeartbeatPeriod", Ivalue);

		CPPUNIT_ASSERT(Ivalue == 5);
	};
Exemple #4
0
	void test5() {
		Oam oamapi;
		oamapi.setSystemConfig("SystemVersion", "V2.0.2.3");

		oamapi.getSystemConfig("SystemVersion", Svalue);

		CPPUNIT_ASSERT(Svalue == "V2.0.2.3");
	};
Exemple #5
0
	void test7() {
		Oam oamapi;
		oamapi.setSystemConfig("SystemVersionBad", "V2.0.2.3");
	};