@Test public void testDeployApplication() throws Exception { String json = TestUtils.getStringFromPath(TestFixtures.TASK_SUMMARY_DEPLOY_PATH); String tosca = TestUtils.getStringFromPath(TestFixtures.TOSCA_DAM_PATH); getMockWebServer().enqueue(new MockResponse() .setBody(json) .setHeader("Accept", MediaType.APPLICATION_JSON) .setHeader("Content-Type", MediaType.APPLICATION_JSON) ); TaskSummary response = getProxy().deployApplication(tosca); TaskSummary fixture = ObjectMapperHelpers.JsonToObject(json, TaskSummary.class); assertEquals(fixture.getId(), response.getId()); }
public TaskSummary deployApplication(String tosca) throws IOException { Entity content = Entity.entity(tosca, "application/x-yaml"); Invocation invocation = getJerseyClient().target(getEndpoint() + "/v1/applications").request().buildPost(content); return invocation.invoke().readEntity(TaskSummary.class); }
DeployerProxy extends AbstractProxy { public TaskSummary deployApplication(String tosca) throws IOException { Entity content = Entity.entity(tosca, "application/x-yaml"); Invocation invocation = getJerseyClient().target(getEndpoint() + "/v1/applications").request().buildPost(content); return invocation.invoke().readEntity(TaskSummary.class); } }
DeployerProxy extends AbstractProxy { public TaskSummary deployApplication(String tosca) throws IOException { Entity content = Entity.entity(tosca, "application/x-yaml"); Invocation invocation = getJerseyClient().target(getEndpoint() + "/v1/applications").request().buildPost(content); return invocation.invoke().readEntity(TaskSummary.class); }  }
DeployerProxy extends AbstractProxy { public TaskSummary deployApplication(String tosca) throws IOException { Entity content = Entity.entity(tosca, "application/x-yaml"); Invocation invocation = getJerseyClient().target(getEndpoint() + "/v1/applications").request().buildPost(content); return invocation.invoke().readEntity(TaskSummary.class); }  ApplicationSummary getApplication(String brooklynId); JsonNode getApplicationsTree(); TaskSummary removeApplication(String brooklynId); TaskSummary deployApplication(String tosca); List<EntitySummary> getEntitiesFromApplication(String brooklynId); List<SensorSummary> getEntitySensors(String brooklynId, String brooklynEntityId); String getEntitySensorsValue(String brooklynId, String brooklynEntityId, String sensorId); }
DeployerProxy extends AbstractProxy { public TaskSummary deployApplication(String tosca) throws IOException { Entity content = Entity.entity(tosca, "application/x-yaml"); Invocation invocation = getJerseyClient().target(getEndpoint() + "/v1/applications").request().buildPost(content); return invocation.invoke().readEntity(TaskSummary.class); }  ApplicationSummary getApplication(String brooklynId); JsonNode getApplicationsTree(); TaskSummary removeApplication(String brooklynId); TaskSummary deployApplication(String tosca); List<EntitySummary> getEntitiesFromApplication(String brooklynId); List<SensorSummary> getEntitySensors(String brooklynId, String brooklynEntityId); String getEntitySensorsValue(String brooklynId, String brooklynEntityId, String sensorId);  }