Examples of OvsCreateGreTunnelAnswer


Examples of com.cloud.agent.api.OvsCreateGreTunnelAnswer

            String result =
                    callHostPlugin(conn, "ovsgre", "ovs_create_gre", "bridge", bridge, "remoteIP", cmd.getRemoteIp(), "greKey", cmd.getKey(), "from",
                            Long.toString(cmd.getFrom()), "to", Long.toString(cmd.getTo()));
            String[] res = result.split(":");
            if (res.length != 2 || (res.length == 2 && res[1].equalsIgnoreCase("[]"))) {
                return new OvsCreateGreTunnelAnswer(cmd, false, result, _host.ip, bridge);
            } else {
                return new OvsCreateGreTunnelAnswer(cmd, true, result, _host.ip, bridge, Integer.parseInt(res[1]));
            }
        } catch (BadServerResponse e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " + cmd.getRemoteIp() + " on host " + _host.ip, e);
        } catch (XenAPIException e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " + cmd.getRemoteIp() + " on host " + _host.ip, e);
        } catch (XmlRpcException e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " + cmd.getRemoteIp() + " on host " + _host.ip, e);
        }

        return new OvsCreateGreTunnelAnswer(cmd, false, "EXCEPTION", _host.ip, bridge);
    }
View Full Code Here

Examples of com.cloud.network.ovs.OvsCreateGreTunnelAnswer

            String result = callHostPlugin(conn, "ovsgre", "ovs_create_gre", "bridge", bridge,
                    "remoteIP", cmd.getRemoteIp(), "greKey", cmd.getKey(), "from",
                    Long.toString(cmd.getFrom()), "to", Long.toString(cmd.getTo()));
            String[] res = result.split(":");
            if (res.length != 2 || (res.length == 2 && res[1].equalsIgnoreCase("[]"))) {
                return new OvsCreateGreTunnelAnswer(cmd, false, result,
                        _host.ip, bridge);
            } else {
                return new OvsCreateGreTunnelAnswer(cmd, true, result, _host.ip, bridge, Integer.parseInt(res[1]));
            }
        } catch (BadServerResponse e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " +
                    cmd.getRemoteIp() + " on host " + _host.ip , e);
        } catch (XenAPIException e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " +
                    cmd.getRemoteIp() + " on host " + _host.ip , e);
        } catch (XmlRpcException e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " +
                    cmd.getRemoteIp() + " on host " + _host.ip , e);
        }

        return new OvsCreateGreTunnelAnswer(cmd, false, "EXCEPTION", _host.ip, bridge);
    }
View Full Code Here

Examples of com.cloud.network.ovs.OvsCreateGreTunnelAnswer

            String result = callHostPlugin(conn, "ovsgre", "ovs_create_gre", "bridge", bridge,
                    "remoteIP", cmd.getRemoteIp(), "greKey", cmd.getKey(), "from",
                    Long.toString(cmd.getFrom()), "to", Long.toString(cmd.getTo()));
            String[] res = result.split(":");
            if (res.length != 2 || (res.length == 2 && res[1].equalsIgnoreCase("[]"))) {
                return new OvsCreateGreTunnelAnswer(cmd, false, result,
                        _host.ip, bridge);
            } else {
                return new OvsCreateGreTunnelAnswer(cmd, true, result, _host.ip, bridge, Integer.parseInt(res[1]));
            }
        } catch (Exception e) {
            e.printStackTrace();
            s_logger.error("An error occurred while creating a GRE tunnel to " +
            cmd.getRemoteIp() + " on host " + _host.ip + ":" + e.getMessage() +
            "(" + e.getClass() + ")");
           
        }

        return new OvsCreateGreTunnelAnswer(cmd, false, "EXCEPTION", _host.ip, bridge);
    }
View Full Code Here

