Mariangela Hills created STRATOS-1200:
-----------------------------------------

             Summary: Wrong terminology in code
                 Key: STRATOS-1200
                 URL: https://issues.apache.org/jira/browse/STRATOS-1200
             Project: Stratos
          Issue Type: Bug
    Affects Versions: 4.1.0 Alpha
            Reporter: Mariangela Hills


According to the new changes in Stratos it was decided that other than a 
created application being deployed and undeployed all other artifacts will be 
added and removed. There are still some places in the code that does not show 
this new change.  For example in [1] and [2] undeployKubernetesHost should be 
removeKubernetesHost. In addition, the corresponding methods and messages in 
the RestClient.java file should be changed.
------------------------------------------------------------------------------------
[1]
public class RemoveKubernetesHostCommand implements 
Command<StratosCommandContext> {

    private static final Logger logger = 
LoggerFactory.getLogger(RemoveKubernetesHostCommand.class);

    public RemoveKubernetesHostCommand() {
    }

    @Override
    public String getName() {
        return "remove-kubernetes-host";
    }

    @Override
    public String getDescription() {
        return "Remove kubernetes host";
    }

    @Override
    public String getArgumentSyntax() {
        return "[cluster-id] [host-id]";
    }

    @Override
    public Options getOptions() {
        return null;
    }

    @Override
    public int execute(StratosCommandContext context, String[] args) throws 
CommandException {
        if (logger.isDebugEnabled()) {
            logger.debug("Executing command: ", getName());
        }

        if ((args == null) || (args.length <= 0)) {
            context.getStratosApplication().printUsage(getName());
            return CliConstants.COMMAND_FAILED;
        }

        String clusterId = args[0];
        String hostId = args[1];
        RestCommandLineService.getInstance().undeployKubernetesHost(clusterId, 
hostId);
        return CliConstants.COMMAND_SUCCESSFULL;
    }
}
------------------------------------------------------------------------------------
[2]
public void undeployKubernetesHost(String clusterId, String hostId) {
        
restClient.undeployEntity(ENDPOINT_UNDEPLOY_KUBERNETES_HOST.replace("{kubernetesClusterId}",
 clusterId), "kubernetes host", hostId);
    }

------------------------------------------------------------------------------------




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to