Skip to content
Snippets Groups Projects
Commit a4ffe21e authored by gwen-soleil's avatar gwen-soleil
Browse files

update command CreateNewContext argin description

parent 8846a921
No related branches found
No related tags found
No related merge requests found
......@@ -194,11 +194,13 @@ public final class SnapArchiver {
* @param argin All the informations usefull to create a context ,Snapshot
* pattern).
*/
@Command(name = "CreateNewContext", inTypeDesc = "All the informations usefull to create a context ,Snapshot pattern)")
@Command(name = "CreateNewContext", inTypeDesc = "argin[0] = author name, argin[1] = context name, argin[2] = id (Not used, set it to 0)\n" +
"argin[3] = creation date (yyyy-[m]m-[d]d), argin[4] = reason, argin[5] = description and, the list of" +
" attributes that are included in the context", outTypeDesc = "The new assigned context ID")
public void createNewContext(String[] argin) throws DevFailed {
logger.info("Entering CreateNewContext - {}", Arrays.toString(argin));
SnapContext snapContext = new SnapContext(argin);
try {
SnapContext snapContext = new SnapContext(argin);
int contextID = SnapManagerApi.createContext(snapContext);
logger.debug("Context with ID {} created", contextID);
} catch (SnapshotingException e) {
......
......@@ -172,16 +172,20 @@ public class SnapManager {
* pattern).
* @return The new assigned context ID
*/
@Command(name = "CreateNewContext", inTypeDesc = "All the informations usefull to create a context ,Snapshot pattern)", outTypeDesc = "The new assigned context ID")
@Command(name = "CreateNewContext", inTyp eDesc = "argin[0] = author name, argin[1] = context name, argin[2] = id (Not used, set it to 0)\n" +
"argin[3] = creation date (yyyy-[m]m-[d]d), argin[4] = reason, argin[5] = description and, the list of" +
" attributes that are included in the context", outTypeDesc = "The new assigned context ID")
public int createNewContext(String[] argin) throws DevFailed {
int argout;
int argout=0;
logger.info("Entering createNewContext with {}", Arrays.toString(argin));
SnapContext snapContext = new SnapContext(argin);
try {
SnapContext snapContext = new SnapContext(argin);
argout = SnapManagerApi.createContext(snapContext);
} catch (SnapshotingException e) {
logger.error(e.toString(), e);
throw e.toTangoException();
}catch (Throwable e){
e.printStackTrace();
}
logger.info("Context created is {}", argout);
return argout;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment