Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating delete_links for issue #79 provide delete_link function #91

Merged
merged 1 commit into from
Nov 4, 2020

Conversation

Krlosromero
Copy link
Collaborator

@Krlosromero Krlosromero commented Nov 3, 2020

PR for fixing Issue #79.
function delete_link created and tests passed successfully.

Copy link
Owner

@davidban77 davidban77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be pretty good!

For some reason the tests didn't trigger automatically and I might have to check on that later, but can you run them and paste them here?

@Krlosromero
Copy link
Collaborator Author

below the tests output

# carlosromero @ Carloss-MacBook-Pro in ~/workspace/gns3fy on git:master o [23:12:05] C:1
$ pytest  -v tests/test_gns3fy.py
============================================ test session starts =============================================
platform darwin -- Python 3.7.3, pytest-5.1.2, py-1.8.0, pluggy-0.13.0 -- /Users/carlosromero/anaconda3/envs/gns3fy/bin/python
cachedir: .pytest_cache
rootdir: /Users/carlosromero/workspace/gns3fy
plugins: requests-mock-1.7.0, cov-2.7.1
collected 136 items                                                                                          

tests/test_gns3fy.py::TestGns3Connector::test_get_version PASSED                                       [  0%]
tests/test_gns3fy.py::TestGns3Connector::test_get_templates PASSED                                     [  1%]
tests/test_gns3fy.py::TestGns3Connector::test_get_template_by_name PASSED                              [  2%]
tests/test_gns3fy.py::TestGns3Connector::test_get_template_by_id PASSED                                [  2%]
tests/test_gns3fy.py::TestGns3Connector::test_error_get_template_no_params PASSED                      [  3%]
tests/test_gns3fy.py::TestGns3Connector::test_error_template_id_not_found PASSED                       [  4%]
tests/test_gns3fy.py::TestGns3Connector::test_error_template_name_not_found PASSED                     [  5%]
tests/test_gns3fy.py::TestGns3Connector::test_create_template PASSED                                   [  5%]
tests/test_gns3fy.py::TestGns3Connector::test_error_create_template_already_used PASSED                [  6%]
tests/test_gns3fy.py::TestGns3Connector::test_update_template PASSED                                   [  7%]
tests/test_gns3fy.py::TestGns3Connector::test_delete_template PASSED                                   [  8%]
tests/test_gns3fy.py::TestGns3Connector::test_get_projects PASSED                                      [  8%]
tests/test_gns3fy.py::TestGns3Connector::test_get_project_by_name PASSED                               [  9%]
tests/test_gns3fy.py::TestGns3Connector::test_get_project_by_id PASSED                                 [ 10%]
tests/test_gns3fy.py::TestGns3Connector::test_error_get_project_no_params PASSED                       [ 11%]
tests/test_gns3fy.py::TestGns3Connector::test_error_project_id_not_found PASSED                        [ 11%]
tests/test_gns3fy.py::TestGns3Connector::test_error_project_name_not_found PASSED                      [ 12%]
tests/test_gns3fy.py::TestGns3Connector::test_get_nodes PASSED                                         [ 13%]
tests/test_gns3fy.py::TestGns3Connector::test_get_node_by_id PASSED                                    [ 13%]
tests/test_gns3fy.py::TestGns3Connector::test_error_node_not_found PASSED                              [ 14%]
tests/test_gns3fy.py::TestGns3Connector::test_get_links PASSED                                         [ 15%]
tests/test_gns3fy.py::TestGns3Connector::test_get_link_by_id PASSED                                    [ 16%]
tests/test_gns3fy.py::TestGns3Connector::test_error_link_not_found PASSED                              [ 16%]
tests/test_gns3fy.py::TestGns3Connector::test_create_project PASSED                                    [ 17%]
tests/test_gns3fy.py::TestGns3Connector::test_error_create_duplicate_project PASSED                    [ 18%]
tests/test_gns3fy.py::TestGns3Connector::test_error_create_project_with_no_name PASSED                 [ 19%]
tests/test_gns3fy.py::TestGns3Connector::test_delete_project PASSED                                    [ 19%]
tests/test_gns3fy.py::TestGns3Connector::test_projects_summary PASSED                                  [ 20%]
tests/test_gns3fy.py::TestGns3Connector::test_projects_summary_print PASSED                            [ 21%]
tests/test_gns3fy.py::TestGns3Connector::test_templates_summary PASSED                                 [ 22%]
tests/test_gns3fy.py::TestGns3Connector::test_templates_summary_print PASSED                           [ 22%]
tests/test_gns3fy.py::TestGns3Connector::test_get_computes PASSED                                      [ 23%]
tests/test_gns3fy.py::TestGns3Connector::test_get_compute PASSED                                       [ 24%]
tests/test_gns3fy.py::TestGns3Connector::test_get_compute_qemu_images PASSED                           [ 25%]
tests/test_gns3fy.py::TestGns3Connector::test_upload_compute_image_not_found PASSED                    [ 25%]
tests/test_gns3fy.py::TestGns3Connector::test_upload_compute_image PASSED                              [ 26%]
tests/test_gns3fy.py::TestGns3Connector::test_get_compute_ports PASSED                                 [ 27%]
tests/test_gns3fy.py::TestGns3Connector::test_wrong_server_url FAILED                                  [ 27%]
tests/test_gns3fy.py::TestLink::test_instatiation PASSED                                               [ 28%]
tests/test_gns3fy.py::TestLink::test_error_instatiation_bad_link_type PASSED                           [ 29%]
tests/test_gns3fy.py::TestLink::test_error_get_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 30%]
tests/test_gns3fy.py::TestLink::test_error_get_with_no_required_param[params1-Need to submit project_id] PASSED [ 30%]
tests/test_gns3fy.py::TestLink::test_error_get_with_no_required_param[params2-Need to submit link_id] PASSED [ 31%]
tests/test_gns3fy.py::TestLink::test_get PASSED                                                        [ 32%]
tests/test_gns3fy.py::TestLink::test_error_create_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 33%]
tests/test_gns3fy.py::TestLink::test_error_create_with_no_required_param[params1-Need to submit project_id] PASSED [ 33%]
tests/test_gns3fy.py::TestLink::test_create PASSED                                                     [ 34%]
tests/test_gns3fy.py::TestLink::test_error_create_with_incomplete_node_data PASSED                     [ 35%]
tests/test_gns3fy.py::TestLink::test_error_create_connecting_to_itself PASSED                          [ 36%]
tests/test_gns3fy.py::TestLink::test_delete PASSED                                                     [ 36%]
tests/test_gns3fy.py::TestNode::test_instatiation PASSED                                               [ 37%]
tests/test_gns3fy.py::TestNode::test_error_link_instatiation_bad_param[param0-Not a valid node_type - dummy] PASSED [ 38%]
tests/test_gns3fy.py::TestNode::test_error_link_instatiation_bad_param[param1-Not a valid console_type - dummy] PASSED [ 38%]
tests/test_gns3fy.py::TestNode::test_error_link_instatiation_bad_param[param2-Not a valid status - dummy] PASSED [ 39%]
tests/test_gns3fy.py::TestNode::test_error_get_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 40%]
tests/test_gns3fy.py::TestNode::test_error_get_with_no_required_param[params1-Need to submit project_id] PASSED [ 41%]
tests/test_gns3fy.py::TestNode::test_error_get_with_no_required_param[params2-Need to either submit node_id or name] PASSED [ 41%]
tests/test_gns3fy.py::TestNode::test_get PASSED                                                        [ 42%]
tests/test_gns3fy.py::TestNode::test_get_links PASSED                                                  [ 43%]
tests/test_gns3fy.py::TestNode::test_start PASSED                                                      [ 44%]
tests/test_gns3fy.py::TestNode::test_stop PASSED                                                       [ 44%]
tests/test_gns3fy.py::TestNode::test_suspend PASSED                                                    [ 45%]
tests/test_gns3fy.py::TestNode::test_reload PASSED                                                     [ 46%]
tests/test_gns3fy.py::TestNode::test_create[param0] PASSED                                             [ 47%]
tests/test_gns3fy.py::TestNode::test_create[param1] PASSED                                             [ 47%]
tests/test_gns3fy.py::TestNode::test_create_override_properties PASSED                                 [ 48%]
tests/test_gns3fy.py::TestNode::test_error_create_with_invalid_parameter_type PASSED                   [ 49%]
tests/test_gns3fy.py::TestNode::test_error_create_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 50%]
tests/test_gns3fy.py::TestNode::test_error_create_with_no_required_param[params1-Node object needs to have project_id attribute] PASSED [ 50%]
tests/test_gns3fy.py::TestNode::test_error_create_with_no_required_param[params2-Node already created] PASSED [ 51%]
tests/test_gns3fy.py::TestNode::test_error_create_with_no_required_param[params3-Need either 'template' of 'template_id'] PASSED [ 52%]
tests/test_gns3fy.py::TestNode::test_error_create_with_no_required_param[params4-Template alpine-dummy not found] PASSED [ 52%]
tests/test_gns3fy.py::TestNode::test_get_file PASSED                                                   [ 53%]
tests/test_gns3fy.py::TestNode::test_error_get_file_wrong_path PASSED                                  [ 54%]
tests/test_gns3fy.py::TestNode::test_write_file PASSED                                                 [ 55%]
tests/test_gns3fy.py::TestNode::test_delete PASSED                                                     [ 55%]
tests/test_gns3fy.py::TestProject::test_instatiation PASSED                                            [ 56%]
tests/test_gns3fy.py::TestProject::test_error_instatiation_bad_status PASSED                           [ 57%]
tests/test_gns3fy.py::TestProject::test_create PASSED                                                  [ 58%]
tests/test_gns3fy.py::TestProject::test_error_create_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 58%]
tests/test_gns3fy.py::TestProject::test_error_create_with_no_required_param[params1-Need to submit project name] PASSED [ 59%]
tests/test_gns3fy.py::TestProject::test_delete PASSED                                                  [ 60%]
tests/test_gns3fy.py::TestProject::test_get PASSED                                                     [ 61%]
tests/test_gns3fy.py::TestProject::test_error_get_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 61%]
tests/test_gns3fy.py::TestProject::test_error_get_with_no_required_param[params1-Need to submit either project_id or name] PASSED [ 62%]
tests/test_gns3fy.py::TestProject::test_update PASSED                                                  [ 63%]
tests/test_gns3fy.py::TestProject::test_error_update_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 63%]
tests/test_gns3fy.py::TestProject::test_error_update_with_no_required_param[params1-Need to submit project_id] PASSED [ 64%]
tests/test_gns3fy.py::TestProject::test_open PASSED                                                    [ 65%]
tests/test_gns3fy.py::TestProject::test_close PASSED                                                   [ 66%]
tests/test_gns3fy.py::TestProject::test_get_stats PASSED                                               [ 66%]
tests/test_gns3fy.py::TestProject::test_get_nodes PASSED                                               [ 67%]
tests/test_gns3fy.py::TestProject::test_arrange_nodes_circular PASSED                                  [ 68%]
tests/test_gns3fy.py::TestProject::test_error_get_node_no_required_params PASSED                       [ 69%]
tests/test_gns3fy.py::TestProject::test_get_links PASSED                                               [ 69%]
tests/test_gns3fy.py::TestProject::test_error_get_link_not_found PASSED                                [ 70%]
tests/test_gns3fy.py::TestProject::test_start_nodes PASSED                                             [ 71%]
tests/test_gns3fy.py::TestProject::test_stop_nodes PASSED                                              [ 72%]
tests/test_gns3fy.py::TestProject::test_reload_nodes PASSED                                            [ 72%]
tests/test_gns3fy.py::TestProject::test_suspend_nodes PASSED                                           [ 73%]
tests/test_gns3fy.py::TestProject::test_nodes_summary PASSED                                           [ 74%]
tests/test_gns3fy.py::TestProject::test_nodes_summary_print PASSED                                     [ 75%]
tests/test_gns3fy.py::TestProject::test_nodes_inventory PASSED                                         [ 75%]
tests/test_gns3fy.py::TestProject::test_links_summary PASSED                                           [ 76%]
tests/test_gns3fy.py::TestProject::test_links_summary_print PASSED                                     [ 77%]
tests/test_gns3fy.py::TestProject::test_get_node_by_name PASSED                                        [ 77%]
tests/test_gns3fy.py::TestProject::test_get_node_by_id PASSED                                          [ 78%]
tests/test_gns3fy.py::TestProject::test_get_link_by_id PASSED                                          [ 79%]
tests/test_gns3fy.py::TestProject::test_create_node PASSED                                             [ 80%]
tests/test_gns3fy.py::TestProject::test_create_link PASSED                                             [ 80%]
tests/test_gns3fy.py::TestProject::test_delete_link PASSED                                             [ 81%]
tests/test_gns3fy.py::TestProject::test_error_create_link_with_invalid_param[link0-port_a: Ethernet77/1 not found] PASSED [ 82%]
tests/test_gns3fy.py::TestProject::test_error_create_link_with_invalid_param[link1-port_b: Ethernet77 not found] PASSED [ 83%]
tests/test_gns3fy.py::TestProject::test_error_create_link_with_invalid_param[link2-node_a: IOU77 not found] PASSED [ 83%]
tests/test_gns3fy.py::TestProject::test_error_create_link_with_invalid_param[link3-node_b: vEOS77 not found] PASSED [ 84%]
tests/test_gns3fy.py::TestProject::test_error_create_link_with_invalid_param[link4-At least one port is used] PASSED [ 85%]
tests/test_gns3fy.py::TestProject::test_get_file PASSED                                                [ 86%]
tests/test_gns3fy.py::TestProject::test_error_get_file_wrong_path PASSED                               [ 86%]
tests/test_gns3fy.py::TestProject::test_write_file PASSED                                              [ 87%]
tests/test_gns3fy.py::TestProject::test_get_snapshots PASSED                                           [ 88%]
tests/test_gns3fy.py::TestProject::test_get_snapshot PASSED                                            [ 88%]
tests/test_gns3fy.py::TestProject::test_error_get_snapshot_not_provided PASSED                         [ 89%]
tests/test_gns3fy.py::TestProject::test_error_get_snapshot_not_found PASSED                            [ 90%]
tests/test_gns3fy.py::TestProject::test_create_snapshot PASSED                                         [ 91%]
tests/test_gns3fy.py::TestProject::test_error_create_snapshot_already_created PASSED                   [ 91%]
tests/test_gns3fy.py::TestProject::test_delete_snapshot PASSED                                         [ 92%]
tests/test_gns3fy.py::TestProject::test_error_delete_snapshot_not_found PASSED                         [ 93%]
tests/test_gns3fy.py::TestProject::test_restore_snapshot PASSED                                        [ 94%]
tests/test_gns3fy.py::TestProject::test_error_restore_snapshot_not_found PASSED                        [ 94%]
tests/test_gns3fy.py::TestProject::test_get_drawings PASSED                                            [ 95%]
tests/test_gns3fy.py::TestProject::test_error_get_drawing_not_found PASSED                             [ 96%]
tests/test_gns3fy.py::TestProject::test_get_drawing PASSED                                             [ 97%]
tests/test_gns3fy.py::TestProject::test_create_drawing PASSED                                          [ 97%]
tests/test_gns3fy.py::TestProject::test_update_drawing PASSED                                          [ 98%]
tests/test_gns3fy.py::TestProject::test_delete_drawing PASSED                                          [ 99%]
tests/test_gns3fy.py::TestProject::test_delete_drawing_not_found PASSED                                [100%]

