Code Monkey home page Code Monkey logo

contrail-introspect-cli's Introduction

Build Status

!!! This project is no longer maintained !!!

CLI on ContraiL Introspects

Installation

You can download the latest contrail-introspect-cli binary or build it:

$ go get github.com/nlewo/contrail-introspect-cli/contrail-introspect-cli

or for Nix users:

$ nix-build -E 'with import <nixpkgs> { };  callPackage ./default.nix {}'

To enable bash completion

$ eval `contrail-introspect-cli --init-completion bash`

Usage Examples

  • List interfaces
    $ contrail-introspect-cli agent-itf vrouter_fqdn -l
    00000000-0000-0000-0000-000000000000 bond0.1002 default-domain:default-project:ip-fabric:__default__ 
    039b3555-e83d-480c-89d2-fb2cf767bf55 tap039b3555-e8 default-domain:default-project:network:network
    08893790-a8e2-4283-800000000-0000-0000-0000-000000000000 vhost0 default-domain:default-project:ip-fabric:__default__ 
  • Get nexthops for 192.168.1.5 in the vrf net1
    $ contrail-introspect-cli --hosts hosts agent-route vrouter-fqdn domain:project:net1:net1 -s 192.168.1.5 -l
    Src 192.168.1.5
        Dst                        	Peers        	MPLS label	Interface	Dest VN                        
        vrouter-1                       10.12.128.10	30        	         	domain:project:net1
        vrtouer-1                       10.12.128.11	30        	         	domain:project:net1

The --hosts option takes a hosts file to translate introspect IPs to DNS names.

  • Follow a route to the destination interface
    $ contrail-introspect-cli --hosts hosts follow vrouter-1.example.com vrf-name 10.210.3.5  
    1. Starting on vrouter-1.example.com for the route 10.210.3.5 in the vrf vrf-name
    2. Go with MPLS label 129 to vrouter-2.example.com
    3. To interface tap2a452941-0b of vm d1bd1a84-b479-4897-a6c4-4dce7c4c8f4d
  • Get route details from a controller
	$ contrail-introspect-cli controller-route controller-1.example.com default-domain:openstack:public:public  -s 145 -l
	Prefix 8.8.8.145/32
	        Protocol	Nexthop      	Peers        	MPLS label
	        XMPP    	d-ocnclc-002w	d-ocnclc-002w	18        
	        BGP     	d-ocnclc-002w	d-octclc-0001	18        
	        XMPP    	d-ocnclc-000r	d-ocnclc-000r	21        

contrail-introspect-cli's People

Contributors

eonpatapon avatar lebauce avatar nlewo avatar rasta-rocket avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.