aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/tools/presentation/specification.yaml38
1 files changed, 19 insertions, 19 deletions
diff --git a/resources/tools/presentation/specification.yaml b/resources/tools/presentation/specification.yaml
index 11b55b57d4..138e6cee06 100644
--- a/resources/tools/presentation/specification.yaml
+++ b/resources/tools/presentation/specification.yaml
@@ -281,11 +281,14 @@
plot-vpp-nfv-2n-skx-ndrpdr:
# TODO: Add:
csit-vpp-perf-report-iterative-2009-2n-skx:
+ - 38 # rls2009 nf-density iter env 5
- 41 # rls2009 nf-density iter env 5
- 45 # rls2009 nf-density iter env 5
- 47 # rls2009 nf-density iter env 5
- 49 # rls2009 nf-density iter env 5
+ - 63 # rls2009 nf-density iter env 5
- 65 # rls2009 nf-density iter env 5
+ - 66 # rls2009 nf-density iter env 5
plot-vpp-nfv-2n-skx-mrr:
csit-vpp-perf-report-iterative-2009-2n-skx:
@@ -302,6 +305,7 @@
- 32 # rls2009 reconf env 5
- 61 # rls2009 reconf env 5
- 62 # rls2009 reconf env 5
+ - 68 # rls2009 reconf env 5
plot-dpdk-throughput-latency-2n-skx:
csit-dpdk-perf-report-iterative-2009-2n-skx:
@@ -570,23 +574,15 @@
- 1 # RC2 env5 2n-clx-ip4-00
vpp-perf-results-3n-tsh:
- # TODO: Add:
- csit-vpp-perf-report-coverage-2009-3n-tsh:
- - 1 # 3n-tsh-ip4-00
+ csit-vpp-perf-report-iterative-2009-3n-tsh:
+ - 14 # rls2009 NDRPDR iter env 5
+# csit-vpp-perf-report-coverage-2009-3n-tsh:
+# - 1 # RC2 3n-tsh-ip4-00
vpp-perf-results-3n-dnv:
- # TODO: Replace:
- # csit-vpp-perf-report-coverage-2009-3n-dnv:
- csit-vpp-perf-report-coverage-2005-3n-dnv:
- - 1 # perf-full-3n-dnv-crypto_I
- - 24 # perf-full-3n-dnv-crypto_II
- - 5 # perf-full-3n-dnv-ip4_I
- - 13 # perf-full-3n-dnv-ip4_II
- - 17 # perf-full-3n-dnv-ip6_I
- - 18 # perf-full-3n-dnv-ip6_II
- - 21 # perf-full-3n-dnv-l2_I
- - 22 # perf-full-3n-dnv-l2_II
- - 23 # perf-full-3n-dnv-ip4-tunnels_I
+ # TODO: Add:
+ csit-vpp-perf-report-coverage-2009-3n-dnv:
+ - 2 # rls2009 NDRPDR cov 3n-dnv-crypto-01
vpp-perf-results-2n-dnv:
csit-vpp-perf-report-coverage-2009-2n-dnv:
@@ -2339,7 +2335,9 @@
- 45 # rls2009 nf-density iter env 5
- 47 # rls2009 nf-density iter env 5
- 49 # rls2009 nf-density iter env 5
+ - 63 # rls2009 nf-density iter env 5
- 65 # rls2009 nf-density iter env 5
+ - 66 # rls2009 nf-density iter env 5
- 50 # rls2009 MRR nf-density iter env 5
- 27 # rls2009 reconf env 5
- 28 # rls2009 reconf env 5
@@ -2349,6 +2347,7 @@
- 32 # rls2009 reconf env 5
- 61 # rls2009 reconf env 5
- 62 # rls2009 reconf env 5
+ - 68 # rls2009 reconf env 5
- 33 # rls2009 soak env 5
- 34 # rls2009 soak env 5
# TODO: Add:
@@ -2457,8 +2456,8 @@
- 13 # rls2005 MRR iter env 5
- 14 # rls2009 NDRPDR iter env 5
- 15 # rls2006 MRR iter env 5
- csit-vpp-perf-report-coverage-2009-3n-tsh:
- - 1 # RC2 3n-tsh-ip4-00
+# csit-vpp-perf-report-coverage-2009-3n-tsh:
+# - 1 # RC2 3n-tsh-ip4-00
# csit-vpp-perf-verify-2001-3n-dnv:
# - 5 # NDRPDR sel
@@ -2483,8 +2482,9 @@
- 12 # rls2009 NDRPDR iter env 5
- 14 # rls2009 NDRPDR iter env 5
- 15 # rls2009 NDRPDR iter env 5
-# # TODO: Add:
-# # csit-vpp-perf-report-coverage-2009-3n-dnv:
+ # TODO: Add:
+ csit-vpp-perf-report-coverage-2009-3n-dnv:
+ - 2 # rls2009 NDRPDR cov 3n-dnv-crypto-01
# csit-vpp-perf-verify-2001-2n-dnv:
# - 4 # NDRPDR sel
0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Keywords used to connect to Honeycomb through Netconf, send messages
 and receive replies."""

import socket
from time import time

import paramiko
from robot.api import logger

from resources.libraries.python.honeycomb.HoneycombUtil import HoneycombError


class Netconf(object):
    """Implements methods for creating and managing Netconf sessions."""

    def __init__(self, delimiter=']]>]]>'):
        """Initializer.

        Note: Passing the channel object as a robotframework argument closes
        the channel. Class variables are used instead,
        to persist the connection channel throughout test cases.
        """

        self.client = None
        self.channel = None
        self.delimiter = delimiter

    def create_session(self, node, hello, time_out=10):
        """Create an SSH session, connect to Honeycomb on the specified node,
        open a communication channel to the Netconf subsystem and exchange hello
        messages.

        :param node: Honeycomb node.
        :param hello: Hello message and capability list to be sent to Honeycomb.
        :param time_out: Timeout value for the connection in seconds.
        :type node: dict
        :type hello: str
        :type time_out: int
        """

        start = time()
        client = paramiko.SSHClient()
        client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

        client.connect(node['host'],
                       username=node['honeycomb']['user'],
                       password=node['honeycomb']['passwd'],
                       pkey=None,
                       port=node['honeycomb']['netconf_port'],
                       timeout=time_out)

        logger.trace('Connect took {0} seconds'.format(time() - start))
        logger.debug('New ssh: {0}'.format(client))
        logger.debug('Connect peer: {0}'.
                     format(client.get_transport().getpeername()))
        logger.debug(client)

        channel = client.get_transport().open_session()
        channel.settimeout(time_out)
        channel.set_combine_stderr(True)
        channel.get_pty()
        channel.invoke_subsystem("netconf")
        logger.debug(channel)

        self.client = client
        self.channel = channel

        # read OpenDaylight's hello message and capability list
        self.get_response(
            size=131072,
            err="Timeout on getting hello message."
        )

        self.channel.send(hello)
        if not self.channel.active:
            raise HoneycombError("Channel closed on capabilities exchange.")

    def get_response(self, size=4096, err="Unspecified Error."):
        """Iteratively read data from the receive buffer and catenate together
        until message ends with the message delimiter, or
        until timeout is reached.

        :param size: Maximum number of bytes to read in one iteration.
        :param err: Error message to provide when timeout is reached.
        :type size: int
        :type err: str
        :returns: Content of response.
        :rtype: str
        :raises HoneycombError: If the read process times out.
        """

        reply = ''

        try:
            while not reply.endswith(self.delimiter) or \
                    self.channel.recv_ready():
                try:
                    chunk = self.channel.recv(size)
                    if not chunk:
                        break
                    reply += chunk
                    if self.channel.exit_status_ready():
                        logger.debug('Channel exit status ready.')
                        break
                except socket.timeout:
                    raise HoneycombError("Socket timeout.",
                                         enable_logging=False)

        except RuntimeError:
            raise HoneycombError(err + " Content of buffer: {0}".format(reply),
                                 enable_logging=False)

        logger.trace(reply)
        return reply.replace(self.delimiter, "")

    def get_all_responses(self, size=4096, time_out=3):
        """Read responses from the receive buffer and catenate together
        until a read operation times out.

        :param size: Maximum number of bytes to read in one iteration.
        :param time_out: Timeout value for getting the complete response.
        :type size: int
        :type time_out: int
        :returns: Content of response.
        :rtype: str
        """

        response = ""
        err = "Expected timeout occurred."

        while True:
            try:
                response += self.get_response(size, err)
            except HoneycombError:
                break

        return response

    def send(self, message, **params):
        """Sends provided message through the channel.

        :param message: Message to be sent to Honeycomb.
        :param params: Format the message string with these parameters.
        :type message: str
        :type params: dict
        """

        message = message.format(**params)

        if not message.endswith(self.delimiter):
            message += self.delimiter

        logger.debug(message)

        self.channel.send(message)