Examples of SetSourceNatAnswer


Examples of com.cloud.agent.api.routing.SetSourceNatAnswer

                break;
              } else if (pluggedVlanBr.equalsIgnoreCase(_linkLocalBridgeName)){
                /*skip over, no physical bridge device exists*/
              } else if (pluggedVlanId == null) {
                /*this should only be true in the case of link local bridge*/
                return new SetSourceNatAnswer(cmd, false, "unable to find the vlan id for bridge "+pluggedVlanBr+
                    " when attempting to set up" + pubVlan + " on router " + routerName);
              } else if (pluggedVlanId.equals(pubVlan)) {
                break;
              }
              devNum++;
            }

            String dev = "eth" + devNum;
            String result = _virtRouterResource.assignSourceNat(routerIP, pubIP.getPublicIp(), dev);

            if (result != null) {
                return new SetSourceNatAnswer(cmd, false, "KVM plugin \"vpc_snat\" failed:"+result);
            }
            return new SetSourceNatAnswer(cmd, true, "success");
        } catch (Exception e) {
            String msg = "Ip SNAT failure due to " + e.toString();
            s_logger.error(msg, e);
            return new SetSourceNatAnswer(cmd, false, msg);
        }
    }
View Full Code Here

Examples of com.cloud.agent.api.routing.SetSourceNatAnswer

            if (!result.first()) {
                String msg = "SetupGuestNetworkCommand on domain router " + routerIp + " failed. message: " + result.second();
                s_logger.error(msg);

                return new SetSourceNatAnswer(cmd, false, msg);
            }

            return new SetSourceNatAnswer(cmd, true, "success");
        } catch (Exception e) {
            String msg = "Ip SNAT failure due to " + e.toString();
            s_logger.error(msg, e);
            return new SetSourceNatAnswer(cmd, false, msg);
        }
    }
View Full Code Here

Examples of com.cloud.agent.api.routing.SetSourceNatAnswer

            String result = callHostPlugin(conn, "vmops", "routerProxy", "args", args);
            if (result == null || result.isEmpty()) {
                throw new InternalErrorException("Xen plugin \"vpc_snat\" failed.");
            }
            return new SetSourceNatAnswer(cmd, true, "success");
        } catch (Exception e) {
            String msg = "Ip SNAT failure due to " + e.toString();
            s_logger.error(msg, e);
            return new SetSourceNatAnswer(cmd, false, msg);
        }
    }
View Full Code Here

Examples of com.cloud.agent.api.routing.SetSourceNatAnswer

            if (!result.first()) {
                String msg = "SetupGuestNetworkCommand on domain router " + routerIp + " failed. message: " + result.second();
                s_logger.error(msg);

                return new SetSourceNatAnswer(cmd, false, msg);
            }

            return new SetSourceNatAnswer(cmd, true, "success");
        } catch (Exception e) {
            String msg = "Ip SNAT failure due to " + e.toString();
            s_logger.error(msg, e);
            return new SetSourceNatAnswer(cmd, false, msg);
        }
    }
View Full Code Here

Examples of com.cloud.agent.api.routing.SetSourceNatAnswer

                    break;
                } else if (pluggedVlanBr.equalsIgnoreCase(_linkLocalBridgeName)){
                    /*skip over, no physical bridge device exists*/
                } else if (pluggedVlanId == null) {
                    /*this should only be true in the case of link local bridge*/
                    return new SetSourceNatAnswer(cmd, false, "unable to find the vlan id for bridge "+pluggedVlanBr+
                            " when attempting to set up" + pubVlan + " on router " + routerName);
                } else if (pluggedVlanId.equals(pubVlan)) {
                    break;
                }
                devNum++;
            }

            String dev = "eth" + devNum;
            String result = _virtRouterResource.assignSourceNat(routerIP, pubIP.getPublicIp(), dev);

            if (result != null) {
                return new SetSourceNatAnswer(cmd, false, "KVM plugin \"vpc_snat\" failed:"+result);
            }
            return new SetSourceNatAnswer(cmd, true, "success");
        } catch (LibvirtException e) {
            String msg = "Ip SNAT failure due to " + e.toString();
            s_logger.error(msg, e);
            return new SetSourceNatAnswer(cmd, false, msg);
        }
    }
