Browse Source

Merge remote-tracking branch 'origin/master' into luciano

Luciano Andrade 8 years ago
parent
commit
d07051dfcb

+ 4 - 4
composer.lock

@@ -12,7 +12,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/BaseAdmin.git",
-                "reference": "c19d0927d0cd68a8292ced037384ae2d47fc3532"
+                "reference": "99f21f03eeade4f8498ac2a7ee106ada60aef429"
             },
             "type": "library",
             "autoload": {
@@ -27,7 +27,7 @@
                 "bootstrap",
                 "sonata"
             ],
-            "time": "2017-04-11 18:26:12"
+            "time": "2017-04-12 12:42:01"
         },
         {
             "name": "behat/transliterator",
@@ -1333,7 +1333,7 @@
             "source": {
                 "type": "git",
                 "url": "ssh://git@200.50.168.30:222/VendorSoftwareFlowdat3/WorkflowBundle.git",
-                "reference": "a3ea2e38975c6ac320299f30f469e2015a8c24b3"
+                "reference": "ade8225852429e2ada5ae607d1777073d30ff9c0"
             },
             "require": {
                 "php-amqplib/rabbitmq-bundle": "^1.12"
@@ -1363,7 +1363,7 @@
                 "bundle",
                 "workflow"
             ],
-            "time": "2017-04-11 15:38:06"
+            "time": "2017-04-12 16:06:14"
         },
         {
             "name": "incenteev/composer-parameter-handler",

+ 23 - 21
src/FTTHBundle/Admin/OLTAdmin.php

@@ -19,12 +19,12 @@ class OLTAdmin extends BaseAdmin
             ->add('name')
             ->add('mark')
             ->add('ip')
-            ->add('snmp_community')
-            ->add('ssh_user')
-            ->add('ssh_pass')
+            ->add('snmpCommunity')
+            ->add('sshUser')
+            ->add('sshPass')
             ->add('firmware')
-            ->add('library_version')
-            ->add('execute_snmp')
+            ->add('libraryVersion')
+            ->add('executeSnmp')
             ->add('model')
         ;
     }
@@ -38,13 +38,15 @@ class OLTAdmin extends BaseAdmin
             ->add('name')
             ->add('mark')
             ->add('ip')
-            ->add('snmp_community')
-            ->add('ssh_user')
-            ->add('ssh_pass')
-            ->add('firmware')
-            ->add('library_version')
-            ->add('execute_snmp')
+            ->add('snmpCommunity')
+            ->add('sshUser')
+            ->add('sshPass')
+            // ->add('firmware')
+            // ->add('libraryVersion')
+            ->add('executeSnmp')
             ->add('model')
