test_class.file: vsm/src/test/java/com/abiquo/vsm/resource/SubscriptionResourceTest.java
test_class.identifier: SubscriptionResourceTest
test_class.superclass: extends ResourceTestBase
test_case.body: @Test
      public void test_subscribeInvalidPhysicalMachine()
      {
          monitor("10.60.1.78", Type.HYPERV_301);
  
          PhysicalMachineDto unexisting = new PhysicalMachineDto();
          unexisting.setId(23);
          unexisting.setAddress("10.60.1.100");
          unexisting.setType(Type.HYPERV_301.name());
  
          try
          {
              subscribe(unexisting, UUID.randomUUID().toString());
              fail("Physical machine " + unexisting.getAddress() + " should not exist");
          }
          catch (VSMException ex)
          {
              assertEquals(ex.getResponse().getStatus(), Status.INTERNAL_SERVER_ERROR.getStatusCode());
          }
      }
test_case.class_method_signature: SubscriptionResourceTest.test_subscribeInvalidPhysicalMachine()
test_case.full_signature: @Test public void test_subscribeInvalidPhysicalMachine()
test_case.identifier: test_subscribeInvalidPhysicalMachine
test_case.invocations: monitor setId setAddress setType name subscribe toString randomUUID fail getAddress assertEquals getStatus getResponse getStatusCode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_subscribeInvalidPhysicalMachine()
focal_class.declarator: SUBSCRIPTIONS_PATH = "subscriptions"
focal_class.modifier: public static final
focal_class.original_string: public static final String SUBSCRIPTIONS_PATH = "subscriptions";
focal_class.type: String
focal_class.var_name: SUBSCRIPTIONS_PATH
focal_class.declarator: SUBSCRIPTION_PARAM = "subs"
focal_class.modifier: public static final
focal_class.original_string: public static final String SUBSCRIPTION_PARAM = "subs";
focal_class.type: String
focal_class.var_name: SUBSCRIPTION_PARAM
focal_class.declarator: SUBSCRIPTION_PATH = "{" + SUBSCRIPTION_PARAM + "}"
focal_class.modifier: public static final
focal_class.original_string: public static final String SUBSCRIPTION_PATH = "{" + SUBSCRIPTION_PARAM + "}";
focal_class.type: String
focal_class.var_name: SUBSCRIPTION_PATH
focal_class.declarator: VIRTUAL_MACHINE_NAME_QUERY_PARAM = "virtualmachine"
focal_class.modifier: private static final
focal_class.original_string: private static final String VIRTUAL_MACHINE_NAME_QUERY_PARAM = "virtualmachine";
focal_class.type: String
focal_class.var_name: VIRTUAL_MACHINE_NAME_QUERY_PARAM
focal_class.declarator: vsmService
focal_class.modifier: protected
focal_class.original_string: protected VSMService vsmService;
focal_class.type: VSMService
focal_class.var_name: vsmService
focal_class.declarator: dao
focal_class.modifier: private
focal_class.original_string: private RedisDao dao;
focal_class.type: RedisDao
focal_class.var_name: dao
focal_class.file: vsm/src/main/java/com/abiquo/vsm/resource/SubscriptionResource.java
focal_class.identifier: SubscriptionResource
focal_class.class_method_signature: SubscriptionResource.SubscriptionResource()
focal_class.full_signature: public  SubscriptionResource()
focal_class.identifier: SubscriptionResource
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  SubscriptionResource()
focal_class.class_method_signature: SubscriptionResource.getSubscriptions(
          @QueryParam(VIRTUAL_MACHINE_NAME_QUERY_PARAM) String virtualMachineName)
focal_class.full_signature: @GET public VirtualMachinesDto getSubscriptions(
          @QueryParam(VIRTUAL_MACHINE_NAME_QUERY_PARAM) String virtualMachineName)
focal_class.identifier: getSubscriptions
focal_class.modifiers: @GET public
focal_class.parameters: (
          @QueryParam(VIRTUAL_MACHINE_NAME_QUERY_PARAM) String virtualMachineName)
focal_class.return: VirtualMachinesDto
focal_class.signature: VirtualMachinesDto getSubscriptions(
          @QueryParam(VIRTUAL_MACHINE_NAME_QUERY_PARAM) String virtualMachineName)
focal_class.class_method_signature: SubscriptionResource.subscribe(VirtualMachineDto virtualMachine)
focal_class.full_signature: @POST public VirtualMachineDto subscribe(VirtualMachineDto virtualMachine)
focal_class.identifier: subscribe
focal_class.modifiers: @POST public
focal_class.parameters: (VirtualMachineDto virtualMachine)
focal_class.return: VirtualMachineDto
focal_class.signature: VirtualMachineDto subscribe(VirtualMachineDto virtualMachine)
focal_class.class_method_signature: SubscriptionResource.unsubscribe(@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_class.full_signature: @DELETE @Path(SUBSCRIPTION_PATH) public void unsubscribe(@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_class.identifier: unsubscribe
focal_class.modifiers: @DELETE @Path(SUBSCRIPTION_PATH) public
focal_class.parameters: (@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_class.return: void
focal_class.signature: void unsubscribe(@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_class.superclass: extends AbstractResource
focal_method.body: @POST
      public VirtualMachineDto subscribe(VirtualMachineDto virtualMachine)
      {
          checkSystem();
  
          VirtualMachine vm =
              vsmService.subscribe(virtualMachine.getPhysicalMachine().getAddress(), virtualMachine
                  .getPhysicalMachine().getType(), virtualMachine.getName());
  
          return toDto(vm);
      }
focal_method.class_method_signature: SubscriptionResource.subscribe(VirtualMachineDto virtualMachine)
focal_method.full_signature: @POST public VirtualMachineDto subscribe(VirtualMachineDto virtualMachine)
focal_method.identifier: subscribe
focal_method.invocations: checkSystem subscribe getAddress getPhysicalMachine getType getPhysicalMachine getName toDto
focal_method.modifiers: @POST public
focal_method.parameters: (VirtualMachineDto virtualMachine)
focal_method.return: VirtualMachineDto
focal_method.signature: VirtualMachineDto subscribe(VirtualMachineDto virtualMachine)