Added getEdgeDockerInstallInstructions method to RestClient
This commit is contained in:
parent
2ff8c3f972
commit
46f8ce990b
@ -39,6 +39,7 @@ import org.thingsboard.server.common.data.Customer;
|
||||
import org.thingsboard.server.common.data.EntitySubtype;
|
||||
import org.thingsboard.server.common.data.edge.Edge;
|
||||
import org.thingsboard.server.common.data.edge.EdgeInfo;
|
||||
import org.thingsboard.server.common.data.edge.EdgeInstallInstructions;
|
||||
import org.thingsboard.server.common.data.edge.EdgeSearchQuery;
|
||||
import org.thingsboard.server.common.data.exception.ThingsboardErrorCode;
|
||||
import org.thingsboard.server.common.data.exception.ThingsboardException;
|
||||
@ -56,7 +57,6 @@ import org.thingsboard.server.dao.exception.IncorrectParameterException;
|
||||
import org.thingsboard.server.dao.model.ModelConstants;
|
||||
import org.thingsboard.server.queue.util.TbCoreComponent;
|
||||
import org.thingsboard.server.service.edge.EdgeBulkImportService;
|
||||
import org.thingsboard.server.service.edge.instructions.EdgeInstallInstructions;
|
||||
import org.thingsboard.server.service.entitiy.edge.TbEdgeService;
|
||||
import org.thingsboard.server.common.data.sync.ie.importing.csv.BulkImportRequest;
|
||||
import org.thingsboard.server.common.data.sync.ie.importing.csv.BulkImportResult;
|
||||
|
||||
@ -20,6 +20,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.thingsboard.server.common.data.edge.Edge;
|
||||
import org.thingsboard.server.common.data.edge.EdgeInstallInstructions;
|
||||
import org.thingsboard.server.common.data.id.TenantId;
|
||||
import org.thingsboard.server.queue.util.TbCoreComponent;
|
||||
import org.thingsboard.server.service.install.InstallScripts;
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
package org.thingsboard.server.service.edge.instructions;
|
||||
|
||||
import org.thingsboard.server.common.data.edge.Edge;
|
||||
import org.thingsboard.server.common.data.edge.EdgeInstallInstructions;
|
||||
import org.thingsboard.server.common.data.id.TenantId;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.thingsboard.server.service.edge.instructions;
|
||||
package org.thingsboard.server.common.data.edge;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -81,6 +81,7 @@ import org.thingsboard.server.common.data.device.DeviceSearchQuery;
|
||||
import org.thingsboard.server.common.data.edge.Edge;
|
||||
import org.thingsboard.server.common.data.edge.EdgeEvent;
|
||||
import org.thingsboard.server.common.data.edge.EdgeInfo;
|
||||
import org.thingsboard.server.common.data.edge.EdgeInstallInstructions;
|
||||
import org.thingsboard.server.common.data.edge.EdgeSearchQuery;
|
||||
import org.thingsboard.server.common.data.entityview.EntityViewSearchQuery;
|
||||
import org.thingsboard.server.common.data.id.AlarmId;
|
||||
@ -3130,6 +3131,12 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable {
|
||||
}).getBody();
|
||||
}
|
||||
|
||||
public Optional<EdgeInstallInstructions> getEdgeDockerInstallInstructions(EdgeId edgeId) {
|
||||
ResponseEntity<EdgeInstallInstructions> edgeInstallInstructionsResult =
|
||||
restTemplate.getForEntity(baseURL + "/api/edge/instructions/{edgeId}", EdgeInstallInstructions.class, edgeId.getId());
|
||||
return Optional.ofNullable(edgeInstallInstructionsResult.getBody());
|
||||
}
|
||||
|
||||
public UUID saveEntitiesVersion(VersionCreateRequest request) {
|
||||
return restTemplate.postForEntity(baseURL + "/api/entities/vc/version", request, UUID.class).getBody();
|
||||
}
|
||||
@ -3146,6 +3153,7 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public PageData<EntityVersion> listEntityVersions(EntityId externalEntityId, String branch, PageLink pageLink) {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("entityType", externalEntityId.getEntityType().name());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user