View Full Code Here

Examples of com.cloud.agent.api.routing.SetSourceNatAnswer

        return new IpAssocAnswer(cmd, results);
    }

    @Override
    public SetSourceNatAnswer setSourceNat(SetSourceNatCommand cmd) {
        return new SetSourceNatAnswer(cmd, true, "success");
    }
View Full Code Here

Examples of com.cloud.agent.api.routing.SetSourceNatAnswer

                    break;
                } else if (pluggedVlanBr.equalsIgnoreCase(_linkLocalBridgeName)){
                    /*skip over, no physical bridge device exists*/
                } else if (pluggedVlanId == null) {
                    /*this should only be true in the case of link local bridge*/
                    return new SetSourceNatAnswer(cmd, false, "unable to find the vlan id for bridge "+pluggedVlanBr+
                            " when attempting to set up" + pubVlan + " on router " + routerName);
                } else if (pluggedVlanId.equals(pubVlan)) {
                    break;
                }
                devNum++;
            }

            String dev = "eth" + devNum;
            String result = _virtRouterResource.assignSourceNat(routerIP, pubIP.getPublicIp(), dev);

            if (result != null) {
                return new SetSourceNatAnswer(cmd, false, "KVM plugin \"vpc_snat\" failed:"+result);
            }
            return new SetSourceNatAnswer(cmd, true, "success");
        } catch (LibvirtException e) {
            String msg = "Ip SNAT failure due to " + e.toString();
            s_logger.error(msg, e);
            return new SetSourceNatAnswer(cmd, false, msg);
        }
    }
View Full Code Here

Examples of com.cloud.agent.api.routing.SetSourceNatAnswer

            if (!result.first()) {
                String msg = "SetupGuestNetworkCommand on domain router " + routerIp + " failed. message: " + result.second();
                s_logger.error(msg);

                return new SetSourceNatAnswer(cmd, false, msg);
            }

            return new SetSourceNatAnswer(cmd, true, "success");
        } catch (Exception e) {
            String msg = "Ip SNAT failure due to " + e.toString();
            s_logger.error(msg, e);
            return new SetSourceNatAnswer(cmd, false, msg);
        }
    }
View Full Code Here

Examples of com.cloud.agent.api.routing.SetSourceNatAnswer

           
            String result = callHostPlugin(conn, "vmops", "routerProxy", "args", args);
            if (result == null || result.isEmpty()) {
                throw new InternalErrorException("Xen plugin \"vpc_snat\" failed.");
            }
            return new SetSourceNatAnswer(cmd, true, "success");
        } catch (Exception e) {
            String msg = "Ip SNAT failure due to " + e.toString();
            s_logger.error(msg, e);
            return new SetSourceNatAnswer(cmd, false, msg);
        }
    }
View Full Code Here

Examples of com.cloud.agent.api.routing.SetSourceNatAnswer

                break;
              } else if (pluggedVlanBr.equalsIgnoreCase(_linkLocalBridgeName)){
                /*skip over, no physical bridge device exists*/
              } else if (pluggedVlanId == null) {
                /*this should only be true in the case of link local bridge*/
                return new SetSourceNatAnswer(cmd, false, "unable to find the vlan id for bridge "+pluggedVlanBr+
                    " when attempting to set up" + pubVlan + " on router " + routerName);
              } else if (pluggedVlanId.equals(pubVlan)) {
                break;
              }
              devNum++;
            }

            String dev = "eth" + devNum;
            String result = _virtRouterResource.assignSourceNat(routerIP, pubIP.getPublicIp(), dev);

            if (result != null) {
                return new SetSourceNatAnswer(cmd, false, "KVM plugin \"vpc_snat\" failed:"+result);
            }
            return new SetSourceNatAnswer(cmd, true, "success");
        } catch (Exception e) {
            String msg = "Ip SNAT failure due to " + e.toString();
            s_logger.error(msg, e);
            return new SetSourceNatAnswer(cmd, false, msg);
        }
    }
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.