Ver código fonte

Entidades CablemodemBundle

Guillermo Espinoza 7 anos atrás
pai
commit
04a6e4f974

+ 1 - 0
app/AppKernel.php

@@ -42,6 +42,7 @@ class AppKernel extends Kernel
             new LeafletBundle\LeafletBundle(),
             new AuthBundle\AuthBundle(),
             new AuditBundle\AuditBundle(),
+            new CablemodemBundle\CablemodemBundle(),
         ];
 
         if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {

+ 1 - 0
app/config/config.yml

@@ -22,6 +22,7 @@ imports:
     - { resource: "bundles/ik/base-admin-bundle/parameters.yml" }
     - { resource: "bundles/ik/device-bundle/parameters.yml" }
     - { resource: "bundles/ik/webservice-bundle/parameters.yml" }
+    - { resource: "@CablemodemBundle/Resources/config/services.yml" }
 
 # Put parameters here that don't need to change on each machine where the app is deployed
 # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration

+ 5 - 0
app/config/routing.yml

@@ -1,3 +1,8 @@
+cablemodem:
+    resource: "@CablemodemBundle/Controller/"
+    type:     annotation
+    prefix:   /
+
 login:
     path: /admin/login
     defaults:

+ 1 - 1
composer.json

@@ -4,7 +4,7 @@
     "type": "project",
     "autoload": {
         "psr-4": {
-            "AppBundle\\": "src/AppBundle"
+            "": "src/"
         },
         "classmap": [
             "app/AppKernel.php",

+ 9 - 0
src/CablemodemBundle/CablemodemBundle.php

@@ -0,0 +1,9 @@
+<?php
+
+namespace CablemodemBundle;
+
+use Symfony\Component\HttpKernel\Bundle\Bundle;
+
+class CablemodemBundle extends Bundle
+{
+}

+ 182 - 0
src/CablemodemBundle/Entity/CMTS.php

@@ -0,0 +1,182 @@
+<?php
+
+namespace CablemodemBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use JMS\Serializer\Annotation as JMS;
+use Symfony\Component\Validator\Constraints as Assert;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Base\AdminBundle\Traits\TenancyIdTrait;
+use Base\AdminBundle\Traits\TenancyIdTraitInterface;
+use DeviceBundle\Interfaces\DeviceInterface;
+use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"name","tenancy_id"})})
+ * 
+ * @UniqueEntity(fields={"tenancy","name"})
+ * @UniqueEntity(fields={"host"})
+ */
+class CMTS implements DeviceInterface, TenancyIdTraitInterface
+{
+    
+    use ExtraDataTrait;
+    use TenancyIdTrait;
+    
+    /**
+     * @ORM\Column(name="id", type="bigint", nullable=false)
+     * @ORM\Id
+     * @ORM\GeneratedValue(strategy="IDENTITY")
+     */
+    protected $id;
+
+    /**
+     * @ORM\Column(type="string", length=50)
+     * 
+     * @Assert\NotNull
+     */
+    protected $name;
+
+    /**
+     * @ORM\Column(type="string", unique=true, length=50)
+     * 
+     * @Assert\NotNull
+     */
+    protected $host;
+
+    /**
+     * @ORM\Column(type="string")
+     * 
+     * @Assert\NotNull
+     */
+    protected $snmp_comunity;
+
+    /**
+     * @ORM\Column(type="integer")
+     * 
+     * @Assert\NotNull
+     */
+    protected $snmp_version;  
+    
+    /**
+     * @ORM\Column(type="boolean", nullable=true, columnDefinition="BOOLEAN DEFAULT TRUE")
+     */
+    protected $execute_snmp = true;
+    
+    /**
+     * @ORM\ManyToOne(targetEntity="CMTSModel", fetch="EXTRA_LAZY")
+     * 
+     * @JMS\MaxDepth(1)
+     */
+    protected $model;
+    
+    
+    /**
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->name;
+    }
+    
+    /**
+     * @param string $name
+     * 
+     * @return $this
+     */
+    public function setName($name)
+    {
+        $this->name = $name;
+        
+        return $this;
+    }
+
+    /**
+     * @param string $host
+     * 
+     * @return $this
+     */
+    public function setHost($host)
+    {
+        $this->host = $host;
+        
+        return $this;
+    }
+
+    /**
+     * @param string $snmp_comunity
+     * 
+     * @return $this
+     */
+    public function setSnmp_comunity($snmp_comunity)
+    {
+        $this->snmp_comunity = $snmp_comunity;
+        
+        return $this;
+    }
+
+    /**
+     * @param int $snmp_version
+     * 
+     * @return $this
+     */
+    public function setSnmp_version($snmp_version)
+    {
+        $this->snmp_version = $snmp_version;
+        
+        return $this;
+    }
+
+    /**
+     * @param boolean $execute_snmp
+     * 
+     * @return $this
+     */
+    public function setExecute_snmp($execute_snmp)
+    {
+        $this->execute_snmp = $execute_snmp;
+        
+        return $this;
+    }
+    
+    /**
+     * @return CMTSModel
+     */
+    public function getModel()
+    {
+        return $this->model;
+    }
+
+    /**
+     * @param CMTSModel $model
+     * 
+     * @return $this
+     */
+    public function setModel($model)
+    {
+        $this->model = $model;
+        
+        return $this;
+    }
+        
+    /**
+     * @return array
+     */
+    public function getDeviceData()
+    {
+        $extraData = [            
+            'name' => $this->name, 
+            'host' => $this->host, 
+            'modelId' => $this->model ? $this->model->getId() : null,
+        ];
+        
+        return [
+            'deviceType' => get_class($this),
+            'deviceId' => $this->id,
+            'tenancy' => $this->tenancyId,
+            'extraData' => json_encode($extraData),
+        ];
+    }
+
+}

