Package com.cloud.agent.api

Examples of com.cloud.agent.api.DeleteVnsPortAnswer


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

        doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).deletePort((String) any(), (String) any(), (String) any());
        DeleteVnsPortAnswer dntkpa = (DeleteVnsPortAnswer) _resource.executeRequest(new DeleteVnsPortCommand("networkId",
                "portid", "tenantid"));
        assertFalse(dntkpa.getResult());
    }
View Full Code Here


                        _bigswitchVnsApi.deletePort(cmd.getTenantUuid(), cmd.getNetworkUuid(), cmd.getPortUuid());
                } catch (BigSwitchVnsApiException ex) {
                s_logger.warn("deletePort failed after portAttachment was removed");
                throw (ex); // Rethrow the original exception
            }
                return new DeleteVnsPortAnswer(cmd, true, "network port " + cmd.getPortUuid() + " deleted");
        } catch (BigSwitchVnsApiException e) {
                if (numRetries > 0) {
                        return retry(cmd, --numRetries);
                }
                else {
                        return new DeleteVnsPortAnswer(cmd, e);
                }
        }
    }
View Full Code Here

        DeleteVnsPortCommand cmd = new DeleteVnsPortCommand(
                network.getBroadcastUri().getSchemeSpecificPart(),
                vm.getUuid(),
                tenantId);
        DeleteVnsPortAnswer answer = (DeleteVnsPortAnswer) _agentMgr
                .easySend(bigswitchVnsHost.getId(), cmd);

        if (answer == null || !answer.getResult()) {
            s_logger.error("DeletePortCommand failed");
            return false;
        }

        return true;
View Full Code Here

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

        doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).deletePort((String)any(), (String)any(), (String)any());
        DeleteVnsPortAnswer dntkpa = (DeleteVnsPortAnswer)_resource.executeRequest(new DeleteVnsPortCommand("networkId", "portid", "tenantid"));
        assertFalse(dntkpa.getResult());
    }
View Full Code Here

                _bigswitchVnsApi.deletePort(cmd.getTenantUuid(), cmd.getNetworkUuid(), cmd.getPortUuid());
            } catch (BigSwitchVnsApiException ex) {
                s_logger.warn("deletePort failed after portAttachment was removed");
                throw (ex); // Rethrow the original exception
            }
            return new DeleteVnsPortAnswer(cmd, true, "network port " + cmd.getPortUuid() + " deleted");
        } catch (BigSwitchVnsApiException e) {
            if (numRetries > 0) {
                return retry(cmd, --numRetries);
            } else {
                return new DeleteVnsPortAnswer(cmd, e);
            }
        }
    }
View Full Code Here

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

        DeleteVnsPortCommand cmd = new DeleteVnsPortCommand(BroadcastDomainType.getValue(network.getBroadcastUri()), vm.getUuid(), tenantId);
        DeleteVnsPortAnswer answer = (DeleteVnsPortAnswer)_agentMgr.easySend(bigswitchVnsHost.getId(), cmd);

        if (answer == null || !answer.getResult()) {
            s_logger.error("DeletePortCommand failed");
            return false;
        }

        return true;
View Full Code Here

        DeleteVnsPortCommand cmd = new DeleteVnsPortCommand(
                BroadcastDomainType.getValue(network.getBroadcastUri()),
                vm.getUuid(),
                tenantId);
        DeleteVnsPortAnswer answer = (DeleteVnsPortAnswer)_agentMgr
                .easySend(bigswitchVnsHost.getId(), cmd);

        if (answer == null || !answer.getResult()) {
            s_logger.error("DeletePortCommand failed");
            return false;
        }

        return true;
View Full Code Here

                        _bigswitchVnsApi.deletePort(cmd.getTenantUuid(), cmd.getNetworkUuid(), cmd.getPortUuid());
                } catch (BigSwitchVnsApiException ex) {
                s_logger.warn("deletePort failed after portAttachment was removed");
                throw (ex); // Rethrow the original exception
            }
                return new DeleteVnsPortAnswer(cmd, true, "network port " + cmd.getPortUuid() + " deleted");
        } catch (BigSwitchVnsApiException e) {
                if (numRetries > 0) {
                        return retry(cmd, --numRetries);
                }
                else {
                        return new DeleteVnsPortAnswer(cmd, e);
                }
        }
    }
View Full Code Here

        DeleteVnsPortCommand cmd = new DeleteVnsPortCommand(
                network.getBroadcastUri().getSchemeSpecificPart(),
                vm.getUuid(),
                tenantId);
        DeleteVnsPortAnswer answer = (DeleteVnsPortAnswer) _agentMgr
                .easySend(bigswitchVnsHost.getId(), cmd);

        if (answer == null || !answer.getResult()) {
            s_logger.error("DeletePortCommand failed");
            return false;
        }

        return true;
View Full Code Here

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

        doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).deletePort((String) any(), (String) any(), (String) any());
        DeleteVnsPortAnswer dntkpa = (DeleteVnsPortAnswer) _resource.executeRequest(new DeleteVnsPortCommand("networkId",
                "portid", "tenantid"));
        assertFalse(dntkpa.getResult());
    }
View Full Code Here

TOP

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

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.