Package com.openshift.internal.client.httpclient.request

Examples of com.openshift.internal.client.httpclient.request.StringParameter


      super("UPDATE");
    }
   
    protected KeyResourceDTO execute(SSHKeyType type, String publicKey) throws OpenShiftException {
      return execute(
          new StringParameter(IOpenShiftJsonConstants.PROPERTY_CONTENT, publicKey),
          new StringParameter(IOpenShiftJsonConstants.PROPERTY_TYPE, type.getTypeId()));
    }
View Full Code Here


    private AddDomainRequest() throws OpenShiftException {
      super("ADD_DOMAIN");
    }

    private DomainResourceDTO execute(String namespace) throws OpenShiftException {
      return execute(new StringParameter(IOpenShiftJsonConstants.PROPERTY_ID, namespace));
    }
View Full Code Here

    // pre-conditions
    String href = "/broker/rest/:company/adietisheim/:language/openshift-java-client";
    Link link = new TestLink("", href, HttpMethod.GET);
    // operation
    String url = link.getHref(null, null, Arrays.<Parameter> asList(
        new StringParameter("company", "redhat"),
        new StringParameter("language", "java")),
        null);
    // verifications
    assertThat(url).isEqualTo("/broker/rest/redhat/adietisheim/java/openshift-java-client");
  }
View Full Code Here

    // pre-conditions
    String href = "https://openshift.redhat.com/broker/rest/:company/adietisheim/:oss/openshift-java-client";
    Link link = new TestLink("", href, HttpMethod.GET);
    // operation
    String url = link.getHref(null, null, Arrays.<Parameter> asList(
        new StringParameter("company", "redhat"),
        new StringParameter("cloud", "redhat")),
        null);
    // verifications
    assertThat(url).isEqualTo(
        "https://openshift.redhat.com/broker/rest/redhat/adietisheim/:oss/openshift-java-client");
  }
View Full Code Here

    // pre-conditions
    String href = "https://openshift.redhat.com/broker/rest/:cloud_company/adietisheim/:cloud_company/openshift-java-client";
    Link link = new TestLink("", href, HttpMethod.GET);
    // operation
    String url = link.getHref(null, null,
        Arrays.<Parameter> asList(new StringParameter("cloud_company", "redhat")),
        null);
    // verifications
    assertThat(url).isEqualTo(
        "https://openshift.redhat.com/broker/rest/redhat/adietisheim/redhat/openshift-java-client");
  }
View Full Code Here

    IHttpClient httpClient = new PayLoadReturningHttpClientFake(IHttpClient.MEDIATYPE_APPLICATION_JSON, "1.0");
    // operation
    String response = httpClient.post(serverFake.getUrl(),
        new FormUrlEncodedMediaType(),
        IHttpClient.NO_TIMEOUT,
        new StringParameter("adietish", "redhat"),
        new StringParameter("xcoulon", "redhat"));

    // verification
    String[] entries = response.split(String.valueOf(IHttpClient.AMPERSAND));
    assertEquals(2, entries.length);
    String[] keyValuePair = entries[0].split(String.valueOf(IHttpClient.EQUALS));
View Full Code Here

        CartridgeTestUtils.foreman063(),
        CartridgeTestUtils.mysql51());

        // verifications
        mockDirector.verifyCreateApplication("foobarz", IHttpClient.NO_TIMEOUT,
        new StringParameter(IOpenShiftJsonConstants.PROPERTY_NAME, "downloadablecart"),
        new Parameter(IOpenShiftJsonConstants.PROPERTY_CARTRIDGES,
            new ParameterValueArray()
                .add(new ParameterValueMap().add(IOpenShiftJsonConstants.PROPERTY_URL, CartridgeTestUtils.GO_URL))
                .add(new ParameterValueMap().add(IOpenShiftJsonConstants.PROPERTY_URL, CartridgeTestUtils.FOREMAN_URL))
                .add(new ParameterValueMap().add(IOpenShiftJsonConstants.PROPERTY_NAME, CartridgeTestUtils.mysql51().getName()))));
View Full Code Here

   
    // verification
    mockDirector.verifyCreateApplication(
        "foobarz",
        IHttpClient.NO_TIMEOUT,
        new StringParameter(IOpenShiftJsonConstants.PROPERTY_NAME, "foo"),
        new Parameter(IOpenShiftJsonConstants.PROPERTY_CARTRIDGES,
            new ParameterValueArray()
                .add(new ParameterValueMap().add(
                    IOpenShiftJsonConstants.PROPERTY_NAME, CartridgeTestUtils.JBOSSAS_7_NAME))));
  }
View Full Code Here

    // operation
    domain.createApplication("foo", CartridgeTestUtils.as7(), ApplicationScale.SCALE);
   
    // verification
    mockDirector.verifyCreateApplication("foobarz", IHttpClient.NO_TIMEOUT, 
        new StringParameter(IOpenShiftJsonConstants.PROPERTY_NAME, "foo"),
        new Parameter(IOpenShiftJsonConstants.PROPERTY_CARTRIDGES,
            new ParameterValueArray()
                .add(new ParameterValueMap().add(IOpenShiftJsonConstants.PROPERTY_NAME, JBOSSAS_7_NAME))),
        new StringParameter(IOpenShiftJsonConstants.PROPERTY_SCALE, ApplicationScale.SCALE.getValue()));
  }
View Full Code Here

    // operation
    domain.createApplication("foo", CartridgeTestUtils.as7(), ApplicationScale.SCALE, GearProfileTestUtils.getFirstAvailableGearProfile(domain));
   
    // verification
    mockDirector.verifyCreateApplication("foobarz", IHttpClient.NO_TIMEOUT, 
        new StringParameter(IOpenShiftJsonConstants.PROPERTY_NAME, "foo"),
        new Parameter(IOpenShiftJsonConstants.PROPERTY_CARTRIDGES,
            new ParameterValueArray()
                .add(new ParameterValueMap().add(IOpenShiftJsonConstants.PROPERTY_NAME, JBOSSAS_7_NAME))),
        new StringParameter(IOpenShiftJsonConstants.PROPERTY_SCALE, ApplicationScale.SCALE.getValue()),
        new StringParameter(IOpenShiftJsonConstants.PROPERTY_GEAR_PROFILE, GearProfileTestUtils.getFirstAvailableGearProfile(domain).getName())
    );
  }
View Full Code Here

TOP

Related Classes of com.openshift.internal.client.httpclient.request.StringParameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.