Skip to content

Commit

Permalink
Fix travis build (#637)
Browse files Browse the repository at this point in the history
*  Clean up tests.sh script for travis CI

   * do not use virtualenv
   * do not sudo the entire ./tests.sh
   * use sudo for individual commands
   * Add back brew python on macOS
   * Dont show too many logs
   * Fix go paths

Add back virtualenv

* temporarily comment py tests
  • Loading branch information
Abhi Keshav authored Nov 22, 2017
1 parent 78f42ed commit ff7fde2
Show file tree
Hide file tree
Showing 7 changed files with 3,820 additions and 260 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ matrix:
include:
- os: linux
dist: trusty
python: 2.7
go: 1.8
group: edge
- os: osx
Expand All @@ -21,7 +20,7 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./test/dependencies_linux.sh ; fi

script:
- sudo ./test/tests.sh
- ./test/tests.sh

after_success:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash <(curl -s https://codecov.io/bash) ; fi # Uploading python report to CodeCov
Expand Down
319 changes: 319 additions & 0 deletions sdk/cpp/core/tests/models/openconfig-if-ethernet.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,319 @@
module openconfig-if-ethernet {

yang-version "1";

// namespace
namespace "http://openconfig.net/yang/interfaces/ethernet";

prefix "oc-eth";

// import some basic types
import openconfig-interfaces { prefix oc-if; }
import iana-if-type { prefix ift; }
import ietf-yang-types { prefix yang; }
import openconfig-extensions { prefix oc-ext; }

// meta
organization "OpenConfig working group";

contact
"OpenConfig working group
netopenconfig@googlegroups.com";

description
"Model for managing Ethernet interfaces -- augments the IETF YANG
model for interfaces described by RFC 7223";

oc-ext:openconfig-version "1.0.2";

revision "2016-05-26" {
description
"OpenConfig public release";
reference "1.0.2";
}

// extension statements

// feature statements

// identity statements

identity ETHERNET_SPEED {
description "base type to specify available Ethernet link
speeds";
}

identity SPEED_10MB {
base ETHERNET_SPEED;
description "10 Mbps Ethernet";
}

identity SPEED_100MB {
base ETHERNET_SPEED;
description "100 Mbps Ethernet";
}

identity SPEED_1GB {
base ETHERNET_SPEED;
description "1 GBps Ethernet";
}

identity SPEED_10GB {
base ETHERNET_SPEED;
description "10 GBps Ethernet";
}

identity SPEED_25GB {
base ETHERNET_SPEED;
description "25 GBps Ethernet";
}

identity SPEED_40GB {
base ETHERNET_SPEED;
description "40 GBps Ethernet";
}

identity SPEED_50GB {
base ETHERNET_SPEED;
description "50 GBps Ethernet";
}

identity SPEED_100GB {
base ETHERNET_SPEED;
description "100 GBps Ethernet";
}

identity SPEED_UNKNOWN {
base ETHERNET_SPEED;
description
"Interface speed is unknown. Systems may report
speed UNKNOWN when an interface is down or unpopuplated (e.g.,
pluggable not present).";
}

// typedef statements


// grouping statements

grouping ethernet-interface-config {
description "Configuration items for Ethernet interfaces";

leaf mac-address {
type yang:mac-address;
description
"Assigns a MAC address to the Ethernet interface. If not
specified, the corresponding operational state leaf is
expected to show the system-assigned MAC address.";
}

leaf auto-negotiate {
type boolean;
default true;
description
"Set to TRUE to request the interface to auto-negotiate
transmission parameters with its peer interface. When
set to FALSE, the transmission parameters are specified
manually.";
reference
"IEEE 802.3-2012 auto-negotiation transmission parameters";
}

leaf duplex-mode {
type enumeration {
enum FULL {
description "Full duplex mode";
}
enum HALF {
description "Half duplex mode";
}
}
description
"When auto-negotiate is TRUE, this optionally sets the
duplex mode that will be advertised to the peer. If
unspecified, the interface should negotiate the duplex mode
directly (typically full-duplex). When auto-negotiate is
FALSE, this sets the duplex mode on the interface directly.";
}

leaf port-speed {
type identityref {
base ETHERNET_SPEED;
}
description
"When auto-negotiate is TRUE, this optionally sets the
port-speed mode that will be advertised to the peer for
negotiation. If unspecified, it is expected that the
interface will select the highest speed available based on
negotiation. When auto-negotiate is set to FALSE, sets the
link speed to a fixed value -- supported values are defined
by ETHERNET_SPEED identities";
}

leaf enable-flow-control {
type boolean;
default false;
description
"Enable or disable flow control for this interface.
Ethernet flow control is a mechanism by which a receiver
may send PAUSE frames to a sender to stop transmission for
a specified time.
This setting should override auto-negotiated flow control
settings. If left unspecified, and auto-negotiate is TRUE,
flow control mode is negotiated with the peer interface.";
reference
"IEEE 802.3x";
}
}

grouping ethernet-interface-state-counters {
description
"Ethernet-specific counters and statistics";

// ingress counters

leaf in-mac-control-frames {
type yang:counter64;
description
"MAC layer control frames received on the interface";
}

leaf in-mac-pause-frames {
type yang:counter64;
description
"MAC layer PAUSE frames received on the interface";
}

leaf in-oversize-frames {
type yang:counter64;
description
"Number of oversize frames received on the interface";
}

leaf in-jabber-frames {
type yang:counter64;
description
"Number of jabber frames received on the
interface. Jabber frames are typically defined as oversize
frames which also have a bad CRC. Implementations may use
slightly different definitions of what constitutes a jabber
frame. Often indicative of a NIC hardware problem.";
}

leaf in-fragment-frames {
type yang:counter64;
description
"Number of fragment frames received on the interface.";
}

leaf in-8021q-frames {
type yang:counter64;
description
"Number of 802.1q tagged frames received on the interface";
}

leaf in-crc-errors {
type yang:counter64;
description
"Number of receive error events due to FCS/CRC check
failure";
}

// egress counters

leaf out-mac-control-frames {
type yang:counter64;
description
"MAC layer control frames sent on the interface";
}

leaf out-mac-pause-frames {
type yang:counter64;
description
"MAC layer PAUSE frames sent on the interface";
}

leaf out-8021q-frames {
type yang:counter64;
description
"Number of 802.1q tagged frames sent on the interface";
}
}

grouping ethernet-interface-state {
description
"Grouping for defining Ethernet-specific operational state";

leaf hw-mac-address {
type yang:mac-address;
description
"Represenets the 'burned-in', or system-assigned, MAC
address for the Ethernet interface.";
}

leaf effective-speed {
type uint32;
units Mbps;
description
"Reports the effective speed of the interface, e.g., the
negotiated speed if auto-negotiate is enabled";
}

container counters {
description "Ethernet interface counters";

uses ethernet-interface-state-counters;

}

}

// data definition statements

grouping ethernet-top {
description "top-level Ethernet config and state containers";

container ethernet {
description
"Top-level container for ethernet configuration
and state";

container config {
description "Configuration data for ethernet interfaces";

uses ethernet-interface-config;

}

container state {

config false;
description "State variables for Ethernet interfaces";

uses ethernet-interface-config;
uses ethernet-interface-state;

}

}
}

// augment statements

augment "/oc-if:interfaces/oc-if:interface" {
/*when "oc-if:type = 'ift:ethernetCsmacd'" {
description "Additional interface configuration parameters when
the interface type is Ethernet";
}*/
description "Adds addtional Ethernet-specific configuration to
interfaces model";

uses ethernet-top;
}

// rpc statements

// notification statements

}
Loading

0 comments on commit ff7fde2

Please sign in to comment.