aboutsummaryrefslogtreecommitdiffstats
path: root/upstream
AgeCommit message (Collapse)AuthorFilesLines
2016-06-13Updated armbandStefan K. Berg1-0/+0
Project: fuel eb94725aae686ac519070f00ee9628ae0725d00f Modification of deployment config for Fuel 9 and ELX lab Change-Id: I380087889cda079a56c8cea3acc13145dcd49046 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-06-13Updated armbandStefan Berg1-0/+0
Project: fuel c6da8551bcdc1762a3135fcaabee7e5f98e6fcb9 Revert "Temporary fix for PXE booting from the wrong NIC" This reverts commit 5926bcddca0eca28a33ae43aadf90b9263ae6b84. Change-Id: Ibea4ca5d38ce2e10ab6d5bb1d7ccdf666ee149d5 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-06-13Updated armbandDaniel Smith1-0/+0
Project: fuel b598e13d935c29e5bbc3d2be3a2731b2b63d3ec5 Temporary fix for PXE booting from the wrong NIC Change-Id: I1f6d38da24d5a4e66061b9bdfe576fbbda7fb624 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-06-12Rework: Move fuel-astute patch to post-install.Alexandru Avadanii1-0/+0
IMPORTANT: Drop `fuel-astute` submodule, and patch it instead during the Fuel Master node bootstrapping process, using an OPNFV post.d script. Luckily, this fits well with the recently added script that prepares FM for cross-building. One step closer to un-forking. Change-Id: Ia612e0ad4077b16baf54f1b9ebf9d207daca0be4 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-06-08Updated armbandStefan Berg1-0/+0
Project: fuel 14f07bc7ecb9f166d5244abcc5789d8fd584c0dd ISO: Use --joliet-long names. Armband adds similar files, which tend to have long names and only differ in suffixes (e.g. DEBs for amd64 vs arm64). This works around ISO build error(s) like: "genisoimage: Error: ./ubuntu/pool/m
#!/usr/bin/env python
# Copyright 2017 Cisco Systems, Inc.  All rights reserved.
#
#    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.
#

import requests
import time

from socketIO_client import SocketIO


class TimeOutException(Exception):
    pass


class NfvbenchException(Exception):
    pass


class NfvbenchClient(object):
    """Python client class to control a nfvbench server

    The nfvbench server must run in background using the --server option.
    Since HTML pages are not required, the path to pass to --server can be
    any directory on the host.
    """
    def __init__(self, nfvbench_url, use_socketio):
        """Client class to send requests to the nfvbench server

        Args:
            nfvbench_url: the URL of the nfvbench server (e.g. 'http://127.0.0.1:7555')
        """
        self.url = nfvbench_url
        self.use_socketio = use_socketio

    def socketio_send(self, send_event, receive_event, config, timeout):
        class Exec(object):
            socketIO = None
            socketio_result = None

        def close_socketio(result):
            Exec.socketio_result = result
            Exec.socketIO.disconnect()

        def on_response(*args):
            close_socketio(args[0])

        def on_error(*args):
            raise NfvbenchException(args[0])

        Exec.socketIO = SocketIO(self.url)
        Exec.socketIO.on(receive_event, on_response)
        Exec.socketIO.on('error', on_error)
        Exec.socketIO.emit(send_event, config)
        Exec.socketIO.wait(seconds=timeout)

        if timeout and not Exec.socketio_result:
            raise TimeOutException()
        return Exec.socketio_result

    def http_get(self, command, config):
        url = self.url + '/' + command
        res = requests.get(url, json=config)
        if res.ok:
            return res.json()
        res.raise_for_status()

    def http_post(self, command, config):
        url = self.url + '/' + command
        res = requests.post(url, json=config)
        if res.ok:
            return res.json()
        res.raise_for_status()

    def echo_config(self, config, timeout=100):
        """Send an echo event to the nfvbench server with some dummy config and expect the
        config to be sent back right away.

        Args:
            config: some dummy configuration - must be a valid dict
            timeout: how long to wait in seconds or 0 to return immediately,
                     defaults to 100 seconds

        Returns:
            The config as passed as a dict or None if timeout passed is 0

        Raises:
            NfvbenchException: the execution of the passed configuration failed,
                               the body of the exception
                               containes the description of the failure.
            TimeOutException: the request timed out (and might still being executed
                              by the server)
        """
        if self.use_socketio:
            return self.socketio_send('echo', 'echo', config, timeout)
        return self.http_get('echo', config)

    def run_config(self, config, timeout=300, poll_interval=5):
        """Request an nfvbench configuration to be executed by the nfvbench server.

        This function will block the caller until the request completes or the request times out.
        It can return immediately if timeout is set to 0.
        Note that running a configuration may take a while depending on the amount of work
        requested - so set the timeout value to an appropriate value.

        Args:
            config: the nfvbench configuration to execute - must be a valid dict with
                    valid nfvbench attributes
            timeout: how long to wait in seconds or 0 to return immediately,
                     defaults to 300 seconds
            poll_interval: seconds between polling (http only) - defaults to every 5 seconds

        Returns:
            The result of the nfvbench execution
            or None if timeout passed is 0
            The function will return as soon as the request is completed or when the
            timeout occurs (whichever is first).

        Raises:
            NfvbenchException: the execution of the passed configuration failed, the body of
                               the exception contains the description of the failure.
            TimeOutException: the request timed out but will still be executed by the server.
        """
        if self.use_socketio:
            return self.socketio_send('start_run', 'run_end', config, timeout)
        res = self.http_post('start_run', config)
        if res['status'] != 'PENDING':
            raise NfvbenchException(res['error_message'])

        # poll until request completes
        elapsed = 0
        while True:
            time.sleep(poll_interval)
            result = self.http_get('status', config)
            if result['status'] != 'PENDING':
                return result
            elapsed += poll_interval
            if elapsed >= timeout:
                raise TimeOutException()
