Giter Club home page Giter Club logo

eoscentral's People

Contributors

devrobo avatar networkop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eoscentral's Issues

Image to use to run docker-topo in gitlab CI

Hello,

First of all great repo and article network-ci-part3.

I am trying to follow up your examples git test project but having difficulties trying to pick or setup an image that can run docker-topo...

What I am trying so far if to build the image by using the docker:git base image and using docker:dind in services on the job build of .gitlab-ci.

On that image I just install python3 and pip and try to run docker-topo --create tests/docker-topo/some_topoligy.yaml but i have the following error

$ docker-topo --create tests/data/docker/docker-topo/ceos_ring/ceos_ring.yaml
/usr/bin/docker-topo:669: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  t_yml = yaml.load(stream)
Traceback (most recent call last):
  File "/usr/bin/docker-topo", line 812, in <module>
    main()
  File "/usr/bin/docker-topo", line 752, in main
    started = [device.start() == 0 for (name, device) in devices.items()]
  File "/usr/bin/docker-topo", line 752, in <listcomp>
    started = [device.start() == 0 for (name, device) in devices.items()]
  File "/usr/bin/docker-topo", line 331, in start
    self._attach()
  File "/usr/bin/docker-topo", line 348, in _attach
    link.connect(self, interface)
  File "/usr/bin/docker-topo", line 636, in connect
    self.network.connect(device, interface)
  File "/usr/bin/docker-topo", line 565, in connect
    ns_fd = os.open('/proc/{}/ns/net'.format(device.pid), os.O_RDONLY) 
FileNotFoundError: [Errno 2] No such file or directory: '/proc/217/ns/net'
ERROR: Job failed: exit code 1

I believe that this alpine-based image is not good to run the docker-topo....

So I was wondering you can help out with some pointers on how to build that image?

Thanks!

cvp-netsim branch broken when testing on CVP 2021.2.0

Looks like the API has been updated since this was published. The following diff resolves the issues. It would also probably be worth noting the user must create a config folder in the directory the script is executed within or the script fails because the folder doesn't exist when attempting to save files into it.

diff --git a/ingest.py b/ingest.py
index 5d322d1..6d34844 100755
--- a/ingest.py
+++ b/ingest.py
@@ -78,7 +78,9 @@ class CVP(object):
         response = requests.request("POST", url, data=json.dumps(data), headers=self.headers, verify=False)
         if response.status_code == 200:
             data = response.json()
-            self.cookie = f"session_id={data.get('sessionId')}"
+            self.cookie = f"access_token={data.get('sessionId')}"
+            logging.debug(f"cookie: {self.cookie}")
             logging.debug(f"Successfully authenticated on {self.ip}")
             return True
         else:
@@ -278,7 +280,7 @@ def main():
             for k,v2 in v["value"].items(): 
                 from_intf = k
                 for k,v3 in v2.items(): 
-                    to_intf = v3['_key']['neighborPort']
+                    to_intf = v3['key']['neighborPort']
                     if is_macaddress(from_intf): # Corner case for 3rd party LLDP device
                         from_intf = "eth0"
                     elif is_macaddress(to_intf):

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.