static int doBundleRestartInstance(struct nc_state_t *nc, ncMetadata * pMeta, char *instanceId)
{
    ncInstance *instance = NULL;

    // sanity checking
    if (instanceId == NULL) {
        LOGERROR("bundle restart instance called with invalid parameters\n");
        return (EUCA_ERROR);
    }
    // find the instance
    if ((instance = find_instance(&global_instances, instanceId)) == NULL) {
        LOGERROR("[%s] instance not found\n", instanceId);
        return (EUCA_NOT_FOUND_ERROR);
    }
    // Now restart this instance regardless of bundling success or failure
    return (restart_instance(instance));
}
static int doBundleRestartInstance(struct nc_state_t *nc, ncMetadata * pMeta, char *instanceId)
{
    ncInstance *instance = NULL;

     
    if (instanceId == NULL) {
        LOGERROR("bundle restart instance called with invalid parameters\n");
        return (EUCA_ERROR);
    }
     
    if ((instance = find_instance(&global_instances, instanceId)) == NULL) {
        LOGERROR("[%s] instance not found\n", instanceId);
        return (EUCA_NOT_FOUND_ERROR);
    }
     
    return (restart_instance(instance));
}