Fix attribute name 40/3340/4
authorRobert Varga <rovarga@cisco.com>
Mon, 2 Dec 2013 12:50:50 +0000 (13:50 +0100)
committerRobert Varga <rovarga@cisco.com>
Mon, 2 Dec 2013 18:22:37 +0000 (19:22 +0100)
Change-Id: I65a21f59cd43beab2b9ace6d9199b1553280643d
Signed-off-by: Robert Varga <rovarga@cisco.com>
pcep/impl-config/src/main/java/org/opendaylight/controller/config/yang/pcep/impl/PCEPSessionProposalFactoryImplModule.java
pcep/impl-config/src/main/yang/pcep-impl.yang
pcep/impl-config/src/test/java/org/opendaylight/controller/config/yang/pcep/impl/PCEPDispatcherImplModuleTest.java
pcep/impl-config/src/test/java/org/opendaylight/controller/config/yang/pcep/impl/PCEPSessionProposalFactoryImplModuleTest.java
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/PCEPSessionProposalFactoryImpl.java
pcep/testtool/src/main/java/org/opendaylight/protocol/pcep/testtool/Main.java

index 2c56961205703707de7fc30589183d1e4e412c62..d3ed0dcc15fefc9c923d0c07e99c02b9ace59b5d 100644 (file)
@@ -19,25 +19,25 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
-*
-*/
+ *
+ */
 public final class PCEPSessionProposalFactoryImplModule
-               extends
-               org.opendaylight.controller.config.yang.pcep.impl.AbstractPCEPSessionProposalFactoryImplModule {
-       
+extends
+org.opendaylight.controller.config.yang.pcep.impl.AbstractPCEPSessionProposalFactoryImplModule {
+
        private static final Logger LOG = LoggerFactory.getLogger(PCEPSessionProposalFactoryImplModule.class);
 
        public PCEPSessionProposalFactoryImplModule(
-                       org.opendaylight.controller.config.api.ModuleIdentifier name,
-                       org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+                       final org.opendaylight.controller.config.api.ModuleIdentifier name,
+                       final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
                super(name, dependencyResolver);
        }
 
        public PCEPSessionProposalFactoryImplModule(
-                       org.opendaylight.controller.config.api.ModuleIdentifier name,
-                       org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-                       PCEPSessionProposalFactoryImplModule oldModule,
-                       java.lang.AutoCloseable oldInstance) {
+                       final org.opendaylight.controller.config.api.ModuleIdentifier name,
+                       final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
+                       final PCEPSessionProposalFactoryImplModule oldModule,
+                       final java.lang.AutoCloseable oldInstance) {
                super(name, dependencyResolver, oldModule, oldInstance);
        }
 
@@ -48,10 +48,8 @@ public final class PCEPSessionProposalFactoryImplModule
                                "value is not set.", activeJmxAttribute);
                JmxAttributeValidationException.checkNotNull(getVersioned(),
                                "value is not set.", versionedJmxAttribute);
-               JmxAttributeValidationException.checkNotNull(getTimeout(),
-                               "value is not set.", timeoutJmxAttribute);
-               JmxAttributeValidationException.checkNotNull(getInstantiated(),
-                               "value is not set.", instantiatedJmxAttribute);
+               JmxAttributeValidationException.checkNotNull(getInitiated(),
+                               "value is not set.", initiatedJmxAttribute);
                JmxAttributeValidationException.checkNotNull(getDeadTimerValue(),
                                "value is not set.", deadTimerValueJmxAttribute);
                JmxAttributeValidationException.checkNotNull(getKeepAliveTimerValue(),
@@ -64,8 +62,7 @@ public final class PCEPSessionProposalFactoryImplModule
                                LOG.warn("DeadTimerValue should be 4 times greater than KeepAliveTimerValue");
                        }
                }