================================================== FAILURES ==================================================
__________________________________ TestGns3Connector.test_wrong_server_url ___________________________________

self = <PreparedRequest [GET]>, url = 'WRONG URL/version', params = OrderedDict()

    def prepare_url(self, url, params):
        """Prepares the given HTTP URL."""
        #: Accept objects that have string representations.
        #: We're unable to blindly call unicode/str functions
        #: as this will include the bytestring indicator (b'')
        #: on python 3.x.
        #: https://github.com/requests/requests/pull/2238
        if isinstance(url, bytes):
            url = url.decode('utf8')
        else:
            url = unicode(url) if is_py2 else str(url)
    
        # Remove leading whitespaces from url
        url = url.lstrip()
    
        # Don't do any URL preparation for non-HTTP schemes like `mailto`,
        # `data` etc to work around exceptions from `url_parse`, which
        # handles RFC 3986 only.
        if ':' in url and not url.lower().startswith('http'):
            self.url = url
            return
    
        # Support for unicode domain names and paths.
        try:
>           scheme, auth, host, port, path, query, fragment = parse_url(url)

../../anaconda3/envs/gns3fy/lib/python3.7/site-packages/requests/models.py:379: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

url = '//WRONG URL/version'

    def parse_url(url):
        """
        Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
        performed to parse incomplete urls. Fields not provided will be None.
        This parser is RFC 3986 compliant.
    
        :param str url: URL to parse into a :class:`.Url` namedtuple.
    
        Partly backwards-compatible with :mod:`urlparse`.
    
        Example::
    
            >>> parse_url('http://google.com/mail/')
            Url(scheme='http', host='google.com', port=None, path='/mail/', ...)
            >>> parse_url('google.com:80')
            Url(scheme=None, host='google.com', port=80, path=None, ...)
            >>> parse_url('/foo?bar')
            Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
        """
        if not url:
            # Empty
            return Url()
    
        is_string = not isinstance(url, six.binary_type)
    
        # RFC 3986 doesn't like URLs that have a host but don't start
        # with a scheme and we support URLs like that so we need to
        # detect that problem and add an empty scheme indication.
        # We don't get hurt on path-only URLs here as it's stripped
        # off and given an empty scheme anyways.
        if not SCHEME_REGEX.search(url):
            url = "//" + url
    
        def idna_encode(name):
            if name and any([ord(x) > 128 for x in name]):
                try:
                    import idna
                except ImportError:
                    raise LocationParseError("Unable to parse URL without the 'idna' module")
                try:
                    return idna.encode(name.lower(), strict=True, std3_rules=True)
                except idna.IDNAError:
                    raise LocationParseError(u"Name '%s' is not a valid IDNA label" % name)
            return name
    
        try:
            split_iri = misc.IRI_MATCHER.match(compat.to_str(url)).groupdict()
            iri_ref = rfc3986.IRIReference(
                split_iri['scheme'], split_iri['authority'],
                _encode_invalid_chars(split_iri['path'], PATH_CHARS),
                _encode_invalid_chars(split_iri['query'], QUERY_CHARS),
                _encode_invalid_chars(split_iri['fragment'], FRAGMENT_CHARS)
            )
            has_authority = iri_ref.authority is not None
            uri_ref = iri_ref.encode(idna_encoder=idna_encode)
        except (ValueError, RFC3986Exception):
            return six.raise_from(LocationParseError(url), None)
    
        # rfc3986 strips the authority if it's invalid
        if has_authority and uri_ref.authority is None:
