Remove swagger and minor feature extensions and bug fixes
- Various Bug fixes and improvements - Management API extended - Swagger removed - Guava Upgraded to 19
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.api.client;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.RestConstants;
|
||||
import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRequestBodyPost;
|
||||
import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetsRest;
|
||||
|
||||
import feign.Headers;
|
||||
import feign.RequestLine;
|
||||
|
||||
/**
|
||||
* Client binding for the Distribution resource of the management API.
|
||||
*/
|
||||
public interface DistributionSetResource {
|
||||
|
||||
/**
|
||||
* Creates a list of distrbution sets.
|
||||
*
|
||||
* @param sets
|
||||
* the request body java bean containing the necessary attributes
|
||||
* for creating a distribution set.
|
||||
* @return the list of targets which have been created
|
||||
*/
|
||||
@RequestLine("POST " + RestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING)
|
||||
@Headers("Content-Type: application/json")
|
||||
DistributionSetsRest createDistributionSets(final List<DistributionSetRequestBodyPost> sets);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.api.client;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.RestConstants;
|
||||
import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetsRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.AssignedDistributionSetRequestBody;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.DistributionSetTagAssigmentResultRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.TagRequestBodyPut;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.TagRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.TagsRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetsRest;
|
||||
|
||||
import feign.Headers;
|
||||
import feign.Param;
|
||||
import feign.RequestLine;
|
||||
|
||||
/**
|
||||
* Client binding for the DistributionSetTag resource of the management API.
|
||||
*/
|
||||
public interface DistrubutionSetTagResource {
|
||||
|
||||
/**
|
||||
* Retrieves a single distributionset tag based on the given ID.
|
||||
*
|
||||
* @param dsTagId
|
||||
* the ID of the distributionset tag to retrieve
|
||||
* @return a deserialized java bean containing the attributes of the
|
||||
* returned distributionset tag
|
||||
*/
|
||||
@RequestLine("GET " + RestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + "/{dsTagId}")
|
||||
TagRest getDistributionSetTag(@Param("dsTagId") Long dsTagId);
|
||||
|
||||
/**
|
||||
* Creates a list of distributionset tags.
|
||||
*
|
||||
* @param tags
|
||||
* the tags to be created
|
||||
* @return the created tag list
|
||||
*/
|
||||
@RequestLine("POST " + RestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING)
|
||||
@Headers("Content-Type: application/json")
|
||||
TagsRest createDistributionSetTags(List<TagRequestBodyPut> tags);
|
||||
|
||||
/**
|
||||
* Update attributes of a distributionset tag.
|
||||
*
|
||||
* @param dsTagId
|
||||
* the distributionset tag id to be updated
|
||||
* @param tag
|
||||
* the request body
|
||||
* @return the updated distributionset tag
|
||||
*/
|
||||
@RequestLine("PUT " + RestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + "/{dsTagId}")
|
||||
@Headers("Content-Type: application/json")
|
||||
TagRest updateDistributionSetTag(@Param("dsTagId") Long dsTagId, TagRequestBodyPut tag);
|
||||
|
||||
/**
|
||||
* Deletes given distributionset tag on given ID.
|
||||
*
|
||||
* @param dsTagId
|
||||
* to be deleted
|
||||
*/
|
||||
@RequestLine("DELETE " + RestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + "/{dsTagId}")
|
||||
void deleteDistributionSetTag(@Param("dsTagId") final Long dsTagId);
|
||||
|
||||
/**
|
||||
* Retrieves a all assigned targets on the given distributionset tag id.
|
||||
*
|
||||
* @param dsTagId
|
||||
* the ID of the distributionset tag to retrieve
|
||||
* @return a list of targets
|
||||
*/
|
||||
@RequestLine("GET " + RestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
|
||||
DistributionSetsRest getAssignedDistributionSets(@Param("dsTagId") final Long dsTagId);
|
||||
|
||||
/**
|
||||
* Toggle the tag assignment all assigned targets will be unassigned and all
|
||||
* unassigned targets will be assigned.
|
||||
*
|
||||
* @param dsTagId
|
||||
* the ID of the distributionset tag to toggle
|
||||
* @param assignedTargetRequestBodies
|
||||
* a list of controller ids
|
||||
* @return a list of assigned and unassigned targets
|
||||
*/
|
||||
@RequestLine("POST " + RestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING + "/toggleTagAssignment")
|
||||
@Headers("Content-Type: application/json")
|
||||
DistributionSetTagAssigmentResultRest toggleTagAssignment(@Param("dsTagId") final Long dsTagId,
|
||||
final List<AssignedDistributionSetRequestBody> assignedTargetRequestBodies);
|
||||
|
||||
/**
|
||||
* Assign targets to a given distributionset tag id.
|
||||
*
|
||||
* @param dsTagId
|
||||
* the ID of the distributionset tag to add the targets
|
||||
* @param assignedTargetRequestBodies
|
||||
* a list of controller ids
|
||||
* @return a list of assigned targets
|
||||
*/
|
||||
@RequestLine("POST " + RestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
|
||||
@Headers("Content-Type: application/json")
|
||||
TargetsRest assignDistributionSets(@Param("dsTagId") final Long dsTagId,
|
||||
final List<AssignedDistributionSetRequestBody> assignedTargetRequestBodies);
|
||||
|
||||
/**
|
||||
* Unassign targets to a given distributionset tag id.
|
||||
*
|
||||
* @param dsTagId
|
||||
* the ID of the distributionset tag to add the targets
|
||||
*/
|
||||
@RequestLine("DELETE " + RestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING)
|
||||
void unassignDistributionSets(@Param("dsTagId") final Long dsTagId);
|
||||
|
||||
/**
|
||||
* Unassign one target to a given distributionset tag id.
|
||||
*
|
||||
* @param dsTagId
|
||||
* the ID of the distributionset tag to add the targets param
|
||||
* @param dsId
|
||||
* the distributionset id
|
||||
*/
|
||||
@RequestLine("DELETE " + RestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ RestConstants.DISTRIBUTIONSET_REQUEST_MAPPING + "/{dsId}")
|
||||
void unassignDistributionSet(@Param("dsTagId") final Long dsTagId, @Param("dsId") final Long dsId);
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.api.client;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetPagedList;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetRequestBody;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetsRest;
|
||||
|
||||
import feign.Headers;
|
||||
import feign.Param;
|
||||
import feign.RequestLine;
|
||||
|
||||
/**
|
||||
* Client binding for the Target resource of the management API.
|
||||
*/
|
||||
public interface TargetResource {
|
||||
|
||||
/**
|
||||
* Retrieves a single target based on the given ID.
|
||||
*
|
||||
* @param targetId
|
||||
* the ID of the target to retrieve
|
||||
* @return a deserialized java bean containing the attributes of the
|
||||
* returned target
|
||||
*/
|
||||
@RequestLine("GET /rest/v1/targets/{targetId}")
|
||||
TargetRest getTarget(@Param("targetId") final String targetId);
|
||||
|
||||
/**
|
||||
* Paged query of targets resource.
|
||||
*
|
||||
* @param pagingOffsetParam
|
||||
* of the paged query
|
||||
* @param pagingLimitParam
|
||||
* of the paged query
|
||||
* @return paged list of target entries
|
||||
*/
|
||||
@RequestLine("GET /rest/v1/targets?offset={pagingOffsetParam}&limit={pagingLimitParam}")
|
||||
TargetPagedList getTargets(@Param("pagingOffsetParam") int pagingOffsetParam,
|
||||
@Param("pagingLimitParam") int pagingLimitParam);
|
||||
|
||||
/**
|
||||
* Paged query of targets resource with default offset and limit.
|
||||
*
|
||||
* @return paged list of target entries
|
||||
*/
|
||||
@RequestLine("GET /rest/v1/targets")
|
||||
TargetPagedList getTargets();
|
||||
|
||||
/**
|
||||
* Deletes given target based on given ID.
|
||||
*
|
||||
* @param targetId
|
||||
* to be deleted
|
||||
*/
|
||||
@RequestLine("DELETE /rest/v1/targets/{targetId}")
|
||||
void deleteTarget(@Param("targetId") final String targetId);
|
||||
|
||||
/**
|
||||
* Creates a list of targets.
|
||||
*
|
||||
* @param targets
|
||||
* the request body java bean containing the necessary attributes
|
||||
* for creating a target.
|
||||
* @return the list of targets which have been created
|
||||
*/
|
||||
@RequestLine("POST /rest/v1/targets/")
|
||||
@Headers("Content-Type: application/json")
|
||||
TargetsRest createTargets(List<TargetRequestBody> targets);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.api.client;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.hawkbit.rest.resource.RestConstants;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.AssignedTargetRequestBody;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.TagRequestBodyPut;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.TagRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.TagsRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.tag.TargetTagAssigmentResultRest;
|
||||
import org.eclipse.hawkbit.rest.resource.model.target.TargetsRest;
|
||||
|
||||
import feign.Headers;
|
||||
import feign.Param;
|
||||
import feign.RequestLine;
|
||||
|
||||
/**
|
||||
* Client binding for the Target resource of the management API.
|
||||
*/
|
||||
public interface TargetTagResource {
|
||||
|
||||
/**
|
||||
* Retrieves a single target tag based on the given ID.
|
||||
*
|
||||
* @param targetTagId
|
||||
* the ID of the target tag to retrieve
|
||||
* @return a deserialized java bean containing the attributes of the
|
||||
* returned target tag
|
||||
*/
|
||||
@RequestLine("GET " + RestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/{targetTagId}")
|
||||
TagRest getTargetTag(@Param("targetTagId") Long targetTagId);
|
||||
|
||||
/**
|
||||
* Creates a list of target tags.
|
||||
*
|
||||
* @param tags
|
||||
* the tags to be created
|
||||
* @return the created tag list
|
||||
*/
|
||||
@RequestLine("POST " + RestConstants.TARGET_TAG_V1_REQUEST_MAPPING)
|
||||
@Headers("Content-Type: application/json")
|
||||
TagsRest createTargetTag(List<TagRequestBodyPut> tags);
|
||||
|
||||
/**
|
||||
* Update attributes of a target tag.
|
||||
*
|
||||
* @param targetTagId
|
||||
* the target tag id to be updated
|
||||
* @param tag
|
||||
* the request body
|
||||
* @return the updated target tag
|
||||
*/
|
||||
@RequestLine("PUT " + RestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/{targetTagId}")
|
||||
@Headers("Content-Type: application/json")
|
||||
TagRest updateTagretTag(@Param("targetTagId") Long targetTagId, TagRequestBodyPut tag);
|
||||
|
||||
/**
|
||||
* Deletes given target tag on given ID.
|
||||
*
|
||||
* @param targetTagId
|
||||
* to be deleted
|
||||
*/
|
||||
@RequestLine("DELETE " + RestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/{targetTagId}")
|
||||
void deleteTargetTag(@Param("targetTagId") final Long targetTagId);
|
||||
|
||||
/**
|
||||
* Retrieves a all assigned targets on the given target tag id.
|
||||
*
|
||||
* @param targetTagId
|
||||
* the ID of the target tag to retrieve
|
||||
* @return a list of targets
|
||||
*/
|
||||
@RequestLine("GET " + RestConstants.TARGET_TAG_V1_REQUEST_MAPPING
|
||||
+ RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
|
||||
TargetsRest getAssignedTargets(@Param("targetTagId") final Long targetTagId);
|
||||
|
||||
/**
|
||||
* Toggle the tag assignment all assigned targets will be unassigned and all
|
||||
* unassigned targets will be assigned.
|
||||
*
|
||||
* @param targetTagId
|
||||
* the ID of the target tag to toggle
|
||||
* @param assignedTargetRequestBodies
|
||||
* a list of controller ids
|
||||
* @return a list of assigned and unassigned targets
|
||||
*/
|
||||
@RequestLine("POST " + RestConstants.TARGET_TAG_V1_REQUEST_MAPPING
|
||||
+ RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING + "/toggleTagAssignment")
|
||||
@Headers("Content-Type: application/json")
|
||||
TargetTagAssigmentResultRest toggleTagAssignment(@Param("targetTagId") final Long targetTagId,
|
||||
final List<AssignedTargetRequestBody> assignedTargetRequestBodies);
|
||||
|
||||
/**
|
||||
* Assign targets to a given target tag id.
|
||||
*
|
||||
* @param targetTagId
|
||||
* the ID of the target tag to add the targets
|
||||
* @param assignedTargetRequestBodies
|
||||
* a list of controller ids
|
||||
* @return a list of assigned targets
|
||||
*/
|
||||
@RequestLine("POST " + RestConstants.TARGET_TAG_V1_REQUEST_MAPPING
|
||||
+ RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
|
||||
@Headers("Content-Type: application/json")
|
||||
TargetsRest assignTargets(@Param("targetTagId") final Long targetTagId,
|
||||
final List<AssignedTargetRequestBody> assignedTargetRequestBodies);
|
||||
|
||||
/**
|
||||
* Unassign targets to a given target tag id.
|
||||
*
|
||||
* @param targetTagId
|
||||
* the ID of the target tag to add the targets
|
||||
*/
|
||||
@RequestLine("DELETE " + RestConstants.TARGET_TAG_V1_REQUEST_MAPPING
|
||||
+ RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING)
|
||||
void unassignTargets(@Param("targetTagId") final Long targetTagId);
|
||||
|
||||
/**
|
||||
* Unassign one target to a given target tag id.
|
||||
*
|
||||
* @param targetTagId
|
||||
* the ID of the target tag to add the targets param
|
||||
* @param controllerId
|
||||
* the controller id
|
||||
*/
|
||||
@RequestLine("DELETE " + RestConstants.TARGET_TAG_V1_REQUEST_MAPPING
|
||||
+ RestConstants.TARGET_TAG_TAGERTS_REQUEST_MAPPING + "/{controllerId}")
|
||||
void unassignTarget(@Param("targetTagId") final Long targetTagId, @Param("controllerId") final String controllerId);
|
||||
}
|
||||
Reference in New Issue
Block a user