48cf7ab4b592ae109cff2dcec'>Updated armbandJonas Bjurel1-0/+0 Project: fuel 3e535448fe1bad43d810d9b2ccf66f13bb7c10e5 Updated documentation for Brahmaputra 3.0 follow-up release READY TO MERGE Change-Id: Ic481f02375af9be1642791fa6d96856a453c4f29 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com> (cherry picked from commit f50747c9ec79b9f89df6a6ba6d680a89bd6a3de3) 2016-04-26Updated armbandJonas Bjurel1-0/+0 Project: fuel 6a42aafa48d339ba3164bd03006a5cf128b55299 Using VLAN segmentation for the NFV-OVS scenarios. Unfortunately this scenario is hardwired to work with Ericsson POD-2 only Change-Id: I3a0b56d7ff71e0ec9cd97b8ef5946fb438d43e62 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com> (cherry picked from commit 12c2d3403c4638672bbf1443142b8308e828e5f4) 2016-04-26Updated armbandStefan K. Berg1-0/+0 Project: fuel f544e413ecbbaa25d36f2336bb703565afc8fb38 Correction due to changed cpio behavior As part of a security fix for cpio, its behavior has changed in terms of how symlinks are handled. This is affecting the Fuel build process, for which this commit is a fix (reverting cpio back to its original behavior by adding the argument "--extract-over-symlinks" in those instances where this is needed). For details, see https://jira.opnfv.org/browse/FUEL-125 Change-Id: I455b11a16ad52d8dd09165165447e4c4a661b45a Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com> (cherry picked from commit 2b419db5c9325c6a87f1ea160c42235a1e8ec083) 2016-04-17fuel-nailgun-agent: ohai: Read L1 info w/ ethtool.Alexandru Avadanii1-0/+0 fuel-nailgun-agent uses ohai and rethtool for reading eth info, including ethernet card speed. However, current methods rely on the drivers populating the advertised and/or supported link speed lists. This is not true for all drivers, especially for some Fibers that only report the speed via ethtool when the link is up. This patch adds support for reading L1 info from ohai, which supports parsing ethtool speed starting with version amos2 [1]. [1] https://linux.enea.com/mos-repos/ubuntu/8.0/pool/main/o/ ohai/ohai_6.14.0-2~u14.04+mos1+mos8.0+amos2_all.deb Change-Id: Ic8c252e411a680af32cc68574c572434147a7e78 2016-04-15Updated armbandBilly O'Mahony1-0/+0 Project: ovsnfv 8a312b9535b2f3fe721139ed37722a13d1a940b1 fuel plugin: Pick updated libudev1 packages. Package versions of libudev1 packages were bumped from 5ubuntu20.18 to 5ubuntu20.19. Change-Id: I628b56c1f057699d6ce4021a3a7ae125f759d5ac Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com> Reviewed-by: Jonas Bjurel <jonas.bjurel@ericsson.com> Reviewed-by: Mark D. Gray <mark.d.gray@intel.com> Reviewed-by: Tom Herbert <therbert@redhat.com> (cherry picked from commit fe0d98cb53b7ce4b116c0f557376afe326698226) 2016-04-15Updated armbandBilly O'Mahony1-0/+0 Project: ovsnfv 0b811a3af8585e229be85f2f6be7b5c36dbbc26a fuel plugin: Provide required libudev1 version The latest fuel .iso has changed provided libudev1 version from 20.18 to 20.15. As the later version is required for the plugin we now provide it directly in the plugin's repo. Change-Id: Ida93a9971185d13aa476a6192bca949b854f42af Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com> Reviewed-by: Jonas Bjurel <jonas.bjurel@ericsson.com> Reviewed-by: Mark D. Gray <mark.d.gray@intel.com> Reviewed-by: Tom Herbert <therbert@redhat.com> Reviewed-by: Michal Skalski <mskalski@mirantis.com> Reviewed-by: Stefan Berg <stefan.k.berg@ericsson.com> (cherry picked from commit 5181fb94a7485af207c1232753eeb74fb8975b1a) 2016-04-15Updated armbandNikolas Hermanns1-0/+0 Project: fuel c6e6a032ce80f6b8a781383ebe72f3ca9572b268 [VPNSERVICE] Bugfix Broadcast Group The local broadcast group was not updated correctly in ODL. This commit includes the bugfix. Change-Id: I7857bcdc543217d513683bf91ab13fa93ba2ed42 2016-04-14Updated armbandNikolas Hermanns1-0/+0 Project: fuel 8ac63ae166d30c1bec46b5159b2d2362be5b325f Adding patch for Broadcast Storm of vpnservice There is no persisten release from stable/beryllium with the bugfix https://git.opendaylight.org/gerrit/#/c/37566/ included. So we have to overwrite the file we a own build. Change-Id: I637c333fa2175544f182cd1f7b774501d3fc2c25 2016-04-14Updated armbandMichal Skalski1-0/+0 Project: fuel e70b1575651518c6d3d247b59c303e54c9d586ec Fix odl haproxy configuration In rare cases ODL haproxy configuration had been deployed before haproxy service was ready. This patch should force proper order. Change-Id: I7c90a57bab5e3388bf29aefabe6ed9380d1303f6 Signed-off-by: Michal Skalski <mskalski@mirantis.com> (cherry picked from commit a71ccaa852a7a0091fce50045f29ab5119a7811b) 2016-04-13Updated armbandBilly O'Mahony1-0/+0 Project: ovsnfv 6795067e538388078afc8b1f71b6e8224339da81 fuel plugin: Pick updated libudev packages. Package versions of libudev-dev_204 packages were bumped from 5ubuntu20.18 to 5ubuntu20.19. Change-Id: Ie43635c1ab3180a307475e0b47b082fe1cad6ae1 Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com> Reviewed-by: Jonas Bjurel <jonas.bjurel@ericsson.com> Reviewed-by: Mark D. Gray <mark.d.gray@intel.com> Reviewed-by: Tom Herbert <therbert@redhat.com> Reviewed-by: Michal Skalski <mskalski@mirantis.com> (cherry picked from commit a1f15bb1c833079d49affab36bb4bb20ca73dafd) 2016-04-11Updated armbandNikolas Hermanns1-0/+0 Project: fuel 6597153801bc56a8d273ebd38b6cace45b5f3c4a Redo config of plugin build - Split up config into a new config file - add revision to better point to a branch instrad of a revision. Change-Id: I341138973b56fb0807478ee08cab039ab31d6503 2016-04-11Updated armbandBilly O'Mahony1-0/+0 Project: ovsnfv 456f72770de91a7489962d962efc823d3d5ceec8 fuel plugin: Pick updated pcre packages. Package versions of pcre 8.31 packages were bumped from 2ubuntu2.1 to 2ubuntu2.2. Change-Id: I5a48af87ff36375f41f2bb12b20c4c4d272d00c6 Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com> Reviewed-by: Jonas Bjurel <jonas.bjurel@ericsson.com> Reviewed-by: Mark D. Gray <mark.d.gray@intel.com> Reviewed-by: Tom Herbert <therbert@redhat.com> Reviewed-by: Michal Skalski <mskalski@mirantis.com> (cherry picked from commit 37c978c1fa84cd20f449aa1de7a74024cc9a8d13) 2016-04-11Updated armbandBilly O'Mahony1-0/+0 Project: ovsnfv 9be3edaf948cc28c6e879fa71daf4927dd3ed0d4 fuel plugin: Fix mechanism driver config This fixes the yardstick ping test. And hopefully other y/s tests. Add ovs to the mechanism driver search list so that neutron agent continues to work with the kernel ovs on the non-compute nodes. This enables the router on the control node and makes VMs accessible via public ip addresses. Change-Id: Ife08e63e8bf9358cc24eb610b3d7611484b3151f Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com> Reviewed-by: Jonas Bjurel <jonas.bjurel@ericsson.com> Reviewed-by: Mark D. Gray <mark.d.gray@intel.com> Reviewed-by: Tom Herbert <therbert@redhat.com> Reviewed-by: Michal Skalski <mskalski@mirantis.com> Reviewed-by: Stefan Berg <stefan.k.berg@ericsson.com> (cherry picked from commit b5b4ea732e18c5450c663c6f84f289eb6acadf4b) 2016-04-10Updated armbandPeter Barabas1-0/+0 Project: fuel a2bd1d8baa9d2c256671834fc90a1c7e489850d7 2016-04-10Updated armbanddavidjchou1-0/+0 Project: fuel cc51d7477901e5acf27e3599754f6a751231a2f1 2016-04-09Updated armbandNikolas Hermanns1-0/+0 Project: fuel e8d3f97a5fa317edc6aefb091da5318d946e82ce 2016-04-09Updated armbandJonas Bjurel1-0/+0 Project: fuel 5033efb4cbb8fb2b932846e5ac900c2ad042e28d Get user id without forking a shell. Change-Id: I6789b81186b7ede124a838a5b6668ba8326e0c0b Signed-off-by: Peter Barabas <peter.barabas@ericsson.com> (cherry picked from commit befc84a9d28663a45510c71119980e1cf5b6eeca) 2016-04-09Updated armbandJonas Bjurel1-0/+0 Project: fuel 28d95448184d16767aebedb6689d2c3059b559aa Tell debconf not to be interactive Change-Id: If3d937ba895cb06834a9f8b7382d1033aac9714f Signed-off-by: Peter Barabas <peter.barabas@ericsson.com> (cherry picked from commit 9d52d96263d9dc27183abd9a39d36bb7174efef4) 2016-04-09Updated armbandJonas Bjurel1-0/+0 Project: fuel 4fb3f2ed2549ab47a0048d88cbd1303de46820a1 Fix deploy.py return code Fixes https://jira.opnfv.org/browse/FUEL-100 Change-Id: Ic2e01372778720cde84d83738d8b2c85b005124a Signed-off-by: Peter Barabas <peter.barabas@ericsson.com> (cherry picked from commit 50862693f7c1119c941bc344c90d91cdd37dde38) 2016-04-09Updated armbandJonas Bjurel1-0/+0 Project: fuel f3f8da1bb11e4b91c7b7ee8b7d289c83a6bcfa45 Changing raw to qcow2 for vFuel/Controller/Compute A lot of diskspace is allocated although never used this commit changes to thin provisioning for the virtual enviroment. Change-Id: Ia128143a3bae9f3d85a9e749319c2f5343c1df4e (cherry picked from commit aac8573f454109c98fa2af1e5ed05c1d1b19829b) 2016-04-09Updated armbandNikolas Hermanns1-0/+0 Project: fuel 83ba58f31888144bb34a9d844454093d75469548 Remove apparmor for vFuel Not every CPU supports apparmor and there is no real benefit when using it only for fuel. Change-Id: Ibb3221b85d8565f718df9b087aa324d0f606bdee (cherry picked from commit ca27087edd27555aa6d7992b3e754c970bc6543f) 2016-04-08Updated armbandPeter Barabas1-0/+0 Project: fuel 0dc771a9584fe1998236c8941189b1afc3c3c066 Remove duplicate import of hashlib Change-Id: I306b8260ea37fb32ef8db8cf5d4628b50328027f Signed-off-by: Peter Barabas <peter.barabas@ericsson.com> (cherry picked from commit 18171a86a7d2b5cda035281ed0fdd3dcb8fbad36) 2016-04-08Updated armbandJonas Bjurel1-0/+0 Project: fuel 5e341a6f501e408dfd4c0dce401a6587ec6d5277 Cleanup and add bgpvpn to scenario file Change-Id: I82ce16751b4d52d6fdb39883b730073164f9dfe0 2016-04-08Updated armbandJonas Bjurel1-0/+0 Project: fuel 080b202e25964768f58825950bc779fe7d39002f Fix wrong indentation Change-Id: I215da0a101d94e2c3fd4aeea80b98f7c9aefe0fb Signed-off-by: Peter Barabas <peter.barabas@ericsson.com> (cherry picked from commit 8e91da9cbbb698e7f8531973299f81411a2532d2)