>           raise LocationParseError(url)
E           urllib3.exceptions.LocationParseError: Failed to parse: //WRONG URL/version

../../anaconda3/envs/gns3fy/lib/python3.7/site-packages/urllib3/util/url.py:234: LocationParseError

During handling of the above exception, another exception occurred:

self = <tests.test_gns3fy.TestGns3Connector object at 0x7fc29ee075f8>
gns3_server = <tests.test_gns3fy.Gns3ConnectorMock object at 0x7fc29ec362b0>

    def test_wrong_server_url(self, gns3_server):
        gns3_server.base_url = "WRONG URL"
        with pytest.raises(requests.exceptions.MissingSchema, match="Invalid URL"):
>           gns3_server.get_version()

tests/test_gns3fy.py:886: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
gns3fy/gns3fy.py:153: in get_version
    return self.http_call("get", url=f"{self.base_url}/version").json()
gns3fy/gns3fy.py:136: in http_call
    url, headers=headers, params=params, verify=verify
../../anaconda3/envs/gns3fy/lib/python3.7/site-packages/requests/sessions.py:546: in get
    return self.request('GET', url, **kwargs)
../../anaconda3/envs/gns3fy/lib/python3.7/site-packages/requests/sessions.py:519: in request
    prep = self.prepare_request(req)
