Commit 36d3dd60 by Belákovics Ádám

extended computedata

parent d38abdf8
......@@ -5,15 +5,23 @@
struct ComputeData{
std::string name;
std::string state;
std::string stateMessage;
double memory;
int cpu;
int cores;
std::string architecture;
std::string hostname;
int port;
std::string protocol;
std::string username;
std::string password;
std::string connString;
std::string leaseSuspend;
std::string leaseRemoved;
};
#endif // COMPUTEDATA
......
......@@ -84,14 +84,24 @@ std::string Controller::getState(std::string id){
ComputeData Controller::getDataByID(std::string id){
ComputeData data;
data.name = allCompute.at(std::stoi(id))->getHostname();
data.state = allCompute.at(std::stoi(id))->getState();
data.stateMessage = allCompute.at(std::stoi(id))->getStateMessage();
data.architecture = allCompute.at(std::stoi(id))->getArchitecture();
data.memory = allCompute.at(std::stoi(id))->getMemory();
data.cpu = allCompute.at(std::stoi(id))->getCpuShare();
data.cores = allCompute.at(std::stoi(id))->getCores();
data.hostname = allCompute.at(std::stoi(id))->getCredentialHost();
data.port = allCompute.at(std::stoi(id))->getCredentialPort();
data.protocol = allCompute.at(std::stoi(id))->getCredentialProtocol();
data.username = allCompute.at(std::stoi(id))->getCredentialUsername();
data.password = allCompute.at(std::stoi(id))->getCredentialPassword();
data.connString = allCompute.at(std::stoi(id))->getCredentialCommand();
data.leaseRemoved = allCompute.at(std::stoi(id))->getLeasetimeRemove();
data.leaseSuspend = allCompute.at(std::stoi(id))->getLeasetimeSuspend();
return data;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment