mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-29 18:50:08 +03:00
Feature #4084: Fix automatic requirements
(cherry picked from commit 9b8479bacfd241ff5547990a2b3a358358386b16)
This commit is contained in:
parent
fef186886b
commit
4a6d37cf74
@ -2093,7 +2093,7 @@ private:
|
||||
/**
|
||||
* Same as above but specifies the attribute name to handle old versions
|
||||
*/
|
||||
int get_public_clouds(const char * name, set<string> &clouds) const;
|
||||
int get_public_clouds(const string& name, set<string> &clouds) const;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -4220,7 +4220,7 @@ void VirtualMachine::clear_template_monitor_error()
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
int VirtualMachine::get_public_clouds(const char * pname, set<string> &clouds) const
|
||||
int VirtualMachine::get_public_clouds(const string& pname, set<string> &clouds) const
|
||||
{
|
||||
vector<Attribute*> attrs;
|
||||
vector<Attribute*>::const_iterator it;
|
||||
@ -4229,6 +4229,12 @@ int VirtualMachine::get_public_clouds(const char * pname, set<string> &clouds) c
|
||||
|
||||
user_obj_template->get(pname, attrs);
|
||||
|
||||
if ( !attrs.empty() && pname == "EC2" )
|
||||
{
|
||||
clouds.insert("ec2");
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (it = attrs.begin(); it != attrs.end(); it++)
|
||||
{
|
||||
vatt = dynamic_cast<VectorAttribute * >(*it);
|
||||
|
Loading…
x
Reference in New Issue
Block a user