../../anaconda3/envs/gns3fy/lib/python3.7/site-packages/requests/sessions.py:462: in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
../../anaconda3/envs/gns3fy/lib/python3.7/site-packages/requests/models.py:313: in prepare
    self.prepare_url(url, params)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <PreparedRequest [GET]>, url = 'WRONG URL/version', params = OrderedDict()

    def prepare_url(self, url, params):
        """Prepares the given HTTP URL."""
        #: Accept objects that have string representations.
        #: We're unable to blindly call unicode/str functions
        #: as this will include the bytestring indicator (b'')
        #: on python 3.x.
        #: https://github.com/requests/requests/pull/2238
        if isinstance(url, bytes):
            url = url.decode('utf8')
        else:
            url = unicode(url) if is_py2 else str(url)
    
        # Remove leading whitespaces from url
        url = url.lstrip()
    
        # Don't do any URL preparation for non-HTTP schemes like `mailto`,
        # `data` etc to work around exceptions from `url_parse`, which
        # handles RFC 3986 only.
        if ':' in url and not url.lower().startswith('http'):
            self.url = url
            return
    
        # Support for unicode domain names and paths.
        try:
            scheme, auth, host, port, path, query, fragment = parse_url(url)
        except LocationParseError as e:
>           raise InvalidURL(*e.args)
E           requests.exceptions.InvalidURL: Failed to parse: //WRONG URL/version

