SEBA-317

Change-Id: Ifb582cbd4764b6995b191ed5c9bc08f2d1ba3c4b
diff --git a/api/abstract_olt_api.proto b/api/abstract_olt_api.proto
index dd8fcea..0a031bb 100644
--- a/api/abstract_olt_api.proto
+++ b/api/abstract_olt_api.proto
@@ -78,6 +78,17 @@
    int32 OntNumber=4;
    string SerialNumber=5;
 }
+message AddOntFullMessage{
+   string CLLI=1;
+   int32 SlotNumber=2;
+   int32 PortNumber=3;
+   int32 OntNumber=4;
+   string SerialNumber=5;
+   uint32 STag=7;
+   uint32 CTag=8;
+   string NasPortID=9;
+   string CircuitID=10;
+}
 message AddOntReturn{
    bool Success=1;
 }
@@ -129,6 +140,12 @@
 	 body:"*"
       };
    }
+   rpc ProvisionOntFull(AddOntFullMessage) returns (AddOntReturn) {
+      option(google.api.http) = {
+         post:"/v1/ProvsionOtFull"
+	 body:"*"
+      };
+   }
    rpc DeleteOnt(DeleteOntMessage) returns (DeleteOntReturn){
       option(google.api.http)={
         post:"/v1/DeleteOnt"
diff --git a/api/handler.go b/api/handler.go
index bd9d2f0..593afed 100644
--- a/api/handler.go
+++ b/api/handler.go
@@ -217,6 +217,26 @@
 	isDirty = true
 	return &AddOntReturn{Success: true}, nil
 }
+func (s *Server) ProvisionOntFull(ctx context.Context, in *AddOntFullMessage) (*AddOntReturn, error) {
+	myChan := getSyncChannel()
+	<-myChan
+	defer done(myChan, true)
+	chassisMap := models.GetChassisMap()
+	clli := in.GetCLLI()
+	chassisHolder := (*chassisMap)[clli]
+	if chassisHolder == nil {
+		errString := fmt.Sprintf("There is no chassis with CLLI of %s", clli)
+		return &AddOntReturn{Success: false}, errors.New(errString)
+	}
+	err := chassisHolder.AbstractChassis.ActivateONTFull(int(in.GetSlotNumber()), int(in.GetPortNumber()), int(in.GetOntNumber()), in.GetSerialNumber(),
+		in.GetCTag(), in.GetSTag(), in.GetNasPortID(), in.GetCircuitID())
+
+	if err != nil {
+		return nil, err
+	}
+	isDirty = true
+	return &AddOntReturn{Success: true}, nil
+}
 
 /*
 DeleteOnt - deletes a previously provision ont