-               if ((getActive() || getVersioned() || getTimeout() > 0)
-                               && !getStateful()) {
+               if ((getActive() || getVersioned())     && !getStateful()) {
                        setStateful(true);
                }
                JmxAttributeValidationException.checkNotNull(getStateful(),
@@ -76,17 +73,17 @@ public final class PCEPSessionProposalFactoryImplModule
        public java.lang.AutoCloseable createInstance() {
                PCEPSessionProposalFactoryImpl inner = new PCEPSessionProposalFactoryImpl(
                                getDeadTimerValue(), getKeepAliveTimerValue(), getStateful(),
-                               getActive(), getVersioned(), getInstantiated(), getTimeout());
+                               getActive(), getVersioned(), getInitiated());
                return new PCEPSessionProposalFactoryCloseable(inner);
        }
 
        private static final class PCEPSessionProposalFactoryCloseable implements
-                       PCEPSessionProposalFactory, AutoCloseable {
+       PCEPSessionProposalFactory, AutoCloseable {
 
-               private PCEPSessionProposalFactoryImpl inner;
+               private final PCEPSessionProposalFactoryImpl inner;
 
                public PCEPSessionProposalFactoryCloseable(
-                               PCEPSessionProposalFactoryImpl inner) {
+                               final PCEPSessionProposalFactoryImpl inner) {
                        this.inner = inner;
                }
 
@@ -95,8 +92,8 @@ public final class PCEPSessionProposalFactoryImplModule
                }
 
                @Override
-               public Open getSessionProposal(InetSocketAddress inetSocketAddress,
-                               int i) {
+               public Open getSessionProposal(final InetSocketAddress inetSocketAddress,
+                               final int i) {
                        return inner.getSessionProposal(inetSocketAddress, i);
                }
        }
index 7e4a027618eef998c95c0df1b3a693d1bcbfb82c..a82579cc4d42ba731afbfbf4fbb21447bf0527b8 100644 (file)
@@ -18,13 +18,13 @@ module pcep-impl {
          PCEP implementation.
 
         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";
+        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-06-27" {
+    revision "2013-06-27" {
         description
             "Updated revision dates for imports.";
     }
@@ -40,33 +40,33 @@ module pcep-impl {
         config:java-name-prefix PCEPDispatcherImpl;
     }
 
-       augment "/config:modules/config:module/config:configuration" {
-               case pcep-dispatcher-impl {
-                       when "/config:modules/config:module/config:type = 'pcep-dispatcher-impl'";
-
-                       leaf max-unknown-messages {
-                               type uint16;
-                       }
-
-                       container extensions {
-                               uses config:service-ref {
-                                       refine type {
-                                               mandatory true;
-                                               config:required-identity spi:consumer-extensions;
-                                       }
-                               }
-                       }
-
-                       container pcep-session-proposal-factory {
-                               uses config:service-ref {
-                                       refine type {
-                                               mandatory true;
-                                               config:required-identity pcep:pcep-session-proposal-factory;
-                                       }
-                               }
-                       }
-                       
-                       container boss-group {
+    augment "/config:modules/config:module/config:configuration" {
+        case pcep-dispatcher-impl {
+            when "/config:modules/config:module/config:type = 'pcep-dispatcher-impl'";
+
+            leaf max-unknown-messages {
+                type uint16;
+            }
+
+            container extensions {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity spi:consumer-extensions;
+                    }
+                }
+            }
+
+            container pcep-session-proposal-factory {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity pcep:pcep-session-proposal-factory;
+                    }
+                }
+            }
+
+            container boss-group {
                 uses config:service-ref {
                     refine type {
                         mandatory true;
@@ -74,7 +74,7 @@ module pcep-impl {
                     }
                 }
             }
-            
+
             container worker-group {
                 uses config:service-ref {
                     refine type {
@@ -83,7 +83,7 @@ module pcep-impl {
                     }
                 }
             }
-            
+
             container timer {
                 uses config:service-ref {
                     refine type {
@@ -95,47 +95,47 @@ module pcep-impl {
         }
     }
 
-       identity pcep-session-proposal-factory-impl {
+       identity pcep-session-proposal-factory-impl {
         base config:module-type;
         config:java-name-prefix "PCEPSessionProposalFactoryImpl";
         config:provided-service pcep:pcep-session-proposal-factory;
     }
 
-       augment "/config:modules/config:module/config:configuration" {
-               case pcep-session-proposal-factory-impl {
-                       when "/config:modules/config:module/config:type = 'pcep-session-proposal-factory-impl'";
-
+    augment "/config:modules/config:module/config:configuration" {
+        case pcep-session-proposal-factory-impl {
+            when "/config:modules/config:module/config:type = 'pcep-session-proposal-factory-impl'";
 
-                       leaf dead-timer-value {
-                               type uint16;
-                               default 120;
-                       }
 
-                       leaf keep-alive-timer-value {
-                               type uint16;
-                               default 30;
-                       }
+            leaf dead-timer-value {
+                type uint16;
+                default 120;
+            }
 
-                       leaf instantiated {
-                               type boolean;
-                       }
+            leaf keep-alive-timer-value {
+                type uint16;
+                default 30;
+            }
 
-                       leaf timeout {
-                               type uint16;
-                       }
+            leaf initiated {
+                type boolean;
+                default false;
+            }
 
-                       leaf stateful {
-                               type boolean;
-                       }
+            leaf stateful {
+                type boolean;
+                default true;
+            }
 
-                       leaf active {
-                               type boolean;
-                       }
+            leaf active {
+                type boolean;
+                default true;
+            }
 
-                       leaf versioned {
-                               type boolean;
-                       }
-               }
-       }
+            leaf versioned {
+                type boolean;
+                default false;
+            }
+        }
+    }
 }
 
index 556c905f6bfada986e6eb9fda120f84237688f5d..9d8c6093fbc60ac60cee31a85417a84f47c6472a 100644 (file)
@@ -104,7 +104,7 @@ public class PCEPDispatcherImplModuleTest extends AbstractConfigTest {
 
        @Test
        public void testReusingOldInstance() throws InstanceAlreadyExistsException,
-                       ConflictingVersionException, ValidationException {
+       ConflictingVersionException, ValidationException {
                ConfigTransactionJMXClient transaction = configRegistryClient
                                .createTransaction();
                createInstance(transaction, this.factory.getImplementationName(),
@@ -122,8 +122,8 @@ public class PCEPDispatcherImplModuleTest extends AbstractConfigTest {
 
        @Test
        public void testReconfigure() throws InstanceAlreadyExistsException,
-                       ConflictingVersionException, ValidationException,
-                       InstanceNotFoundException {
+       ConflictingVersionException, ValidationException,
+       InstanceNotFoundException {
                ConfigTransactionJMXClient transaction = configRegistryClient
                                .createTransaction();
                createInstance(transaction, this.factory.getImplementationName(),
@@ -137,7 +137,7 @@ public class PCEPDispatcherImplModuleTest extends AbstractConfigTest {
                PCEPDispatcherImplModuleMXBean mxBean = transaction.newMBeanProxy(
                                transaction.lookupConfigBean(
                                                this.factory.getImplementationName(), instanceName),
-                               PCEPDispatcherImplModuleMXBean.class);
+                                               PCEPDispatcherImplModuleMXBean.class);
                mxBean.setMaxUnknownMessages(10);
                CommitStatus status = transaction.commit();
                assertBeanCount(1, factory.getImplementationName());
@@ -151,14 +151,14 @@ public class PCEPDispatcherImplModuleTest extends AbstractConfigTest {
                        final String sessionFactoryImplName,
                        final String threadGroupFactoryImplName,
                        final String extensionsImplName, final String timerFactoryImplName)
-                       throws InstanceAlreadyExistsException {
+                                       throws InstanceAlreadyExistsException {
                ObjectName nameCreated = transaction.createModule(moduleName,
                                instanceName);
                PCEPDispatcherImplModuleMXBean mxBean = transaction.newMBeanProxy(
                                nameCreated, PCEPDispatcherImplModuleMXBean.class);
                mxBean.setPcepSessionProposalFactory(PCEPSessionProposalFactoryImplModuleTest
                                .createInstance(transaction, sessionFactoryImplName,
-                                               "pcep-proposal", 0, 0, true, true, true, true, 1000));
+                                               "pcep-proposal", 0, 0, true, true, true, true));
                mxBean.setMaxUnknownMessages(maxUnknownMessages);
                mxBean.setBossGroup(createThreadGroupInstance(transaction,
                                threadGroupFactoryImplName, "boss-group", 10));
@@ -174,7 +174,7 @@ public class PCEPDispatcherImplModuleTest extends AbstractConfigTest {
        public static ObjectName createExtensionsInstance(
                        final ConfigTransactionJMXClient transaction,
                        final String moduleName, final String instanceName)
-                       throws InstanceAlreadyExistsException {
+                                       throws InstanceAlreadyExistsException {
                ObjectName nameCreated = transaction.createModule(moduleName,
                                instanceName);
                transaction.newMBeanProxy(nameCreated,
@@ -198,7 +198,7 @@ public class PCEPDispatcherImplModuleTest extends AbstractConfigTest {
        public static ObjectName createTimerInstance(
                        final ConfigTransactionJMXClient transaction,
                        final String moduleName, final String instanceName)
-                       throws InstanceAlreadyExistsException {
+                                       throws InstanceAlreadyExistsException {
                ObjectName nameCreated = transaction.createModule(moduleName,
                                instanceName);
                transaction.newMBeanProxy(nameCreated,
index a177e2a7a226d39384965389b5ad9b9fad7b7452..31d7116e6546764cee495ead9678af0516d5c594 100644 (file)
@@ -17,7 +17,7 @@ import org.opendaylight.controller.config.manager.impl.factoriesresolver.Hardcod
 import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;
 
 public class PCEPSessionProposalFactoryImplModuleTest extends
-               AbstractConfigTest {
+AbstractConfigTest {
 
        private final String instanceName = "pcep-proposal";
 
@@ -37,7 +37,7 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                        ConfigTransactionJMXClient transaction = configRegistryClient
                                        .createTransaction();
                        createInstance(transaction, this.factory.getImplementationName(),
-                                       instanceName, null, 100, true, true, true, true, 1000);
+                                       instanceName, null, 100, true, true, true, true);
                        transaction.validateConfig();
                        fail();
                } catch (ValidationException e) {
@@ -53,7 +53,7 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                        ConfigTransactionJMXClient transaction = configRegistryClient
                                        .createTransaction();
                        createInstance(transaction, this.factory.getImplementationName(),
-                                       instanceName, 400, null, true, true, true, true, 1000);
+                                       instanceName, 400, null, true, true, true, true);
                        transaction.validateConfig();
                        fail();
                } catch (ValidationException e) {
@@ -69,7 +69,7 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                        ConfigTransactionJMXClient transaction = configRegistryClient
                                        .createTransaction();
                        createInstance(transaction, this.factory.getImplementationName(),
-                                       instanceName, 400, 100, null, false, false, false, -1);
+                                       instanceName, 400, 100, null, false, false, false);
                        transaction.validateConfig();
                        fail();
                } catch (ValidationException e) {
@@ -84,7 +84,7 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                        ConfigTransactionJMXClient transaction = configRegistryClient
                                        .createTransaction();
                        createInstance(transaction, this.factory.getImplementationName(),
-                                       instanceName, 400, 100, true, null, true, true, 1000);
+                                       instanceName, 400, 100, true, null, true, true);
                        transaction.validateConfig();
                        fail();
                } catch (ValidationException e) {
@@ -99,7 +99,7 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                        ConfigTransactionJMXClient transaction = configRegistryClient
                                        .createTransaction();
                        createInstance(transaction, this.factory.getImplementationName(),
-                                       instanceName, 400, 100, true, true, null, true, 1000);
+                                       instanceName, 400, 100, true, true, null, true);
                        transaction.validateConfig();
                        fail();
                } catch (ValidationException e) {
@@ -114,26 +114,11 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                        ConfigTransactionJMXClient transaction = configRegistryClient
                                        .createTransaction();
                        createInstance(transaction, this.factory.getImplementationName(),
-                                       instanceName, 400, 100, true, true, true, null, 1000);
+                                       instanceName, 400, 100, true, true, true, null);
                        transaction.validateConfig();
                        fail();
                } catch (ValidationException e) {
-                       assertTrue(e.getMessage().contains("Instantiated value is not set"));
-               }
-       }
-
-       @Test
-       public void testValidationExceptionTimeoutNotSet()
-                       throws InstanceAlreadyExistsException {
-               try {
-                       ConfigTransactionJMXClient transaction = configRegistryClient
-                                       .createTransaction();
-                       createInstance(transaction, this.factory.getImplementationName(),
-                                       instanceName, 400, 100, true, true, true, true, null);
-                       transaction.validateConfig();
-                       fail();
-               } catch (ValidationException e) {
-                       assertTrue(e.getMessage().contains("Timeout value is not set"));
+                       assertTrue(e.getMessage().contains("Initiated value is not set"));
                }
        }
 
@@ -144,7 +129,7 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                        ConfigTransactionJMXClient transaction = configRegistryClient
                                        .createTransaction();
                        createInstance(transaction, this.factory.getImplementationName(),
-                                       instanceName, 400, -10, true, true, true, true, 1000);
+                                       instanceName, 400, -10, true, true, true, true);
                        transaction.validateConfig();
                        fail();
                } catch (ValidationException e) {
@@ -158,17 +143,17 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                ConfigTransactionJMXClient transaction = configRegistryClient
                                .createTransaction();
                createInstance(transaction, this.factory.getImplementationName(),
-                               instanceName, 400, 100, false, true, true, true, 1000);
+                               instanceName, 400, 100, false, true, true, true);
                transaction.validateConfig();
                transaction.commit();
                transaction = configRegistryClient.createTransaction();
                PCEPSessionProposalFactoryImplModuleMXBean mxBean = transaction
                                .newMBeanProxy(
                                                transaction
-                                                               .lookupConfigBean(
-                                                                               AbstractPCEPSessionProposalFactoryImplModuleFactory.NAME,
-                                                                               instanceName),
-                                               PCEPSessionProposalFactoryImplModuleMXBean.class);
+                                               .lookupConfigBean(
+                                                               AbstractPCEPSessionProposalFactoryImplModuleFactory.NAME,
+                                                               instanceName),
+                                                               PCEPSessionProposalFactoryImplModuleMXBean.class);
                assertTrue(mxBean.getStateful());
        }
 
@@ -177,7 +162,7 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                ConfigTransactionJMXClient transaction = configRegistryClient
                                .createTransaction();
                createInstance(transaction, this.factory.getImplementationName(),
-                               instanceName, 0, 0, true, true, true, true, 1000);
+                               instanceName, 0, 0, true, true, true, true);
                transaction.validateConfig();
                CommitStatus status = transaction.commit();
                assertBeanCount(1, factory.getImplementationName());
@@ -186,11 +171,11 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
 
        @Test
        public void testReusingOldInstance() throws InstanceAlreadyExistsException,
-                       ConflictingVersionException, ValidationException {
+       ConflictingVersionException, ValidationException {
                ConfigTransactionJMXClient transaction = configRegistryClient
                                .createTransaction();
                createInstance(transaction, this.factory.getImplementationName(),
-                               instanceName, 400, 100, true, true, true, true, 1000);
+                               instanceName, 400, 100, true, true, true, true);
                transaction.commit();
                transaction = configRegistryClient.createTransaction();
                assertBeanCount(1, factory.getImplementationName());
@@ -201,26 +186,25 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
 
        @Test
        public void testReconfigure() throws InstanceAlreadyExistsException,
-                       ConflictingVersionException, ValidationException,
-                       InstanceNotFoundException {
+       ConflictingVersionException, ValidationException,
+       InstanceNotFoundException {
                ConfigTransactionJMXClient transaction = configRegistryClient
                                .createTransaction();
                createInstance(transaction, this.factory.getImplementationName(),
-                               instanceName, 400, 100, true, true, true, true, 1000);
+                               instanceName, 400, 100, true, true, true, true);
                transaction.commit();
                transaction = configRegistryClient.createTransaction();
                assertBeanCount(1, factory.getImplementationName());
                PCEPSessionProposalFactoryImplModuleMXBean mxBean = transaction
                                .newMBeanProxy(
                                                transaction
-                                                               .lookupConfigBean(
-                                                                               AbstractPCEPSessionProposalFactoryImplModuleFactory.NAME,
-                                                                               instanceName),
-                                               PCEPSessionProposalFactoryImplModuleMXBean.class);
-               mxBean.setTimeout(200);
+                                               .lookupConfigBean(
+                                                               AbstractPCEPSessionProposalFactoryImplModuleFactory.NAME,
+                                                               instanceName),
+                                                               PCEPSessionProposalFactoryImplModuleMXBean.class);
                CommitStatus status = transaction.commit();
                assertBeanCount(1, factory.getImplementationName());
-               assertStatus(status, 0, 1, 0);
+               assertStatus(status, 0, 0, 1);
        }
 
        public static ObjectName createInstance(
@@ -228,8 +212,7 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                        final String moduleName, final String instanceName,
                        final Integer deadTimer, final Integer keepAlive,
                        final Boolean stateful, final Boolean active,
-                       final Boolean versioned, final Boolean instant,
-                       final Integer timeout) throws InstanceAlreadyExistsException {
+                       final Boolean versioned, final Boolean instant) throws InstanceAlreadyExistsException {
                ObjectName nameCreated = transaction.createModule(moduleName,
                                instanceName);
                PCEPSessionProposalFactoryImplModuleMXBean mxBean = transaction
@@ -237,10 +220,9 @@ public class PCEPSessionProposalFactoryImplModuleTest extends
                                                PCEPSessionProposalFactoryImplModuleMXBean.class);
                mxBean.setActive(active);
                mxBean.setDeadTimerValue(deadTimer);
-               mxBean.setInstantiated(instant);
+               mxBean.setInitiated(instant);
                mxBean.setKeepAliveTimerValue(keepAlive);
                mxBean.setStateful(stateful);
-               mxBean.setTimeout(timeout);
                mxBean.setVersioned(versioned);
                return nameCreated;
        }
index b0784a526e905e8930d46f41069d0435e3ce9b61..e0b01b230287ef044a9453d1f9079b7030b92030 100644 (file)
@@ -20,19 +20,18 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.typ
 
 public class PCEPSessionProposalFactoryImpl implements PCEPSessionProposalFactory {
 
-       private final int keepAlive, deadTimer, timeout;
+       private final int keepAlive, deadTimer;
 
        private final boolean stateful, active, versioned, instant;
 
        public PCEPSessionProposalFactoryImpl(final int deadTimer, final int keepAlive, final boolean stateful, final boolean active,
-                       final boolean versioned, final boolean instant, final int timeout) {
+                       final boolean versioned, final boolean instant) {
                this.deadTimer = deadTimer;
                this.keepAlive = keepAlive;
                this.stateful = stateful;
                this.active = active;
                this.versioned = versioned;
                this.instant = instant;
-               this.timeout = timeout;
        }
 
        @Override
@@ -80,7 +79,4 @@ public class PCEPSessionProposalFactoryImpl implements PCEPSessionProposalFactor
                return this.instant;
        }
 
-       public int getTimeout() {
-               return this.timeout;
-       }
 }
index f0fec59f72cf884c3d3c735c407bb9f261c684b9..6106a0a6cdb406fa5f54319301656ebcaea8e934 100644 (file)
@@ -80,7 +80,6 @@ public final class Main {
                boolean active = false;
                boolean versioned = false;
                boolean instant = false;
-               int timeout = 0;
 
                int i = 0;
                while (i < args.length) {
@@ -105,12 +104,6 @@ public final class Main {
                        } else if (args[i].equalsIgnoreCase("--instant")) {
                                stateful = true;
                                instant = true;
-                               if (i == args.length - 1) {
-                                       timeout = 0;
-                               } else if (Integer.valueOf(args[i + 1]) > 0 && Integer.valueOf(args[i + 1]) < Integer.MAX_VALUE) {
-                                       timeout = Integer.valueOf(args[i + 1]);
-                                       i++;
-                               }
                        } else {
                                LOG.warn("WARNING: Unrecognized argument: {}", args[i]);
                        }
@@ -123,7 +116,7 @@ public final class Main {
                        deadTimerValue = keepAliveValue * 4;
                }
 
-               final PCEPSessionProposalFactory spf = new PCEPSessionProposalFactoryImpl(deadTimerValue, keepAliveValue, stateful, active, versioned, instant, timeout);
+               final PCEPSessionProposalFactory spf = new PCEPSessionProposalFactoryImpl(deadTimerValue, keepAliveValue, stateful, active, versioned, instant);
 
                final Open prefs = spf.getSessionProposal(address, 0);