Examples of NetworkData


Examples of buildcraft.api.core.NetworkData

      e.printStackTrace();
    }
  }

  private boolean isSynchronizedField(Field f) {
    NetworkData updateAnnotation = f.getAnnotation(NetworkData.class);

    return updateAnnotation != null;
  }
View Full Code Here

Examples of com.cloud.network.bigswitch.NetworkData

    @Test
    public void testRetries() throws ConfigurationException, BigSwitchVnsApiException {
        _resource.configure("BigSwitchVnsResource", _parameters);

        NetworkData networkdata = mock(NetworkData.class);
        NetworkData.Network network = mock(NetworkData.Network.class);
        when(networkdata.getNetwork()).thenReturn(network);
        when(network.getUuid()).thenReturn("cccc").thenReturn("cccc");

        CreateVnsNetworkCommand cntkc = new CreateVnsNetworkCommand((String)_parameters.get("guid"), "networkName", "tenantid", 1);
        CreateVnsNetworkAnswer cntka = (CreateVnsNetworkAnswer) _resource.executeRequest(cntkc);
        assertTrue(cntka.getResult());
View Full Code Here

Examples of com.cloud.network.bigswitch.NetworkData

    @Test
    public void testCreateNetwork() throws ConfigurationException, BigSwitchVnsApiException {
        _resource.configure("BigSwitchVnsResource", _parameters);

        NetworkData networkdata = mock(NetworkData.class);
        NetworkData.Network network = mock(NetworkData.Network.class);
        when(networkdata.getNetwork()).thenReturn(network);
        when(network.getUuid()).thenReturn("cccc").thenReturn("cccc");

        CreateVnsNetworkCommand cntkc = new CreateVnsNetworkCommand((String)_parameters.get("guid"), "networkName", "tenantid", 1);
        CreateVnsNetworkAnswer cntka = (CreateVnsNetworkAnswer) _resource.executeRequest(cntkc);
        assertTrue(cntka.getResult());
View Full Code Here

Examples of com.cloud.network.bigswitch.NetworkData

    @Test
    public void testCreateNetworkApiException() throws ConfigurationException, BigSwitchVnsApiException {
        _resource.configure("BigSwitchVnsResource", _parameters);

        NetworkData networkdata = mock(NetworkData.class);
        NetworkData.Network network = mock(NetworkData.Network.class);
        when(networkdata.getNetwork()).thenReturn(network);
        when(network.getUuid()).thenReturn("cccc").thenReturn("cccc");
        doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).createNetwork((NetworkData)any());

        CreateVnsNetworkCommand cntkc = new CreateVnsNetworkCommand((String)_parameters.get("guid"), "networkName", "tenantid", 1);
        CreateVnsNetworkAnswer cntka = (CreateVnsNetworkAnswer) _resource.executeRequest(cntkc);
View Full Code Here

Examples of com.cloud.network.bigswitch.NetworkData

    @Override
    public void setAgentControl(IAgentControl agentControl) {
    }

    private Answer executeRequest(CreateVnsNetworkCommand cmd, int numRetries) {
        NetworkData network = new NetworkData();
        network.getNetwork().setTenant_id(cmd.getTenantUuid());
        network.getNetwork().setUuid(cmd.getNetworkUuid());
        network.getNetwork().setDisplay_name(truncate("vns-cloudstack-" + cmd.getName(), 64));
        network.getNetwork().setVlan(cmd.getVlan());

        try {
            _bigswitchVnsApi.createNetwork(network);
            return new CreateVnsNetworkAnswer(cmd, true, "VNS " + network.getNetwork().getUuid() + " created");
        } catch (BigSwitchVnsApiException e) {
                if (numRetries > 0) {
                        return retry(cmd, --numRetries);
                }
                else {
View Full Code Here

Examples of com.cloud.network.bigswitch.NetworkData

    @Test
    public void testRetries() throws ConfigurationException, BigSwitchVnsApiException {
        _resource.configure("BigSwitchVnsResource", _parameters);

        NetworkData networkdata = mock(NetworkData.class);
        NetworkData.Network network = mock(NetworkData.Network.class);
        when(networkdata.getNetwork()).thenReturn(network);
        when(network.getUuid()).thenReturn("cccc").thenReturn("cccc");

        CreateVnsNetworkCommand cntkc = new CreateVnsNetworkCommand((String)_parameters.get("guid"), "networkName", "tenantid", 1);
        CreateVnsNetworkAnswer cntka = (CreateVnsNetworkAnswer)_resource.executeRequest(cntkc);
        assertTrue(cntka.getResult());
View Full Code Here

Examples of com.cloud.network.bigswitch.NetworkData

    @Test
    public void testCreateNetwork() throws ConfigurationException, BigSwitchVnsApiException {
        _resource.configure("BigSwitchVnsResource", _parameters);

        NetworkData networkdata = mock(NetworkData.class);
        NetworkData.Network network = mock(NetworkData.Network.class);
        when(networkdata.getNetwork()).thenReturn(network);
        when(network.getUuid()).thenReturn("cccc").thenReturn("cccc");

        CreateVnsNetworkCommand cntkc = new CreateVnsNetworkCommand((String)_parameters.get("guid"), "networkName", "tenantid", 1);
        CreateVnsNetworkAnswer cntka = (CreateVnsNetworkAnswer)_resource.executeRequest(cntkc);
        assertTrue(cntka.getResult());
View Full Code Here

Examples of com.cloud.network.bigswitch.NetworkData

    @Test
    public void testCreateNetworkApiException() throws ConfigurationException, BigSwitchVnsApiException {
        _resource.configure("BigSwitchVnsResource", _parameters);

        NetworkData networkdata = mock(NetworkData.class);
        NetworkData.Network network = mock(NetworkData.Network.class);
        when(networkdata.getNetwork()).thenReturn(network);
        when(network.getUuid()).thenReturn("cccc").thenReturn("cccc");
        doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).createNetwork((NetworkData)any());

        CreateVnsNetworkCommand cntkc = new CreateVnsNetworkCommand((String)_parameters.get("guid"), "networkName", "tenantid", 1);
        CreateVnsNetworkAnswer cntka = (CreateVnsNetworkAnswer)_resource.executeRequest(cntkc);
View Full Code Here

Examples of com.cloud.network.bigswitch.NetworkData

    @Override
    public void setAgentControl(IAgentControl agentControl) {
    }

    private Answer executeRequest(CreateVnsNetworkCommand cmd, int numRetries) {
        NetworkData network = new NetworkData();
        network.getNetwork().setTenantId(cmd.getTenantUuid());
        network.getNetwork().setUuid(cmd.getNetworkUuid());
        network.getNetwork().setDisplay_name(truncate("vns-cloudstack-" + cmd.getName(), 64));
        network.getNetwork().setVlan(cmd.getVlan());

        try {
            _bigswitchVnsApi.createNetwork(network);
            return new CreateVnsNetworkAnswer(cmd, true, "VNS " + network.getNetwork().getUuid() + " created");
        } catch (BigSwitchVnsApiException e) {
            if (numRetries > 0) {
                return retry(cmd, --numRetries);
            } else {
                return new CreateVnsNetworkAnswer(cmd, e);
View Full Code Here

Examples of io.fathom.cloud.protobuf.NetworkingModel.NetworkData

    @GET
    @Path("{id}")
    @Produces({ JSON })
    public WrappedNetwork getNetwork(@PathParam("id") long id) throws CloudException {
        NetworkData data = networkService.findNetwork(getAuth(), id);
        if (data == null) {
            throw new WebApplicationException(Status.NOT_FOUND);
        }

        WrappedNetwork ret = new WrappedNetwork();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.