Explorar el Código

FD3-790 action migration and dhcp host command updated

Guillermo Espinoza hace 6 años
padre
commit
972f2cf6f2

+ 2 - 4
app/DoctrineMigrations/src/action.yml

@@ -2,11 +2,9 @@ insertorupdate:
     action:
         -
           id: 1
-          name: "Create DHCP Host"
-          workflow_name: "cablemodem_workflow"
+          name: "Create | Update DHCP Host"
           object_class: "CablemodemBundle\\Entity\\Cablemodem"
-          event: "a:1:{i:0;s:5:\"enter\";}"
-          event_reference: "active"
+          event: "a:2:{i:0;s:10:\"postUpdate\";i:1;s:11:\"postPersist\";}"
           template: "/opt/cablemodem/bin/console dhcp:host:crud {{ object.mac }}"
           tenancy_id: 1
         -

+ 1 - 1
src/CablemodemBundle/Command/DHCPHostCRUDCommand.php

@@ -170,7 +170,7 @@ EOT
             'state' => $this->cablemodem->getAdministrativeState(),
             'fixed_address' => $fixedIP ?: null,
             'fixedIP' => $fixedIP ? true : false,
-            'mtaEnabled' => $this->cablemodem->getMtaEnabled(),
+            'mtaEnabled' => $this->cablemodem->getMtaEnabled() ?: null,
         ];
         if (isset($hostId) && ($type == 'mta' || $type == 'cpe')) {
             unset($data['mac']);