mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-03 01:17:41 +03:00
F #1548: Do not require END_VALUE for NEVER fix END_TYPE check
This commit is contained in:
parent
d6d2421fe5
commit
033534ecf2
@ -38,6 +38,7 @@ public:
|
||||
|
||||
enum EndOn
|
||||
{
|
||||
END_NONE = -1,
|
||||
NEVER = 0,
|
||||
TIMES = 1,
|
||||
DATE = 2
|
||||
|
@ -53,7 +53,7 @@ int SchedAction::repeat(Repeat& r)
|
||||
|
||||
int SchedAction::endon(EndOn& eo)
|
||||
{
|
||||
eo = NEVER;
|
||||
eo = END_NONE;
|
||||
|
||||
std::string et_s = vector_value("END_TYPE");
|
||||
|
||||
@ -72,7 +72,7 @@ int SchedAction::endon(EndOn& eo)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( v_eo < TIMES || v_eo > DATE )
|
||||
if ( v_eo < NEVER || v_eo > DATE )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -169,7 +169,7 @@ bool SchedAction::ends_in_range(EndOn eo, std::string& error)
|
||||
int end_value;
|
||||
int rc = vector_value("END_VALUE", end_value);
|
||||
|
||||
if ( rc == -1 )
|
||||
if ( rc == -1 && eo != NEVER )
|
||||
{
|
||||
error = "Missing END_VALUE";
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user