+ 76 - 0
src/CablemodemBundle/Entity/CMTSModel.php

@@ -0,0 +1,76 @@
+<?php
+
+namespace CablemodemBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Base\AdminBundle\Traits\TenancyIdTrait;
+use Base\AdminBundle\Traits\TenancyIdTraitInterface;
+use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"name","tenancy_id"})})
+ * 
+ * @UniqueEntity(fields={"tenancy","name"})
+ */
+class CMTSModel implements TenancyIdTraitInterface
+{
+
+    use ExtraDataTrait;
+    use TenancyIdTrait;
+
+    /**
+     * @ORM\Column(name="id", type="bigint", nullable=false)
+     * @ORM\Id
+     * @ORM\GeneratedValue(strategy="IDENTITY")
+     */
+    protected $id;
+
+    /**
+     * @ORM\Column(type="string", length=100)
+     * 
+     * @Assert\NotNull
+     */
+    protected $name;
+
+
+    /**
+     * 
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->name;
+    }
+
+    /**
+     * @return bigint 
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    /**
+     * @param string $name
+     * 
+     * @return Node
+     */
+    public function setName($name)
+    {
+        $this->name = $name;
+
+        return $this;
+    }
+
+    /**
+     * @return string 
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+
+}

+ 329 - 0
src/CablemodemBundle/Entity/Cablemodem.php

@@ -0,0 +1,329 @@
+<?php
+
+namespace CablemodemBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Gedmo\Mapping\Annotation as Gedmo;
+use JMS\Serializer\Annotation as JMS;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Symfony\Component\Validator\Constraints as Assert;
+use Base\AdminBundle\Traits\TenancyIdTrait;
+use Base\AdminBundle\Traits\TenancyIdTraitInterface;
+use DeviceBundle\Interfaces\DeviceInterface;
+use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
+use MapBundle\Entity\Interfaces\LocationInterface;
+use MapBundle\Entity\Traits\LocationTrait;
+use WorkflowBundle\Entity\Interfaces\WorkflowInterface;
+use WorkflowBundle\Entity\Traits\WorkflowTrait;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(indexes={@ORM\Index(name="mac", columns={"mac"})})
+ * 
+ * @UniqueEntity(fields={"mac"})
+ * 
+ * @Gedmo\Loggable
+ */
+class Cablemodem implements DeviceInterface, TenancyIdTraitInterface, LocationInterface, WorkflowInterface
+{
+
+    use ExtraDataTrait;
+    use TenancyIdTrait;
+    use LocationTrait;
+    use WorkflowTrait;
+    
+    /**
+     * @var bigint $id
+     *
+     * @ORM\Column(name="id", type="bigint", nullable=false)
+     * @ORM\Id
+     * @ORM\GeneratedValue(strategy="IDENTITY")
+     */
+    protected $id;
+    
+    /**
+     * @var int
+     *
+     * @ORM\Column(type="integer")
+     * 
+     * @Assert\NotNull
+     */
+    protected $clientId;
+
+    /**
+     * @var string $mac
+     *
+     * @ORM\Column(type="string", length=12, nullable=true, unique=true)
+     * 
+     * @Gedmo\Versioned
+     * 
+     * @Assert\Regex(pattern="/^[a-z0-9]+$/")
+     * @Assert\Length(min=12, max=12)
+     */
+    protected $mac;
+        
+    /**
+     * @ORM\Column(type="string", length=100, nullable=true)
+     * 
+     * @Gedmo\Versioned
+     */
+    protected $activationCode;
+
+    /**
+     * @ORM\ManyToOne(targetEntity="Node", fetch="EXTRA_LAZY", cascade={"persist"})
+     * 
+     * @JMS\MaxDepth(1)
+     */
+    protected $node;
+
+    /**
+     * @ORM\ManyToOne(targetEntity="Profile", fetch="EXTRA_LAZY")
+     * 
+     * @JMS\MaxDepth(1)
+     */
+    protected $profile;
+
+    /**
+     * @ORM\ManyToOne(targetEntity="CablemodemModel", fetch="EXTRA_LAZY")
+     * 
+     * @JMS\MaxDepth(1)
+     */
+    protected $model;
+
+    /**
+     * @Gedmo\Timestampable(on="create")
+     * 
+     * @ORM\Column(type="datetime")
+     */
+    protected $created;
+
+    /**
+     * @Gedmo\Timestampable(on="update")
+     * 
+     * @ORM\Column(type="datetime")
+     */
+    protected $updated;
+        
+    /**
+     * @ORM\ManyToOne(targetEntity="\WorkflowBundle\Entity\Workflow", fetch="EXTRA_LAZY")
+     * @ORM\JoinColumn(name="workflow_id", referencedColumnName="id", onDelete="SET NULL")
+     * 
+     * @JMS\MaxDepth(1)
+     */
+    protected $workflow;
+    
+    /**
+     * @ORM\Column(type="string", nullable=true)
+     */
+    protected $currentState = null;
+
+    /**
+     * @ORM\Column(type="string", nullable=true, options={"default": "active"})
+     */
+    protected $administrativeState = 'active';
+
+    /**
+     * @ORM\Column(type="string", options={"default": "success"})
+     */
+    protected $transitionState = 'success';
+            
+    
+    /**
+     * @return string
+     */
+    public function __toString()
+    {
+        return (string) ($this->mac ?: $this->activationCode);
+    }
+       
+    /**
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    /**
+     * @return int
+     */
+    public function getClientId()
+    {
+        return $this->clientId;
+    }
+
+    /**
+     * @return string
+     */
+    public function getMac()
+    {
+        return $this->mac;
+    }
+
+    /**
+     * @return string
+     */
+    public function getActivationCode()
+    {
+        return $this->activationCode;
+    }
+
+    /**
+     * @return Node
+     */
+    public function getNode()
+    {
+        return $this->node;
+    }
+
+    /**
+     * @return Profile
+     */
+    public function getProfile()
+    {
+        return $this->profile;
+    }
+
+    /**
+     * @return CablemodemModel
+     */
+    public function getModel()
+    {
+        return $this->model;
+    }
+
+    /**
+     * @return \DateTime
+     */
+    public function getCreated()
+    {
+        return $this->created;
+    }
+
+    /**
+     * @return \DateTime
+     */
+    public function getUpdated()
+    {
+        return $this->updated;
+    }
+
+    /**
+     * @param int $clientId
+     * 
+     * @return $this
+     */
+    public function setClientId($clientId)
+    {
+        $this->clientId = $clientId;
+        
+        return $this;
+    }
+
+    /**
+     * @param string $mac
+     * 
+     * @return $this
+     */
+    public function setMac($mac)
+    {
+        $this->mac = $mac;
+        
+        return $this;
+    }
+    
+    /**
+     * @param string $activationCode
+     * 
+     * @return $this
+     */
+    public function setActivationCode($activationCode)
+    {
+        $this->activationCode = $activationCode;
+        
+        return $this;
+    }
+
+    /**
+     * @param Node $node
+     * 
+     * @return $this
+     */
+    public function setNode($node)
+    {
+        $this->node = $node;
+        
+        return $this;
+    }
+
+    /**
+     * @param Profile $profile
+     * 
+     * @return $this
+     */
+    public function setProfile($profile)
+    {
+        $this->profile = $profile;
+        
+        return $this;
+    }
+
+    /**
+     * @param CablemodemModel $model
+     * 
+     * @return $this
+     */
+    public function setModel($model)
+    {
+        $this->model = $model;
+        
+        return $this;
+    }
+
+    /**
+     * @param \DateTime $created
+     * 
+     * @return $this
+     */
+    public function setCreated($created)
+    {
+        $this->created = $created;
+        
+        return $this;
+    }
+
+    /**
+     * @param \DateTime $updated
+     * 
+     * @return $this
+     */
+    public function setUpdated($updated)
+    {
+        $this->updated = $updated;
+        
+        return $this;
+    }
+    
+    /**
+     * @return array
+     */
+    public function getDeviceData()
+    {
+        $extraData = [            
+            'mac' => $this->mac, 
+            'activationCode' => $this->activationCode, 
+            'clientId' => $this->clientId,
+            'modelId' => $this->model ? $this->model->getId() : null,
+            'nodeId' => $this->node ? $this->node->getId() : null,
+            'profileId' => $this->profile ? $this->profile->getId() : null,
+        ];
+        
+        return [
+            'deviceType' => get_class($this),
+            'deviceId' => $this->id,
+            'tenancy' => $this->tenancyId,
+            'extraData' => json_encode($extraData),
+        ];
+    }
+
+}

+ 76 - 0
src/CablemodemBundle/Entity/CablemodemModel.php

@@ -0,0 +1,76 @@
+<?php
+
+namespace CablemodemBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Base\AdminBundle\Traits\TenancyIdTrait;
+use Base\AdminBundle\Traits\TenancyIdTraitInterface;
+use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"name","tenancy_id"})})
+ * 
+ * @UniqueEntity(fields={"tenancy","name"})
+ */
+class CablemodemModel implements TenancyIdTraitInterface
+{
+
+    use ExtraDataTrait;
+    use TenancyIdTrait;
+
+    /**
+     * @ORM\Column(name="id", type="bigint", nullable=false)
+     * @ORM\Id
+     * @ORM\GeneratedValue(strategy="IDENTITY")
+     */
+    protected $id;
+
+    /**
+     * @ORM\Column(type="string", length=100)
+     * 
+     * @Assert\NotNull
+     */
+    protected $name;
+
+
+    /**
+     * 
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->name;
+    }
+
+    /**
+     * @return bigint 
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    /**
+     * @param string $name
+     * 
+     * @return Node
+     */
+    public function setName($name)
+    {
+        $this->name = $name;
+
+        return $this;
+    }
+
+    /**
+     * @return string 
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+
+}

+ 141 - 0
src/CablemodemBundle/Entity/Node.php

@@ -0,0 +1,141 @@
+<?php
+
+namespace CablemodemBundle\Entity;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Base\AdminBundle\Traits\TenancyIdTrait;
+use Base\AdminBundle\Traits\TenancyIdTraitInterface;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"name","tenancy_id"})})
+ * 
+ * @UniqueEntity(fields={"tenancy","name"})
+ */
+class Node implements TenancyIdTraitInterface
+{
+
+    use TenancyIdTrait;
+
+    /**
+     * @ORM\Column(name="id", type="bigint", nullable=false)
+     * @ORM\Id
+     * @ORM\GeneratedValue(strategy="IDENTITY")
+     */
+    protected $id;
+
+    /**
+     * @ORM\Column(type="string", length=100)
+     * 
+     * @Assert\NotNull
+     */
+    protected $name;
+
+    /**
+     * @ORM\ManyToOne(targetEntity="Node")
+     */
+    protected $parent;
+
+    /**
+     * @ORM\OneToMany(targetEntity="Node", mappedBy="parent")
+     */
+    protected $childs;
+
+
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->childs = new ArrayCollection;
+    }
+
+    /**
+     * 
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->name;
+    }
+
+    /**
+     * @return bigint 
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    /**
+     * @param string $name
+     * 
+     * @return Node
+     */
+    public function setName($name)
+    {
+        $this->name = $name;
+
+        return $this;
+    }
+
+    /**
+     * @return string 
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    /**
+     * @param Node $parent
+     * 
+     * @return Node
+     */
+    public function setParent($parent = null)
+    {
+        $this->parent = $parent;
+
+        return $this;
+    }
+
+    /**
+     * @return Node 
+     */
+    public function getParent()
+    {
+        return $this->parent;
+    }
+
+    /**
+     * @param Node $childs
+     * 
+     * @return Node
+     */
+    public function addChild($childs)
+    {
+        $this->childs[] = $childs;
+
+        return $this;
+    }
+
+    /**
+     * @param Node $childs
+     */
+    public function removeChild(Node $childs)
+    {
+        $this->childs->removeElement($childs);
+    }
+
+    /**
+     * @return Doctrine\Common\Collections\Collection 
+     */
+    public function getChilds()
+    {
+        return $this->childs;
+    }
+
+}

