// vi: set smarttab et sw=4 tabstop=4: module reconnect-strategy { yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:controller:reconnectstrategy"; prefix "rs"; import config { prefix config; revision-date 2013-04-05; } import threadpool { prefix th; revision-date 2013-04-09; } organization "Cisco Systems, Inc."; contact "Milos Fabian "; description "This module contains the base YANG definitions for reconnect strategy. Copyright (c)2013 Cisco Systems, Inc. All rights reserved.; This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html"; revision "2013-11-09" { description "Initial revision"; } identity reconnect-strategy { description "Service representing a reconnect strategy."; base "config:service-type"; config:java-class "org.opendaylight.protocol.framework.ReconnectStrategy"; } identity never-reconnect-strategy { base config:module-type; config:provided-service reconnect-strategy; config:java-name-prefix NeverReconnectStrategy; } augment "/config:modules/config:module/config:configuration" { case never-reconnect-strategy { when "/config:modules/config:module/config:type = 'never-reconnect-strategy'"; leaf timeout { mandatory true; type int32; } container executor { uses config:service-ref { refine type { mandatory true; config:required-identity th:netty-event-executor; } } } } } identity reconnect-immediately-strategy { base config:module-type; config:provided-service reconnect-strategy; config:java-name-prefix ReconnectImmediatelyStrategy; } augment "/config:modules/config:module/config:configuration" { case reconnect-immediately-strategy { when "/config:modules/config:module/config:type = 'reconnect-immediately-strategy'"; leaf timeout { mandatory true; type int32; } container executor { uses config:service-ref { refine type { mandatory true; config:required-identity th:netty-event-executor; } } } } } identity timed-reconnect-strategy { base config:module-type; config:provided-service reconnect-strategy; config:java-name-prefix TimedReconnectStrategy; } augment "/config:modules/config:module/config:configuration" { case timed-reconnect-strategy { when "/config:modules/config:module/config:type = 'timed-reconnect-strategy'"; leaf deadline { mandatory true; type int64; } leaf max-attempts { mandatory true; type int64; } leaf max-sleep { mandatory true; type int64; } leaf min-sleep { mandatory true; type int64; } leaf sleep-factor { mandatory true; type decimal64 { fraction-digits 2; } } leaf connect-time { mandatory true; type int32; } container executor { uses config:service-ref { refine type { mandatory true; config:required-identity th:netty-event-executor; } } } } } }