Luciano Andrade преди 7 години
родител
ревизия
fc07bcc7af

+ 5 - 3
app/DoctrineMigrations/Version20180124175322.php

@@ -15,9 +15,11 @@ class Version20180124175322 extends AbstractMigration
      */
     public function up(Schema $schema)
     {
-        $this->executeYaml(__DIR__ . "/Version20180124175322/", ".action.yml");
-        $this->executeYaml(__DIR__ . "/Version20180124175322/", ".olt_model.yml");
-        $this->executeYaml(__DIR__ . "/Version20180124175322/", ".template.yml");
+	    $files = array("action.yml",  "olt_model.yml",  "onu_model.yml",  "template.yml");
+	    foreach($files as $f){
+		$this->executeYaml(__DIR__ . "/Version20180124175322/", $f);
+	    }
+
         $this->showResult();
 
     }

Файловите разлики са ограничени, защото са твърде много
+ 2 - 2
app/DoctrineMigrations/Version20180124175322/action.yml


+ 1 - 1
app/DoctrineMigrations/Version20180124175322/olt_model.yml

@@ -19,5 +19,5 @@ INSERTORUPDATE:
       props: "NULL"
       mark: "ZTE"
       library: "OIDSBase"
-      extra_data: "{\r\n\"telnet_cmd\": \"/usr/bin/zte/telnet.py\",\r\n\"model\": \"ZTE-320\"\r\n}"
+      extra_data: "{\r\n\"telnet_cmd\": \"/usr/bin/zte/telnet.py\",\r\n\"model\": \"ZTE-C320\"\r\n}"
       tenancy_id: "1"

+ 14 - 0
app/DoctrineMigrations/Version20180124175322/onu_model.yml

@@ -0,0 +1,14 @@
+INSERTORUPDATE:
+  onumodel:
+    - id: "1"
+      name: "FiberHome-AN5506-04-b2"
+      extra_data: "{\r\n\"type\" : \"5506-04-b2\",\r\n\"telnet\": \"/tmp\"\r\n}"
+      tenancy_id: "1"
+    - id: "2"
+      name: "Fiberlink HG326UGG"
+      extra_data: "{\r\n\"type\": \"HG260\",\r\n\"telnet\": \"/tmp\"\r\n}"
+      tenancy_id: "1"
+    - id: "3"
+      name: "CDATA-FD600-701GW"
+      extra_data: "{\r\n\"type\": \"CDATA-FD600-701GW\",\r\n\"telnet\": \"/tmp\"\r\n}"
+      tenancy_id: "1"

Файловите разлики са ограничени, защото са твърде много
+ 4 - 4
app/DoctrineMigrations/Version20180124175322/template.yml


+ 1 - 1
src/FTTHBundle/EventListener/ONUSubscriber.php

@@ -115,7 +115,7 @@ class ONUSubscriber implements EventSubscriber
         $position = $onu->getPosition();
         $nap = $onu->getNap();
         if (is_null($nap)) {
-            $position = 0;
+            $position = 1;
         } else {
             $positions = [];
             $onuRepository = $this->em->getRepository(ONU::class);