netconfcentral logo

openconfig-platform-port@2017-11-17



  module openconfig-platform-port {

    yang-version 1;

    namespace
      "http://openconfig.net/yang/platform/port";

    prefix oc-port;

    import openconfig-platform {
      prefix oc-platform;
    }
    import openconfig-if-ethernet {
      prefix oc-eth;
    }
    import openconfig-extensions {
      prefix oc-ext;
    }

    organization "OpenConfig working group";

    contact
      "OpenConfig working group
    www.openconfig.net";

    description
      "This module defines data related to PORT components in the openconfig-platform model";

    revision "2017-11-17" {
      description
        "Corrected augmentation path for port data";
      reference
        "0.2.0";

    }

    revision "2016-10-24" {
      description "Initial revision";
      reference
        "0.1.0";

    }

    oc-ext:openconfig-version "0.2.0";

    grouping port-breakout-config {
      description
        "Configuration data for the port breakout mode";
      leaf num-channels {
        type uint8;
        description
          "Sets the number of channels to 'breakout' on a port
        capable of channelization";
      }

      leaf channel-speed {
        type identityref {
          base oc-eth:ETHERNET_SPEED;
        }
        description
          "Sets the channel speed on each channel -- the
        supported values are defined by the
        ETHERNET_SPEED identity";
      }
    }  // grouping port-breakout-config

    grouping port-breakout-state {
      description
        "Operational state data for the port breakout mode ";
    }  // grouping port-breakout-state

    grouping port-breakout-top {
      description
        "Top-level grouping for port breakout data";
      container breakout-mode {
        description
          "Top-level container for port breakout data";
        container config {
          description
            "Configuration data for port breakout";
          uses port-breakout-config;
        }  // container config

        container state {
          config false;
          description
            "Operational state data for port breakout";
          uses port-breakout-config;

          uses port-breakout-state;
        }  // container state
      }  // container breakout-mode
    }  // grouping port-breakout-top

    augment /oc-platform:components/oc-platform:component/oc-platform:port {
      description
        "Adding port breakout data to physical platform data";
      uses port-breakout-top {
        when "./state/type = 'PORT'" {
          description
            "This data is valid only for PORT components";
        }
      }
    }
  }  // module openconfig-platform-port