Ver Fonte

Merge branch 'ftth#94' into 'master'

Ftth#94

See merge request interlink-sa/flowdat3/modules/ftth!199
Jean Sumara Leopoldo há 4 anos atrás
pai
commit
29fef8afdd

Diff do ficheiro suprimidas por serem muito extensas
+ 4 - 4
app/DoctrineMigrations/src/action.yml


+ 3 - 0
src/FTTHBundle/Admin/OLTAdmin.php

@@ -56,6 +56,7 @@ class OLTAdmin extends WorkflowBaseAdmin
             ->add('sshConnect')
             ->add('sshPort')
             ->add('enable')
+            ->add('oltTimeout')
             ->add('backups')
             ->add('currentState','string', array('template' => 'WorkflowBundle:Workflow:base_list_field_current_state.html.twig'))
             ->add('_action', 'with-workflow-action', array(
@@ -98,6 +99,7 @@ class OLTAdmin extends WorkflowBaseAdmin
                             'help' => 'form.help_ssh_connect',
                         ])
                         ->add('sshPort')
+                        ->add('oltTimeout')
                     ->end()
                 ->end()
                 ->tab('autodiscovery')
@@ -143,6 +145,7 @@ class OLTAdmin extends WorkflowBaseAdmin
                     ->add('enablePass')
                     ->add('sshConnect')
                     ->add('sshPort')
+                    ->add('oltTimeout')
                     ->add('enable')
                 ->end()
             ->end()

+ 24 - 0
src/FTTHBundle/Entity/OLT.php

@@ -201,6 +201,14 @@ class OLT implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
      */
     private $clientId;
 
+    /**
+     * @var int
+     *
+     * @ORM\Column(type="integer", nullable=false, options={"default": "25"})
+     *
+     */
+    private $oltTimeout;
+
     /**
      * @return string
      */
@@ -761,4 +769,20 @@ class OLT implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
         return $this;
     }
 
+    /**
+     * @return int
+     */
+    public function getOltTimeout()
+    {
+        return $this->oltTimeout;
+    }
+
+    /**
+     * @param int $oltTimeout
+     */
+    public function setOltTimeout($oltTimeout)
+    {
+        $this->oltTimeout = $oltTimeout;
+    }
+
 }

+ 3 - 0
src/FTTHBundle/Resources/translations/FTTHBundle.es.yml

@@ -180,6 +180,7 @@ form:
     label_discovery_profile: Perfíl
     label_date: Fecha
     label_radius_auth: Autenticación en Radius
+    label_olt_timeout: Timeout
 
 list:
     label_id: Id
@@ -251,6 +252,7 @@ list:
     label_log_o_l_t_status: Conf. Status
     label_log_o_l_t_date: Fecha OLT
     label_date: Fecha
+    label_olt_timeout: Timeout
 
 show:
     label_id: Id
@@ -330,6 +332,7 @@ show:
     label_log_o_l_t_date: Fecha OLT
     label_log_o_l_t_directory: Directorio log OLT
     label_date: Fecha
+    label_olt_timeout: Timeout
 
 export:
     serialNumber: Serial Number

+ 2 - 2
src/FTTHBundle/tests/ONURESTControllerTest.php

@@ -369,7 +369,7 @@ class ONURESTControllerTest extends WebTestCaseBase
         $this->getClient()->request('DELETE', $this->getUriPutDelete() . $id, $data);
         // obtengo la respuesta
         $response = $this->getClient()->getResponse();
-        $this->assertEquals(204, $response->getStatusCode(), "Error en la respuesta http.");
+        $this->assertEquals(302, $response->getStatusCode(), "Error en la respuesta http.");
     }
 
     /**
@@ -382,7 +382,7 @@ class ONURESTControllerTest extends WebTestCaseBase
     {
         $response = $this->generateGET();
         // verifco el resultado
-        $this->assertEquals(302, $response->getStatusCode(), "Error en la respuesta http.");
+        $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
         $this->assertJson($response->getContent(), "No se obtuvo un objeto json.");
     }