+            ->add('workflow')
+            ->add('currentState')
             ->add('_action', null, array(
                 'actions' => array(
                     'show' => array(),
@@ -64,12 +66,12 @@ class OLTAdmin extends BaseAdmin
             ->add('name')
             ->add('mark')
             ->add('ip')
-            ->add('snmp_community')
-            ->add('ssh_user')
-            ->add('ssh_pass')
+            ->add('snmpCommunity')
+            ->add('sshUser')
+            ->add('sshPass')
             ->add('firmware')
-            ->add('library_version')
-            ->add('execute_snmp')
+            ->add('libraryVersion')
+            ->add('executeSnmp')
             ->add('model')
         ;
     }
@@ -83,12 +85,12 @@ class OLTAdmin extends BaseAdmin
             ->add('name')
             ->add('mark')
             ->add('ip')
-            ->add('snmp_community')
-            ->add('ssh_user')
-            ->add('ssh_pass')
+            ->add('snmpCommunity')
+            ->add('sshUser')
+            ->add('sshPass')
             ->add('firmware')
-            ->add('library_version')
-            ->add('execute_snmp')
+            ->add('libraryVersion')
+            ->add('executeSnmp')
             ->add('model')
         ;
     }

+ 4 - 0
src/FTTHBundle/Admin/OLTModelAdmin.php

@@ -17,6 +17,7 @@ class OLTModelAdmin extends BaseAdmin
     {
         $datagridMapper
             ->add('name')
+            ->add('workflow')
         ;
     }
 
@@ -27,6 +28,7 @@ class OLTModelAdmin extends BaseAdmin
     {
         $listMapper
             ->add('name')
+            ->add('workflow')
             ->add('_action', null, array(
                 'actions' => array(
                     'show' => array(),
@@ -44,6 +46,7 @@ class OLTModelAdmin extends BaseAdmin
     {
         $formMapper
             ->add('name')
+            ->add('workflow')
         ;
     }
 
@@ -54,6 +57,7 @@ class OLTModelAdmin extends BaseAdmin
     {
         $showMapper
             ->add('name')
+            ->add('workflow')
         ;
     }
 }

+ 33 - 32
src/FTTHBundle/Entity/OLT.php

@@ -45,25 +45,25 @@ class OLT
     protected $ip;
 
     /**
-     * @var string $snmp_community
+     * @var string $snmpCommunity
      *
      * @ORM\Column(type="string", length=255, nullable=true, unique=false)
      */
-    protected $snmp_community;
+    protected $snmpCommunity;
 
     /**
-     * @var string $ssh_user
+     * @var string $sshUser
      *
      * @ORM\Column(type="string", length=255, nullable=true, unique=false)
      */
-    protected $ssh_user;
+    protected $sshUser;
 
     /**
-     * @var string $ssh_pass
+     * @var string $sshPass
      *
      * @ORM\Column(type="string", length=255, nullable=true, unique=false)
      */
-    protected $ssh_pass;
+    protected $sshPass;
 
     /**
      * @var string $firmware
@@ -73,21 +73,22 @@ class OLT
     protected $firmware;
 
     /**
-     * @var string $library_version
+     * @var string $libraryVersion
      *
      * @ORM\Column(type="string", length=255, nullable=true, unique=false)
      */
-    protected $library_version;
+    protected $libraryVersion;
 
     /**
-     * @var boolean $execute_snmp
+     * @var boolean $executeSnmp
      * 
      * @ORM\Column(type="boolean", nullable=true, options={"default":true})
      */
-    protected $execute_snmp = true;
+    protected $executeSnmp = true;
     
     /**
      * @ORM\ManyToOne(targetEntity="OLTModel", inversedBy="olts", fetch="EXTRA_LAZY")
+     * @ORM\JoinColumn(name="model_id", referencedColumnName="id", onDelete="SET NULL")
      */
     protected $model;
 
@@ -149,7 +150,7 @@ class OLT
      */
     public function getSnmpCommunity()
     {
-        return $this->snmp_community;
+        return $this->snmpCommunity;
     }
 
     /**
@@ -157,7 +158,7 @@ class OLT
      */
     public function getSshUser()
     {
-        return $this->ssh_user;
+        return $this->sshUser;
     }
 
     /**
@@ -165,7 +166,7 @@ class OLT
      */
     public function getSshPass()
     {
-        return $this->ssh_pass;
+        return $this->sshPass;
     }
 
     /**
@@ -181,7 +182,7 @@ class OLT
      */
     public function getLibraryVersion()
     {
-        return $this->library_version;
+        return $this->libraryVersion;
     }
 
     /**
@@ -189,7 +190,7 @@ class OLT
      */
     public function getExecuteSnmp()
     {
-        return $this->execute_snmp;
+        return $this->executeSnmp;
     }
 
     /**
@@ -234,34 +235,34 @@ class OLT
     }
 
     /**
-     * @param string $snmp_community
+     * @param string $snmpCommunity
      * @return $this
      */
-    public function setSnmpCommunity($snmp_community)
+    public function setSnmpCommunity($snmpCommunity)
     {
-        $this->snmp_community = $snmp_community;
+        $this->snmpCommunity = $snmpCommunity;
 
         return $this;
     }
 
     /**
-     * @param string $ssh_user
+     * @param string $sshUser
      * @return $this
      */
-    public function setSshUser($ssh_user)
+    public function setSshUser($sshUser)
     {
-        $this->ssh_user = $ssh_user;
+        $this->sshUser = $sshUser;
 
         return $this;
     }
 
     /**
-     * @param string $ssh_pass
+     * @param string $sshPass
      * @return $this
      */
-    public function setSshPass($ssh_pass)
+    public function setSshPass($sshPass)
     {
-        $this->ssh_pass = $ssh_pass;
+        $this->sshPass = $sshPass;
 
         return $this;
     }
@@ -278,23 +279,23 @@ class OLT
     }
 
     /**
-     * @param string $library_version
+     * @param string $libraryVersion
      * @return $this
      */
-    public function setLibraryVersion($library_version)
+    public function setLibraryVersion($libraryVersion)
     {
-        $this->library_version = $library_version;
+        $this->libraryVersion = $libraryVersion;
 
         return $this;
     }
 
     /**
-     * @param boolean $execute_snmp
+     * @param boolean $executeSnmp
      * @return $this
      */
-    public function setExecuteSnmp($execute_snmp)
+    public function setExecuteSnmp($executeSnmp)
     {
-        $this->execute_snmp = $execute_snmp;
+        $this->executeSnmp = $executeSnmp;
 
         return $this;
     }
@@ -368,7 +369,7 @@ class OLT
             }
         }
         
-        return "onu_state";
+        return null;
     }
     
     public function getWorkflowType() 
@@ -380,7 +381,7 @@ class OLT
             }
         }
         
-        return "state_machine";
+        return null;
     }
 
 }

+ 25 - 0
src/FTTHBundle/Entity/OLTModel.php

@@ -34,6 +34,12 @@ class OLTModel
      */
     protected $olts;
 
+    /**
+     * @ORM\ManyToOne(targetEntity="\WorkflowBundle\Entity\Workflow", fetch="EXTRA_LAZY")
+     * @ORM\JoinColumn(name="workflow_id", referencedColumnName="id", onDelete="SET NULL")
+     */
+    protected $workflow;
+
 
     /**
      * @return string
@@ -103,4 +109,23 @@ class OLTModel
         return $this->olts;
     }
 
+    /**
+     * @return OLTModel
+     */
+    public function getWorkflow()
+    {
+        return $this->workflow;
+    }
+
+    /**
+     * @param Workflow $workflow
+     * @return $this
+     */
+    public function setWorkflow($workflow)
+    {
+        $this->workflow = $workflow;
+        
+        return $this;
+    }
+
 }

+ 1 - 0
src/FTTHBundle/Entity/ONU.php

@@ -99,6 +99,7 @@ class ONU
     
     /**
      * @ORM\ManyToOne(targetEntity="ONUModel", inversedBy="onus", fetch="EXTRA_LAZY")
+     * @ORM\JoinColumn(name="model_id", referencedColumnName="id", onDelete="SET NULL")
      */
     protected $model;
     

+ 1 - 0
src/FTTHBundle/Entity/ONUModel.php

@@ -38,6 +38,7 @@ class ONUModel
 
     /**
      * @ORM\ManyToOne(targetEntity="\WorkflowBundle\Entity\Workflow", fetch="EXTRA_LAZY")
+     * @ORM\JoinColumn(name="workflow_id", referencedColumnName="id", onDelete="SET NULL")
      */
     protected $workflow;