../../anaconda3/envs/gns3fy/lib/python3.7/site-packages/requests/models.py:381: InvalidURL
======================================= 1 failed, 135 passed in 4.12s ========================================
(gns3fy) 

@Krlosromero
Copy link
Collaborator Author

After updating Poetry... ALL tests PASSED 👍

$ pytest  -v tests/test_gns3fy.py
============================================ test session starts =============================================
platform darwin -- Python 3.9.0, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /Users/carlosromero/anaconda3/envs/gns3fy/bin/python
cachedir: .pytest_cache
rootdir: /Users/carlosromero/workspace/gns3fy
plugins: requests-mock-1.8.0, cov-2.8.1
collected 136 items                                                                                          

tests/test_gns3fy.py::TestGns3Connector::test_get_version PASSED                                       [  0%]
tests/test_gns3fy.py::TestGns3Connector::test_get_templates PASSED                                     [  1%]
tests/test_gns3fy.py::TestGns3Connector::test_get_template_by_name PASSED                              [  2%]
tests/test_gns3fy.py::TestGns3Connector::test_get_template_by_id PASSED                                [  2%]
tests/test_gns3fy.py::TestGns3Connector::test_error_get_template_no_params PASSED                      [  3%]
tests/test_gns3fy.py::TestGns3Connector::test_error_template_id_not_found PASSED                       [  4%]
tests/test_gns3fy.py::TestGns3Connector::test_error_template_name_not_found PASSED                     [  5%]
tests/test_gns3fy.py::TestGns3Connector::test_create_template PASSED                                   [  5%]
tests/test_gns3fy.py::TestGns3Connector::test_error_create_template_already_used PASSED                [  6%]
tests/test_gns3fy.py::TestGns3Connector::test_update_template PASSED                                   [  7%]
tests/test_gns3fy.py::TestGns3Connector::test_delete_template PASSED                                   [  8%]
tests/test_gns3fy.py::TestGns3Connector::test_get_projects PASSED                                      [  8%]
tests/test_gns3fy.py::TestGns3Connector::test_get_project_by_name PASSED                               [  9%]
tests/test_gns3fy.py::TestGns3Connector::test_get_project_by_id PASSED                                 [ 10%]
tests/test_gns3fy.py::TestGns3Connector::test_error_get_project_no_params PASSED                       [ 11%]
tests/test_gns3fy.py::TestGns3Connector::test_error_project_id_not_found PASSED                        [ 11%]
tests/test_gns3fy.py::TestGns3Connector::test_error_project_name_not_found PASSED                      [ 12%]
tests/test_gns3fy.py::TestGns3Connector::test_get_nodes PASSED                                         [ 13%]
tests/test_gns3fy.py::TestGns3Connector::test_get_node_by_id PASSED                                    [ 13%]
tests/test_gns3fy.py::TestGns3Connector::test_error_node_not_found PASSED                              [ 14%]
tests/test_gns3fy.py::TestGns3Connector::test_get_links PASSED                                         [ 15%]
tests/test_gns3fy.py::TestGns3Connector::test_get_link_by_id PASSED                                    [ 16%]
tests/test_gns3fy.py::TestGns3Connector::test_error_link_not_found PASSED                              [ 16%]
tests/test_gns3fy.py::TestGns3Connector::test_create_project PASSED                                    [ 17%]
tests/test_gns3fy.py::TestGns3Connector::test_error_create_duplicate_project PASSED                    [ 18%]
tests/test_gns3fy.py::TestGns3Connector::test_error_create_project_with_no_name PASSED                 [ 19%]
tests/test_gns3fy.py::TestGns3Connector::test_delete_project PASSED                                    [ 19%]
tests/test_gns3fy.py::TestGns3Connector::test_projects_summary PASSED                                  [ 20%]
tests/test_gns3fy.py::TestGns3Connector::test_projects_summary_print PASSED                            [ 21%]
tests/test_gns3fy.py::TestGns3Connector::test_templates_summary PASSED                                 [ 22%]
tests/test_gns3fy.py::TestGns3Connector::test_templates_summary_print PASSED                           [ 22%]
tests/test_gns3fy.py::TestGns3Connector::test_get_computes PASSED                                      [ 23%]
tests/test_gns3fy.py::TestGns3Connector::test_get_compute PASSED                                       [ 24%]
tests/test_gns3fy.py::TestGns3Connector::test_get_compute_qemu_images PASSED                           [ 25%]
tests/test_gns3fy.py::TestGns3Connector::test_upload_compute_image_not_found PASSED                    [ 25%]
tests/test_gns3fy.py::TestGns3Connector::test_upload_compute_image PASSED                              [ 26%]
tests/test_gns3fy.py::TestGns3Connector::test_get_compute_ports PASSED                                 [ 27%]
tests/test_gns3fy.py::TestGns3Connector::test_wrong_server_url PASSED                                  [ 27%]
tests/test_gns3fy.py::TestLink::test_instatiation PASSED                                               [ 28%]
tests/test_gns3fy.py::TestLink::test_error_instatiation_bad_link_type PASSED                           [ 29%]
tests/test_gns3fy.py::TestLink::test_error_get_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 30%]
tests/test_gns3fy.py::TestLink::test_error_get_with_no_required_param[params1-Need to submit project_id] PASSED [ 30%]
tests/test_gns3fy.py::TestLink::test_error_get_with_no_required_param[params2-Need to submit link_id] PASSED [ 31%]
tests/test_gns3fy.py::TestLink::test_get PASSED                                                        [ 32%]
tests/test_gns3fy.py::TestLink::test_error_create_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 33%]
tests/test_gns3fy.py::TestLink::test_error_create_with_no_required_param[params1-Need to submit project_id] PASSED [ 33%]
tests/test_gns3fy.py::TestLink::test_create PASSED                                                     [ 34%]
tests/test_gns3fy.py::TestLink::test_error_create_with_incomplete_node_data PASSED                     [ 35%]
tests/test_gns3fy.py::TestLink::test_error_create_connecting_to_itself PASSED                          [ 36%]
tests/test_gns3fy.py::TestLink::test_delete PASSED                                                     [ 36%]
tests/test_gns3fy.py::TestNode::test_instatiation PASSED                                               [ 37%]
tests/test_gns3fy.py::TestNode::test_error_link_instatiation_bad_param[param0-Not a valid node_type - dummy] PASSED [ 38%]
tests/test_gns3fy.py::TestNode::test_error_link_instatiation_bad_param[param1-Not a valid console_type - dummy] PASSED [ 38%]
tests/test_gns3fy.py::TestNode::test_error_link_instatiation_bad_param[param2-Not a valid status - dummy] PASSED [ 39%]
tests/test_gns3fy.py::TestNode::test_error_get_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 40%]
tests/test_gns3fy.py::TestNode::test_error_get_with_no_required_param[params1-Need to submit project_id] PASSED [ 41%]
tests/test_gns3fy.py::TestNode::test_error_get_with_no_required_param[params2-Need to either submit node_id or name] PASSED [ 41%]
tests/test_gns3fy.py::TestNode::test_get PASSED                                                        [ 42%]
tests/test_gns3fy.py::TestNode::test_get_links PASSED                                                  [ 43%]
tests/test_gns3fy.py::TestNode::test_start PASSED                                                      [ 44%]
tests/test_gns3fy.py::TestNode::test_stop PASSED                                                       [ 44%]
tests/test_gns3fy.py::TestNode::test_suspend PASSED                                                    [ 45%]
tests/test_gns3fy.py::TestNode::test_reload PASSED                                                     [ 46%]
tests/test_gns3fy.py::TestNode::test_create[param0] PASSED                                             [ 47%]
tests/test_gns3fy.py::TestNode::test_create[param1] PASSED                                             [ 47%]
tests/test_gns3fy.py::TestNode::test_create_override_properties PASSED                                 [ 48%]
tests/test_gns3fy.py::TestNode::test_error_create_with_invalid_parameter_type PASSED                   [ 49%]
tests/test_gns3fy.py::TestNode::test_error_create_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 50%]
tests/test_gns3fy.py::TestNode::test_error_create_with_no_required_param[params1-Node object needs to have project_id attribute] PASSED [ 50%]
tests/test_gns3fy.py::TestNode::test_error_create_with_no_required_param[params2-Node already created] PASSED [ 51%]
tests/test_gns3fy.py::TestNode::test_error_create_with_no_required_param[params3-Need either 'template' of 'template_id'] PASSED [ 52%]
tests/test_gns3fy.py::TestNode::test_error_create_with_no_required_param[params4-Template alpine-dummy not found] PASSED [ 52%]
tests/test_gns3fy.py::TestNode::test_get_file PASSED                                                   [ 53%]
tests/test_gns3fy.py::TestNode::test_error_get_file_wrong_path PASSED                                  [ 54%]
tests/test_gns3fy.py::TestNode::test_write_file PASSED                                                 [ 55%]
tests/test_gns3fy.py::TestNode::test_delete PASSED                                                     [ 55%]
tests/test_gns3fy.py::TestProject::test_instatiation PASSED                                            [ 56%]
tests/test_gns3fy.py::TestProject::test_error_instatiation_bad_status PASSED                           [ 57%]
tests/test_gns3fy.py::TestProject::test_create PASSED                                                  [ 58%]
tests/test_gns3fy.py::TestProject::test_error_create_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 58%]
tests/test_gns3fy.py::TestProject::test_error_create_with_no_required_param[params1-Need to submit project name] PASSED [ 59%]
tests/test_gns3fy.py::TestProject::test_delete PASSED                                                  [ 60%]
tests/test_gns3fy.py::TestProject::test_get PASSED                                                     [ 61%]
tests/test_gns3fy.py::TestProject::test_error_get_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 61%]
tests/test_gns3fy.py::TestProject::test_error_get_with_no_required_param[params1-Need to submit either project_id or name] PASSED [ 62%]
tests/test_gns3fy.py::TestProject::test_update PASSED                                                  [ 63%]
tests/test_gns3fy.py::TestProject::test_error_update_with_no_required_param[params0-Gns3Connector not assigned under 'connector'] PASSED [ 63%]
tests/test_gns3fy.py::TestProject::test_error_update_with_no_required_param[params1-Need to submit project_id] PASSED [ 64%]
tests/test_gns3fy.py::TestProject::test_open PASSED                                                    [ 65%]
tests/test_gns3fy.py::TestProject::test_close PASSED                                                   [ 66%]
tests/test_gns3fy.py::TestProject::test_get_stats PASSED                                               [ 66%]
tests/test_gns3fy.py::TestProject::test_get_nodes PASSED                                               [ 67%]
tests/test_gns3fy.py::TestProject::test_arrange_nodes_circular PASSED                                  [ 68%]
tests/test_gns3fy.py::TestProject::test_error_get_node_no_required_params PASSED                       [ 69%]
tests/test_gns3fy.py::TestProject::test_get_links PASSED                                               [ 69%]
tests/test_gns3fy.py::TestProject::test_error_get_link_not_found PASSED                                [ 70%]
tests/test_gns3fy.py::TestProject::test_start_nodes PASSED                                             [ 71%]
tests/test_gns3fy.py::TestProject::test_stop_nodes PASSED                                              [ 72%]
tests/test_gns3fy.py::TestProject::test_reload_nodes PASSED                                            [ 72%]
tests/test_gns3fy.py::TestProject::test_suspend_nodes PASSED                                           [ 73%]
tests/test_gns3fy.py::TestProject::test_nodes_summary PASSED                                           [ 74%]
tests/test_gns3fy.py::TestProject::test_nodes_summary_print PASSED                                     [ 75%]
tests/test_gns3fy.py::TestProject::test_nodes_inventory PASSED                                         [ 75%]
tests/test_gns3fy.py::TestProject::test_links_summary PASSED                                           [ 76%]
tests/test_gns3fy.py::TestProject::test_links_summary_print PASSED                                     [ 77%]
tests/test_gns3fy.py::TestProject::test_get_node_by_name PASSED                                        [ 77%]
tests/test_gns3fy.py::TestProject::test_get_node_by_id PASSED                                          [ 78%]
tests/test_gns3fy.py::TestProject::test_get_link_by_id PASSED                                          [ 79%]
tests/test_gns3fy.py::TestProject::test_create_node PASSED                                             [ 80%]
tests/test_gns3fy.py::TestProject::test_create_link PASSED                                             [ 80%]
tests/test_gns3fy.py::TestProject::test_delete_link PASSED                                             [ 81%]
tests/test_gns3fy.py::TestProject::test_error_create_link_with_invalid_param[link0-port_a: Ethernet77/1 not found] PASSED [ 82%]
tests/test_gns3fy.py::TestProject::test_error_create_link_with_invalid_param[link1-port_b: Ethernet77 not found] PASSED [ 83%]
tests/test_gns3fy.py::TestProject::test_error_create_link_with_invalid_param[link2-node_a: IOU77 not found] PASSED [ 83%]
tests/test_gns3fy.py::TestProject::test_error_create_link_with_invalid_param[link3-node_b: vEOS77 not found] PASSED [ 84%]
tests/test_gns3fy.py::TestProject::test_error_create_link_with_invalid_param[link4-At least one port is used] PASSED [ 85%]
tests/test_gns3fy.py::TestProject::test_get_file PASSED                                                [ 86%]
tests/test_gns3fy.py::TestProject::test_error_get_file_wrong_path PASSED                               [ 86%]
tests/test_gns3fy.py::TestProject::test_write_file PASSED                                              [ 87%]
tests/test_gns3fy.py::TestProject::test_get_snapshots PASSED                                           [ 88%]
tests/test_gns3fy.py::TestProject::test_get_snapshot PASSED                                            [ 88%]
tests/test_gns3fy.py::TestProject::test_error_get_snapshot_not_provided PASSED                         [ 89%]
tests/test_gns3fy.py::TestProject::test_error_get_snapshot_not_found PASSED                            [ 90%]
tests/test_gns3fy.py::TestProject::test_create_snapshot PASSED                                         [ 91%]
tests/test_gns3fy.py::TestProject::test_error_create_snapshot_already_created PASSED                   [ 91%]
tests/test_gns3fy.py::TestProject::test_delete_snapshot PASSED                                         [ 92%]
tests/test_gns3fy.py::TestProject::test_error_delete_snapshot_not_found PASSED                         [ 93%]
tests/test_gns3fy.py::TestProject::test_restore_snapshot PASSED                                        [ 94%]
tests/test_gns3fy.py::TestProject::test_error_restore_snapshot_not_found PASSED                        [ 94%]
tests/test_gns3fy.py::TestProject::test_get_drawings PASSED                                            [ 95%]
tests/test_gns3fy.py::TestProject::test_error_get_drawing_not_found PASSED                             [ 96%]
tests/test_gns3fy.py::TestProject::test_get_drawing PASSED                                             [ 97%]
tests/test_gns3fy.py::TestProject::test_create_drawing PASSED                                          [ 97%]
tests/test_gns3fy.py::TestProject::test_update_drawing PASSED                                          [ 98%]
tests/test_gns3fy.py::TestProject::test_delete_drawing PASSED                                          [ 99%]
tests/test_gns3fy.py::TestProject::test_delete_drawing_not_found PASSED                                [100%]

============================================ 136 passed in 7.78s =============================================
(gns3fy) 
# carlosromero @ Carloss-MacBook-Pro in ~/workspace/gns3fy on git:master o [23:53:16] 

@davidban77 davidban77 merged commit 9f07fe8 into davidban77:develop Nov 4, 2020
Copy link
Owner

@davidban77 davidban77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants