|
@@ -49,7 +49,7 @@ IClientWsPackageProcess *getWsPackageSoapService(const char *server, const char
|
|
|
class EclCmdPackageActivate : public EclCmdCommon
|
|
|
{
|
|
|
public:
|
|
|
- EclCmdPackageActivate()
|
|
|
+ EclCmdPackageActivate() : optGlobalScope(false)
|
|
|
{
|
|
|
}
|
|
|
virtual bool parseCommandLineOptions(ArgvIterator &iter)
|
|
@@ -76,6 +76,8 @@ public:
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
|
+ if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE))
|
|
|
+ continue;
|
|
|
if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch)
|
|
|
return false;
|
|
|
}
|
|
@@ -109,6 +111,7 @@ public:
|
|
|
request->setTarget(optTarget);
|
|
|
request->setPackageMap(optPackageMap);
|
|
|
request->setProcess(optProcess);
|
|
|
+ request->setGlobalScope(optGlobalScope);
|
|
|
|
|
|
Owned<IClientActivatePackageResponse> resp = packageProcessClient->ActivatePackage(request);
|
|
|
if (resp->getExceptions().ordinality())
|
|
@@ -126,7 +129,8 @@ public:
|
|
|
"ecl packagemap activate <target> <packagemap>\n"
|
|
|
" Options:\n"
|
|
|
" <target> Name of target containing package map to activate\n"
|
|
|
- " <packagemap> Packagemap to activate\n",
|
|
|
+ " <packagemap> Packagemap to activate\n"
|
|
|
+ " --global-scope The specified packagemap can be shared across multiple targets\n",
|
|
|
stdout);
|
|
|
EclCmdCommon::usage();
|
|
|
}
|
|
@@ -135,12 +139,13 @@ private:
|
|
|
StringAttr optTarget;
|
|
|
StringAttr optPackageMap;
|
|
|
StringAttr optProcess;
|
|
|
+ bool optGlobalScope;
|
|
|
};
|
|
|
|
|
|
class EclCmdPackageDeActivate : public EclCmdCommon
|
|
|
{
|
|
|
public:
|
|
|
- EclCmdPackageDeActivate()
|
|
|
+ EclCmdPackageDeActivate() : optGlobalScope(false)
|
|
|
{
|
|
|
}
|
|
|
virtual bool parseCommandLineOptions(ArgvIterator &iter)
|
|
@@ -167,6 +172,8 @@ public:
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
|
+ if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE))
|
|
|
+ continue;
|
|
|
if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch)
|
|
|
return false;
|
|
|
}
|
|
@@ -200,6 +207,7 @@ public:
|
|
|
request->setTarget(optTarget);
|
|
|
request->setPackageMap(optPackageMap);
|
|
|
request->setProcess(optProcess);
|
|
|
+ request->setGlobalScope(optGlobalScope);
|
|
|
|
|
|
Owned<IClientDeActivatePackageResponse> resp = packageProcessClient->DeActivatePackage(request);
|
|
|
if (resp->getExceptions().ordinality())
|
|
@@ -216,7 +224,8 @@ public:
|
|
|
"ecl packagemap deactivate <target> <packagemap>\n"
|
|
|
" Options:\n"
|
|
|
" <target> Name of target containing package map to activate\n"
|
|
|
- " <packagemap> Packagemap to activate\n",
|
|
|
+ " <packagemap> Packagemap to activate\n"
|
|
|
+ " --global-scope The specified packagemap can be shared across multiple targets\n",
|
|
|
stdout);
|
|
|
EclCmdCommon::usage();
|
|
|
}
|
|
@@ -225,6 +234,7 @@ private:
|
|
|
StringAttr optTarget;
|
|
|
StringAttr optPackageMap;
|
|
|
StringAttr optProcess;
|
|
|
+ bool optGlobalScope;
|
|
|
};
|
|
|
|
|
|
class EclCmdPackageList : public EclCmdCommon
|
|
@@ -413,6 +423,8 @@ public:
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
|
+ if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE))
|
|
|
+ continue;
|
|
|
if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch)
|
|
|
return false;
|
|
|
}
|
|
@@ -451,6 +463,7 @@ public:
|
|
|
request->setTarget(optTarget);
|
|
|
request->setPackageMap(optPackageMap);
|
|
|
request->setProcess(optProcess);
|
|
|
+ request->setGlobalScope(optGlobalScope);
|
|
|
|
|
|
Owned<IClientDeletePackageResponse> resp = packageProcessClient->DeletePackage(request);
|
|
|
if (resp->getExceptions().ordinality())
|
|
@@ -470,7 +483,8 @@ public:
|
|
|
"ecl packagemap delete <target> <packagemap>\n"
|
|
|
" Options:\n"
|
|
|
" <target> Name of the target to use \n"
|
|
|
- " <packagemap> Name of the package map to delete\n",
|
|
|
+ " <packagemap> Name of the package map to delete\n"
|
|
|
+ " --global-scope The specified packagemap is sharable across multiple targets\n",
|
|
|
stdout);
|
|
|
EclCmdCommon::usage();
|
|
|
}
|
|
@@ -478,12 +492,13 @@ private:
|
|
|
StringAttr optPackageMap;
|
|
|
StringAttr optTarget;
|
|
|
StringAttr optProcess;
|
|
|
+ bool optGlobalScope;
|
|
|
};
|
|
|
|
|
|
class EclCmdPackageAdd : public EclCmdCommon
|
|
|
{
|
|
|
public:
|
|
|
- EclCmdPackageAdd() : optActivate(false), optOverWrite(false)
|
|
|
+ EclCmdPackageAdd() : optActivate(false), optOverWrite(false), optGlobalScope(false)
|
|
|
{
|
|
|
}
|
|
|
virtual bool parseCommandLineOptions(ArgvIterator &iter)
|
|
@@ -518,6 +533,8 @@ public:
|
|
|
continue;
|
|
|
if (iter.matchFlag(optOverWrite, ECLOPT_OVERWRITE)||iter.matchFlag(optOverWrite, ECLOPT_OVERWRITE_S))
|
|
|
continue;
|
|
|
+ if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE))
|
|
|
+ continue;
|
|
|
if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch)
|
|
|
return false;
|
|
|
}
|
|
@@ -571,6 +588,7 @@ public:
|
|
|
request->setProcess(optProcess);
|
|
|
request->setDaliIp(optDaliIP);
|
|
|
request->setOverWrite(optOverWrite);
|
|
|
+ request->setGlobalScope(optGlobalScope);
|
|
|
|
|
|
Owned<IClientAddPackageResponse> resp = packageProcessClient->AddPackage(request);
|
|
|
if (resp->getExceptions().ordinality())
|
|
@@ -599,7 +617,8 @@ public:
|
|
|
" -O, --overwrite Overwrite existing information\n"
|
|
|
" -A, --activate Activate the package information\n"
|
|
|
" --daliip=<ip> IP of the remote dali to use for logical file lookups\n"
|
|
|
- " --pmid Identifier of package map - defaults to filename if not specified."
|
|
|
+ " --pmid Identifier of package map - defaults to filename if not specified\n"
|
|
|
+ " --global-scope The specified packagemap can be shared across multiple targets\n"
|
|
|
// NOT-YET " --packageprocessname if not set use this package process name for all clusters"
|
|
|
" <target> Name of target to use when adding package map information\n"
|
|
|
" <filename> Name of file containing package map information\n",
|
|
@@ -608,20 +627,21 @@ public:
|
|
|
EclCmdCommon::usage();
|
|
|
}
|
|
|
private:
|
|
|
+ StringBuffer pkgInfo;
|
|
|
StringAttr optFileName;
|
|
|
StringAttr optTarget;
|
|
|
StringAttr optProcess;
|
|
|
- bool optActivate;
|
|
|
- bool optOverWrite;
|
|
|
- StringBuffer pkgInfo;
|
|
|
StringAttr optDaliIP;
|
|
|
StringAttr optPackageMapId;
|
|
|
+ bool optActivate;
|
|
|
+ bool optOverWrite;
|
|
|
+ bool optGlobalScope;
|
|
|
};
|
|
|
|
|
|
class EclCmdPackageValidate : public EclCmdCommon
|
|
|
{
|
|
|
public:
|
|
|
- EclCmdPackageValidate() : optValidateActive(false), optCheckDFS(false)
|
|
|
+ EclCmdPackageValidate() : optValidateActive(false), optCheckDFS(false), optGlobalScope(false)
|
|
|
{
|
|
|
}
|
|
|
virtual bool parseCommandLineOptions(ArgvIterator &iter)
|
|
@@ -656,6 +676,8 @@ public:
|
|
|
continue;
|
|
|
if (iter.matchOption(optQueryId, ECLOPT_QUERYID))
|
|
|
continue;
|
|
|
+ if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE))
|
|
|
+ continue;
|
|
|
if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch)
|
|
|
return false;
|
|
|
}
|
|
@@ -709,6 +731,7 @@ public:
|
|
|
request->setTarget(optTarget);
|
|
|
request->setQueryIdToVerify(optQueryId);
|
|
|
request->setCheckDFS(optCheckDFS);
|
|
|
+ request->setGlobalScope(optGlobalScope);
|
|
|
|
|
|
bool validateMessages = false;
|
|
|
Owned<IClientValidatePackageResponse> resp = packageProcessClient->ValidatePackage(request);
|
|
@@ -783,7 +806,8 @@ public:
|
|
|
" <filename> Name of file containing package map information\n"
|
|
|
" --active Validate the active packagemap\n"
|
|
|
" --check-dfs Verify that subfiles exist in DFS\n"
|
|
|
- " -pm, --pmid Identifier of packagemap to validate\n",
|
|
|
+ " -pm, --pmid Identifier of packagemap to validate\n"
|
|
|
+ " --global-scope The specified packagemap can be shared across multiple targets\n",
|
|
|
stdout);
|
|
|
|
|
|
EclCmdCommon::usage();
|
|
@@ -795,12 +819,13 @@ private:
|
|
|
StringAttr optQueryId;
|
|
|
bool optValidateActive;
|
|
|
bool optCheckDFS;
|
|
|
+ bool optGlobalScope;
|
|
|
};
|
|
|
|
|
|
class EclCmdPackageQueryFiles : public EclCmdCommon
|
|
|
{
|
|
|
public:
|
|
|
- EclCmdPackageQueryFiles()
|
|
|
+ EclCmdPackageQueryFiles() : optGlobalScope(false)
|
|
|
{
|
|
|
}
|
|
|
virtual bool parseCommandLineOptions(ArgvIterator &iter)
|
|
@@ -829,6 +854,8 @@ public:
|
|
|
}
|
|
|
if (iter.matchOption(optPMID, ECLOPT_PMID) || iter.matchOption(optPMID, ECLOPT_PMID_S))
|
|
|
continue;
|
|
|
+ if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE))
|
|
|
+ continue;
|
|
|
if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch)
|
|
|
return false;
|
|
|
}
|
|
@@ -863,6 +890,7 @@ public:
|
|
|
request->setTarget(optTarget);
|
|
|
request->setQueryName(optQueryId);
|
|
|
request->setPMID(optPMID);
|
|
|
+ request->setGlobalScope(optGlobalScope);
|
|
|
|
|
|
Owned<IClientGetQueryFileMappingResponse> resp = packageProcessClient->GetQueryFileMapping(request);
|
|
|
if (resp->getExceptions().ordinality()>0)
|
|
@@ -911,7 +939,8 @@ public:
|
|
|
" Options:\n"
|
|
|
" <target> Name of target to use when validating package map information\n"
|
|
|
" <queryid> Name of query to get file mappings for\n"
|
|
|
- " -pm, --pmid Optional id of packagemap to validate, defaults to active\n",
|
|
|
+ " -pm, --pmid Optional id of packagemap to validate, defaults to active\n"
|
|
|
+ " --global-scope The specified packagemap can be shared across multiple targets\n",
|
|
|
stdout);
|
|
|
|
|
|
EclCmdCommon::usage();
|
|
@@ -920,6 +949,7 @@ private:
|
|
|
StringAttr optTarget;
|
|
|
StringAttr optQueryId;
|
|
|
StringAttr optPMID;
|
|
|
+ bool optGlobalScope;
|
|
|
};
|
|
|
|
|
|
IEclCommand *createPackageSubCommand(const char *cmdname)
|