1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

change to run in HVM instance

This commit is contained in:
david hill
2016-04-26 16:40:44 -05:00
parent 81a99756eb
commit fd7933c61a
5 changed files with 76 additions and 12 deletions

View File

@ -7631,6 +7631,38 @@ namespace oam
}
/***************************************************************************
*
* Function: getEC2LocalInstanceSubnet
*
* Purpose: Get Amazon EC2 local Instance Subnet
*
****************************************************************************/
std::string Oam::getEC2LocalInstanceSubnet(std::string name)
{
// run script to get Instance Subnet
string cmd = InstallDir + "/bin/IDBInstanceCmds.sh Subnet > /tmp/getInstanceSubnet_" + name;
int status = system(cmd.c_str());
if (WEXITSTATUS(status) != 0 )
return "failed";
// get Instance Name
string instanceSubnet;
string file = "/tmp/getInstanceSubnet_" + name;
ifstream oldFile (file.c_str());
char line[400];
while (oldFile.getline(line, 400))
{
instanceSubnet = line;
}
oldFile.close();
return instanceSubnet;
}
/***************************************************************************
*
* Function: launchEC2Instance

View File

@ -2325,6 +2325,10 @@ namespace oam
*/
EXPORT std::string getEC2LocalInstanceType(std::string name = "dummy");
/** @brief getEC2LocalInstanceSubnet
*/
EXPORT std::string getEC2LocalInstanceSubnet(std::string name = "dummy");
/** @brief launchEC2Instance
*/
EXPORT std::string launchEC2Instance(const std::string name = "dummy", const std::string IPAddress = oam::UnassignedName, const std::string type = oam::UnassignedName, const std::string group = oam::UnassignedName);