use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.srm.rpcs.rev170711.RecoverInputBuilder in project genius by opendaylight.
the class RecoverCommand method getInput.
private RecoverInput getInput() {
if (type == null || name == null) {
return null;
}
Class<? extends EntityTypeBase> entityType = SrmCliUtils.getEntityType(type);
if (entityType == null) {
session.getConsole().println(SrmCliUtils.getTypeHelp());
return null;
}
Class<? extends EntityNameBase> entityName = SrmCliUtils.getEntityName(entityType, name);
if (entityName == null) {
session.getConsole().println(SrmCliUtils.getNameHelp(entityType));
return null;
}
RecoverInputBuilder inputBuilder = new RecoverInputBuilder();
inputBuilder.setEntityType(entityType);
inputBuilder.setEntityName(entityName);
if (id != null) {
inputBuilder.setEntityId(id);
}
return inputBuilder.build();
}
Aggregations