Examples of com.cloud.network.ovs.OvsCreateGreTunnelAnswer

            String result = callHostPlugin(conn, "ovsgre", "ovs_create_gre", "bridge", bridge,
                    "remoteIP", cmd.getRemoteIp(), "greKey", cmd.getKey(), "from",
                    Long.toString(cmd.getFrom()), "to", Long.toString(cmd.getTo()));
            String[] res = result.split(":");
            if (res.length != 2 || (res.length == 2 && res[1].equalsIgnoreCase("[]"))) {
                return new OvsCreateGreTunnelAnswer(cmd, false, result,
                        _host.ip, bridge);
            } else {
                return new OvsCreateGreTunnelAnswer(cmd, true, result, _host.ip, bridge, Integer.parseInt(res[1]));
            }
        } catch (BadServerResponse e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " +
                    cmd.getRemoteIp() + " on host " + _host.ip , e);
        } catch (XenAPIException e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " +
                    cmd.getRemoteIp() + " on host " + _host.ip , e);
        } catch (XmlRpcException e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " +
                    cmd.getRemoteIp() + " on host " + _host.ip , e);
        }

        return new OvsCreateGreTunnelAnswer(cmd, false, "EXCEPTION", _host.ip, bridge);
    }
View Full Code Here

Examples of com.cloud.network.ovs.OvsCreateGreTunnelAnswer

            String result = callHostPlugin(conn, "ovsgre", "ovs_create_gre", "bridge", bridge,
                    "remoteIP", cmd.getRemoteIp(), "greKey", cmd.getKey(), "from",
                    Long.toString(cmd.getFrom()), "to", Long.toString(cmd.getTo()));
            String[] res = result.split(":");
            if (res.length != 2 || (res.length == 2 && res[1].equalsIgnoreCase("[]"))) {
                return new OvsCreateGreTunnelAnswer(cmd, false, result,
                        _host.ip, bridge);
            } else {
                return new OvsCreateGreTunnelAnswer(cmd, true, result, _host.ip, bridge, Integer.parseInt(res[1]));
            }
        } catch (Exception e) {
            e.printStackTrace();
            s_logger.error("An error occurred while creating a GRE tunnel to " +
            cmd.getRemoteIp() + " on host " + _host.ip + ":" + e.getMessage() +
            "(" + e.getClass() + ")");
           
        }

        return new OvsCreateGreTunnelAnswer(cmd, false, "EXCEPTION", _host.ip, bridge);
    }
View Full Code Here

Examples of com.cloud.network.ovs.OvsCreateGreTunnelAnswer

            String result = callHostPlugin(conn, "ovsgre", "ovs_create_gre", "bridge", bridge,
                    "remoteIP", cmd.getRemoteIp(), "greKey", cmd.getKey(), "from",
                    Long.toString(cmd.getFrom()), "to", Long.toString(cmd.getTo()));
            String[] res = result.split(":");
            if (res.length != 2 || (res.length == 2 && res[1].equalsIgnoreCase("[]"))) {
                return new OvsCreateGreTunnelAnswer(cmd, false, result,
                        _host.ip, bridge);
            } else {
                return new OvsCreateGreTunnelAnswer(cmd, true, result, _host.ip, bridge, Integer.parseInt(res[1]));
            }
        } catch (Exception e) {
            e.printStackTrace();
            s_logger.error("An error occurred while creating a GRE tunnel to " +
                    cmd.getRemoteIp() + " on host " + _host.ip + ":" + e.getMessage() +
                    "(" + e.getClass() + ")");

        }

        return new OvsCreateGreTunnelAnswer(cmd, false, "EXCEPTION", _host.ip, bridge);
    }
View Full Code Here

Examples of com.cloud.network.ovs.OvsCreateGreTunnelAnswer

            String result = callHostPlugin(conn, "ovsgre", "ovs_create_gre", "bridge", bridge,
                    "remoteIP", cmd.getRemoteIp(), "greKey", cmd.getKey(), "from",
                    Long.toString(cmd.getFrom()), "to", Long.toString(cmd.getTo()));
            String[] res = result.split(":");
            if (res.length != 2 || (res.length == 2 && res[1].equalsIgnoreCase("[]"))) {
                return new OvsCreateGreTunnelAnswer(cmd, false, result,
                        _host.ip, bridge);
            } else {
                return new OvsCreateGreTunnelAnswer(cmd, true, result, _host.ip, bridge, Integer.parseInt(res[1]));
            }
        } catch (BadServerResponse e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " +
                    cmd.getRemoteIp() + " on host " + _host.ip , e);
        } catch (XenAPIException e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " +
                    cmd.getRemoteIp() + " on host " + _host.ip , e);
        } catch (XmlRpcException e) {
            s_logger.error("An error occurred while creating a GRE tunnel to " +
                    cmd.getRemoteIp() + " on host " + _host.ip , e);
        }

        return new OvsCreateGreTunnelAnswer(cmd, false, "EXCEPTION", _host.ip, bridge);
    }
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.