|
@@ -44,6 +44,7 @@ class SubNet implements TenancyIdTraitInterface, WorkflowInterface
|
|
|
* @ORM\Column(type="string", length=100, unique=true)
|
|
|
*
|
|
|
* @Assert\Regex(pattern="/^[ A-Za-z0-9_\-ñÑ:.\/]+$/")
|
|
|
+ * @Assert\NotBlank
|
|
|
*/
|
|
|
protected $address;
|
|
|
|
|
@@ -52,6 +53,8 @@ class SubNet implements TenancyIdTraitInterface, WorkflowInterface
|
|
|
*
|
|
|
* @ORM\ManyToOne(targetEntity="HostBundle\Entity\HostType")
|
|
|
* @ORM\JoinColumn(onDelete="CASCADE")
|
|
|
+ *
|
|
|
+ * @Assert\NotNull
|
|
|
*/
|
|
|
protected $allowedHostType;
|
|
|
|
|
@@ -67,6 +70,8 @@ class SubNet implements TenancyIdTraitInterface, WorkflowInterface
|
|
|
*
|
|
|
* @ORM\ManyToOne(targetEntity="NetGroup", inversedBy="subNets")
|
|
|
* @ORM\JoinColumn(onDelete="CASCADE")
|
|
|
+ *
|
|
|
+ * @Assert\NotNull
|
|
|
*/
|
|
|
protected $netGroup;
|
|
|
|
|
@@ -80,6 +85,7 @@ class SubNet implements TenancyIdTraitInterface, WorkflowInterface
|
|
|
/**
|
|
|
* @ORM\ManyToOne(targetEntity="\WorkflowBundle\Entity\Workflow", fetch="EXTRA_LAZY")
|
|
|
* @ORM\JoinColumn(name="workflow_id", referencedColumnName="id", onDelete="SET NULL")
|
|
|
+ *
|
|
|
* @JMS\MaxDepth(1)
|
|
|
*/
|
|
|
protected $workflow;
|
|
@@ -90,9 +96,11 @@ class SubNet implements TenancyIdTraitInterface, WorkflowInterface
|
|
|
protected $currentState = null;
|
|
|
|
|
|
/**
|
|
|
- * @ORM\Column(type="string", nullable=true)
|
|
|
+ * @ORM\Column(type="string")
|
|
|
+ *
|
|
|
+ * @Assert\NotBlank
|
|
|
*/
|
|
|
- protected $status = null;
|
|
|
+ protected $status = \HostBundle\Utils\HostStatus::STATE_ACTIVE;
|
|
|
|
|
|
|
|
|
public function __construct()
|
|
@@ -181,7 +189,7 @@ class SubNet implements TenancyIdTraitInterface, WorkflowInterface
|
|
|
*
|
|
|
* @return SubNet
|
|
|
*/
|
|
|
- public function setNetGroup(NetGroup $netGroup = null)
|
|
|
+ public function setNetGroup(NetGroup $netGroup)
|
|
|
{
|
|
|
$this->netGroup = $netGroup;
|
|
|
|