+ 217 - 0
src/CablemodemBundle/Entity/Profile.php

@@ -0,0 +1,217 @@
+<?php
+
+namespace CablemodemBundle\Entity;
+
+use Base\AdminBundle\Traits\TenancyIdTrait;
+use Base\AdminBundle\Traits\TenancyIdTraitInterface;
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"name","tenancy_id"})})
+ * 
+ * @UniqueEntity(fields={"tenancy","name"})
+ */
+class Profile  implements TenancyIdTraitInterface
+{
+    
+    use TenancyIdTrait;
+
+    /**
+     * @var bigint $id
+     *
+     * @ORM\Column(name="id", type="bigint", nullable=false)
+     * @ORM\Id
+     * @ORM\GeneratedValue(strategy="IDENTITY")
+     */
+    private $id;
+
+    /**
+     * @var string $name
+     * 
+     * @ORM\Column(name="name", type="string", length=100)
+     * 
+     * @Assert\NotNull
+     * @Assert\Regex(
+     *     pattern="/[\w\s\d]+/",
+     * 	   match=true,
+     *     message="El campo contiene caracteres especiales"
+     * )
+     */
+    protected $name;
+
+    /**
+     * @var bigint $downstream
+     * 
+     * @ORM\Column(type="bigint", nullable=true)
+     */
+    protected $downstream;
+
+    /**
+     * @var bigint $upstream
+     * 
+     * @ORM\Column(type="bigint", nullable=true)
+     */
+    protected $upstream;
+
+    /**
+     * @var bigint $filtroUpload
+     * 
+     * @ORM\Column(type="bigint", nullable=true)
+     */
+    protected $filtroUpload;
+
+    /**
+     * @var bigint $filtroDownload
+     * 
+     * @ORM\Column(type="bigint", nullable=true)
+     */
+    protected $filtroDownload;
+
+    /**
+     * @var bigint $maxCpe
+     * 
+     * @ORM\Column(type="bigint", nullable=true)
+     */
+    protected $maxCpe;
+
+
+    /**
+     * @return string
+     */
+    public function __toString()
+    {
+        return $this->name;
+    }
+
+    /**
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    /**
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    /**
+     * @return bigint
+     */
+    public function getDownstream()
+    {
+        return $this->downstream;
+    }
+
+    /**
+     * @return bigint
+     */
+    public function getUpstream()
+    {
+        return $this->upstream;
+    }
+    
+    /**
+     * @return bigint
+     */
+    public function getFiltroUpload()
+    {
+        return $this->filtroUpload;
+    }
+    
+    /**
+     * @return bigint
+     */
+    public function getFiltroDownload()
+    {
+        return $this->filtroDownload;
+    }
+    
+    /**
+     * @return bigint
+     */
+    public function getMaxCpe()
+    {
+        return $this->maxCpe;
+    }
+
+    /**
+     * @param string $name
+     * 
+     * @return $this
+     */
+    public function setName($name)
+    {
+        $this->name = $name;
+
+        return $this;
+    }
+
+    /**
+     * @param bigint $downstream
+     * 
+     * @return $this
+     */
+    public function setDownstream($downstream)
+    {
+        $this->downstream = $downstream;
+
+        return $this;
+    }
+    
+    /**
+     * @param bigint $upstream
+     * 
+     * @return $this
+     */
+    public function setUpstream($upstream)
+    {
+        $this->upstream = $upstream;
+
+        return $this;
+    }
+
+    /**
+     * @param bigint $filtroUpload
+     * 
+     * @return $this
+     */
+    public function setFiltroUpload($filtroUpload)
+    {
+        $this->filtroUpload = $filtroUpload;
+
+        return $this;
+    }
+
+    /**
+     * @param bigint $filtroDownload
+     * 
+     * @return $this
+     */
+    public function setFiltroDownload($filtroDownload)
+    {
+        $this->filtroDownload = $filtroDownload;
+
+        return $this;
+    }
+
+    /**
+     * @param bigint $maxCpe
+     * 
+     * @return $this
+     */
+    public function setMaxCpe($maxCpe)
+    {
+        $this->maxCpe = $maxCpe;
+
+        return $this;
+    }
+
+}

+ 4 - 0
src/CablemodemBundle/Resources/config/services.yml

@@ -0,0 +1,4 @@
+services:
+#    cablemodem.example:
+#        class: CablemodemBundle\Example
+#        arguments: ["@service_id", "plain_value", "%parameter%"]