diff --git a/api/handler.go b/api/handler.go
index 3b1754f..4e1ef61 100644
--- a/api/handler.go
+++ b/api/handler.go
@@ -110,9 +110,10 @@
 func (s *Server) CreateOLTChassis(ctx context.Context, in *AddOLTChassisMessage) (*AddOLTChassisReturn, error) {
 	clli := in.GetCLLI()
 	oltType := in.GetType().String()
+	driver := in.GetDriver().String()
 	address := net.TCPAddr{IP: net.ParseIP(in.GetSlotIP()), Port: int(in.GetSlotPort())}
 	hostname := in.GetHostname()
-	clli, err := impl.CreateOLTChassis(clli, oltType, address, hostname)
+	clli, err := impl.CreateOLTChassis(clli, oltType, driver, address, hostname)
 	return &AddOLTChassisReturn{DeviceID: hostname, ChassisDeviceID: clli}, err
 }
 
diff --git a/internal/pkg/impl/olt.go b/internal/pkg/impl/olt.go
index b878a9b..28c8820 100644
--- a/internal/pkg/impl/olt.go
+++ b/internal/pkg/impl/olt.go
@@ -28,7 +28,7 @@
 /*
 CreateOLTChassis adds an OLT chassis/line card to the Physical chassis
 */
-func CreateOLTChassis(clli string, oltType string, address net.TCPAddr, hostname string) (string, error) {
+func CreateOLTChassis(clli string, oltType string, driver string, address net.TCPAddr, hostname string) (string, error) {
 	myChan := getSyncChannel()
 	<-myChan
 	defer done(myChan, true)
@@ -39,21 +39,24 @@
 		return "", errors.New(errString)
 	}
 	physicalChassis := &chassisHolder.PhysicalChassis
-	sOlt := physical.SimpleOLT{CLLI: clli, Hostname: hostname, Address: address, Parent: physicalChassis}
+	sOlt := physical.SimpleOLT{CLLI: clli, Hostname: hostname, Driver: driver, Address: address, Parent: physicalChassis}
 	switch oltType {
 	case "edgecore":
 		sOlt.CreateEdgecore()
 	case "adtran":
 	case "tibit":
 	}
-	physicalChassis.AddOLTChassis(sOlt)
 	ports := sOlt.GetPorts()
 	for i := 0; i < len(ports); i++ {
-		absPort, _ := chassisHolder.AbstractChassis.NextPort()
-
+		absPort, err := chassisHolder.AbstractChassis.NextPort()
+		if err != nil {
+			fmt.Println(err)
+			return "", err
+		}
 		absPort.PhysPort = &ports[i]
 		//AssignTraits(&ports[i], absPort)
 	}
+	physicalChassis.AddOLTChassis(sOlt)
 	isDirty = true
 	return clli, nil
 
diff --git a/models/abstract/chassis.go b/models/abstract/chassis.go
index a86822d..2b3231b 100644
--- a/models/abstract/chassis.go
+++ b/models/abstract/chassis.go
@@ -18,6 +18,7 @@
 
 import (
 	"errors"
+	"fmt"
 )
 
 const MAX_SLOTS int = 16
@@ -63,15 +64,52 @@
 	return nextPort, nil
 }
 func (chassis *Chassis) ActivateONTFull(slotNumber int, portNumber int, ontNumber int, serialNumber string, cTag uint32, sTag uint32, nasPortID string, circuitID string) error {
+	if slotNumber > len(chassis.Slots) {
+		errorMsg := fmt.Sprintf("Invalid slot Number %d ", slotNumber)
+		return errors.New(errorMsg)
+	}
+	if portNumber > 16 {
+		errorMsg := fmt.Sprintf("Invalid port Number %d ", portNumber)
+		return errors.New(errorMsg)
+	}
+	if ontNumber > 64 {
+		errorMsg := fmt.Sprintf("Invalid ont Number %d ", ontNumber)
+		return errors.New(errorMsg)
+	}
+
 	err := chassis.Slots[slotNumber-1].Ports[portNumber-1].provisionOntFull(ontNumber, serialNumber, cTag, sTag, nasPortID, circuitID)
 	return err
 }
 
 func (chassis *Chassis) ActivateONT(slotNumber int, portNumber int, ontNumber int, serialNumber string) error {
+	if slotNumber > len(chassis.Slots) {
+		errorMsg := fmt.Sprintf("Invalid slot Number %d ", slotNumber)
+		return errors.New(errorMsg)
+	}
+	if portNumber > 16 {
+		errorMsg := fmt.Sprintf("Invalid port Number %d ", portNumber)
+		return errors.New(errorMsg)
+	}
+	if ontNumber > 64 {
+		errorMsg := fmt.Sprintf("Invalid ont Number %d ", ontNumber)
+		return errors.New(errorMsg)
+	}
 	err := chassis.Slots[slotNumber-1].Ports[portNumber-1].provisionOnt(ontNumber, serialNumber)
 	return err
 }
 func (chassis *Chassis) DeleteONT(slotNumber int, portNumber int, ontNumber int, serialNumber string) error {
+	if slotNumber > len(chassis.Slots) {
+		errorMsg := fmt.Sprintf("Invalid slot Number %d ", slotNumber)
+		return errors.New(errorMsg)
+	}
+	if portNumber > 16 {
+		errorMsg := fmt.Sprintf("Invalid port Number %d ", portNumber)
+		return errors.New(errorMsg)
+	}
+	if ontNumber > 64 {
+		errorMsg := fmt.Sprintf("Invalid ont Number %d ", ontNumber)
+		return errors.New(errorMsg)
+	}
 	err := chassis.Slots[slotNumber-1].Ports[portNumber-1].deleteOnt(ontNumber, serialNumber)
 	return err
 }
diff --git a/models/physical/chassis.go b/models/physical/chassis.go
index 59c87b7..943c830 100644
--- a/models/physical/chassis.go
+++ b/models/physical/chassis.go
@@ -70,7 +70,7 @@
 func (chassis *Chassis) SendOltTosca(olt SimpleOLT) {
 	ipString := olt.GetAddress().IP.String()
 	webServerPort := olt.GetAddress().Port
-	oltStruct := tosca.NewOltProvision(chassis.CLLI, olt.GetHostname(), "openolt", ipString, webServerPort)
+	oltStruct := tosca.NewOltProvision(chassis.CLLI, olt.GetHostname(), olt.Driver, ipString, webServerPort)
 	yaml, _ := oltStruct.ToYaml()
 	if settings.GetDummy() {
 		log.Printf("yaml:%s\n", yaml)
diff --git a/models/physical/olt.go b/models/physical/olt.go
index c800ad5..321c895 100644
--- a/models/physical/olt.go
+++ b/models/physical/olt.go
@@ -42,6 +42,7 @@
 	CLLI           string
 	Hostname       string
 	Address        net.TCPAddr
+	Driver         string
 	Number         int
 	Ports          []PONPort
 	Active         bool
