Package com.cloud.agent.api

Examples of com.cloud.agent.api.DeleteVnsNetworkCommand


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

        DeleteVnsNetworkCommand dntkc = new DeleteVnsNetworkCommand("tenantid", "networkid");
        DeleteVnsNetworkAnswer dntka = (DeleteVnsNetworkAnswer) _resource.executeRequest(dntkc);
        assertTrue(dntka.getResult());
    }
View Full Code Here


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

        doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).deleteNetwork((String)any(), (String)any());

        DeleteVnsNetworkCommand dntkc = new DeleteVnsNetworkCommand("tenantid", "networkid");
        DeleteVnsNetworkAnswer dntka = (DeleteVnsNetworkAnswer) _resource.executeRequest(dntkc);
        assertFalse(dntka.getResult());
    }
View Full Code Here

        BigSwitchVnsDeviceVO bigswitchVnsDevice = devices.get(0);
        HostVO bigswitchVnsHost = _hostDao.findById(bigswitchVnsDevice.getHostId());

        String tenantId = profile.getNetworkDomain();

        DeleteVnsNetworkCommand cmd = new DeleteVnsNetworkCommand(tenantId,
                        networkObject.getBroadcastUri().getSchemeSpecificPart());
        _agentMgr.easySend(bigswitchVnsHost.getId(), cmd);

        super.shutdown(profile, offering);
    }
View Full Code Here

        BigSwitchVnsDeviceVO bigswitchVnsDevice = devices.get(0);
        HostVO bigswitchVnsHost = _hostDao.findById(bigswitchVnsDevice.getHostId());

        String tenantId = profile.getNetworkDomain();

        DeleteVnsNetworkCommand cmd = new DeleteVnsNetworkCommand(tenantId, BroadcastDomainType.getValue(networkObject.getBroadcastUri()));
        _agentMgr.easySend(bigswitchVnsHost.getId(), cmd);

        super.shutdown(profile, offering);
    }
View Full Code Here

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

        DeleteVnsNetworkCommand dntkc = new DeleteVnsNetworkCommand("tenantid", "networkid");
        DeleteVnsNetworkAnswer dntka = (DeleteVnsNetworkAnswer)_resource.executeRequest(dntkc);
        assertTrue(dntka.getResult());
    }
View Full Code Here

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

        doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).deleteNetwork((String)any(), (String)any());

        DeleteVnsNetworkCommand dntkc = new DeleteVnsNetworkCommand("tenantid", "networkid");
        DeleteVnsNetworkAnswer dntka = (DeleteVnsNetworkAnswer)_resource.executeRequest(dntkc);
        assertFalse(dntka.getResult());
    }
View Full Code Here

        BigSwitchVnsDeviceVO bigswitchVnsDevice = devices.get(0);
        HostVO bigswitchVnsHost = _hostDao.findById(bigswitchVnsDevice.getHostId());

        String tenantId = profile.getNetworkDomain();

        DeleteVnsNetworkCommand cmd = new DeleteVnsNetworkCommand(tenantId,
                BroadcastDomainType.getValue(networkObject.getBroadcastUri()));
        _agentMgr.easySend(bigswitchVnsHost.getId(), cmd);

        super.shutdown(profile, offering);
    }
View Full Code Here

        BigSwitchVnsDeviceVO bigswitchVnsDevice = devices.get(0);
        HostVO bigswitchVnsHost = _hostDao.findById(bigswitchVnsDevice.getHostId());

        String tenantId = profile.getNetworkDomain() + "-" + profile.getAccountId();

        DeleteVnsNetworkCommand cmd = new DeleteVnsNetworkCommand(tenantId,
                        networkObject.getBroadcastUri().getSchemeSpecificPart());
        _agentMgr.easySend(bigswitchVnsHost.getId(), cmd);

        super.shutdown(profile, offering);
    }
View Full Code Here

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

        DeleteVnsNetworkCommand dntkc = new DeleteVnsNetworkCommand("tenantid", "networkid");
        DeleteVnsNetworkAnswer dntka = (DeleteVnsNetworkAnswer) _resource.executeRequest(dntkc);
        assertTrue(dntka.getResult());
    }
View Full Code Here

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

        doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).deleteNetwork((String)any(), (String)any());

        DeleteVnsNetworkCommand dntkc = new DeleteVnsNetworkCommand("tenantid", "networkid");
        DeleteVnsNetworkAnswer dntka = (DeleteVnsNetworkAnswer) _resource.executeRequest(dntkc);
        assertFalse(dntka.getResult());
    }
View Full Code Here

TOP

Related Classes of com.cloud.agent.api.DeleteVnsNetworkCommand

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.