diff --git a/VERSION b/VERSION
index 2f80b8d..8cbf02c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.0.12-dev
+0.0.12
diff --git a/api/bbsim/bbsim.pb.go b/api/bbsim/bbsim.pb.go
index 2f2f647..3b4d99a 100644
--- a/api/bbsim/bbsim.pb.go
+++ b/api/bbsim/bbsim.pb.go
@@ -8,8 +8,6 @@
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
 	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
 	math "math"
 )
 
@@ -24,6 +22,86 @@
 // proto package needs to be updated.
 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
+// These types correspond to the messages permitted in the oneof
+// in AlarmIndication in the openolt protos
+type AlarmType_Types int32
+
+const (
+	AlarmType_LOS                                   AlarmType_Types = 0
+	AlarmType_DYING_GASP                            AlarmType_Types = 1
+	AlarmType_ONU_ALARM                             AlarmType_Types = 2
+	AlarmType_ONU_STARTUP_FAILURE                   AlarmType_Types = 3
+	AlarmType_ONU_SIGNAL_DEGRADE                    AlarmType_Types = 4
+	AlarmType_ONU_DRIFT_OF_WINDOW                   AlarmType_Types = 5
+	AlarmType_ONU_LOSS_OF_OMCI_CHANNEL              AlarmType_Types = 6
+	AlarmType_ONU_SIGNALS_FAILURE                   AlarmType_Types = 7
+	AlarmType_ONU_TRANSMISSION_INTERFERENCE_WARNING AlarmType_Types = 8
+	AlarmType_ONU_ACTIVATION_FAILURE                AlarmType_Types = 9
+	AlarmType_ONU_PROCESSING_ERROR                  AlarmType_Types = 10
+	AlarmType_ONU_LOSS_OF_KEY_SYNC_FAILURE          AlarmType_Types = 11
+	AlarmType_ONU_ITU_PON_STATS                     AlarmType_Types = 12
+	// These break out ONU_ALARM, which is a single message, but
+	// includes statuses for these six alarms.
+	AlarmType_ONU_ALARM_LOS            AlarmType_Types = 13
+	AlarmType_ONU_ALARM_LOB            AlarmType_Types = 14
+	AlarmType_ONU_ALARM_LOPC_MISS      AlarmType_Types = 15
+	AlarmType_ONU_ALARM_LOPC_MIC_ERROR AlarmType_Types = 16
+	AlarmType_ONU_ALARM_LOFI           AlarmType_Types = 17
+	AlarmType_ONU_ALARM_LOAMI          AlarmType_Types = 18
+)
+
+var AlarmType_Types_name = map[int32]string{
+	0:  "LOS",
+	1:  "DYING_GASP",
+	2:  "ONU_ALARM",
+	3:  "ONU_STARTUP_FAILURE",
+	4:  "ONU_SIGNAL_DEGRADE",
+	5:  "ONU_DRIFT_OF_WINDOW",
+	6:  "ONU_LOSS_OF_OMCI_CHANNEL",
+	7:  "ONU_SIGNALS_FAILURE",
+	8:  "ONU_TRANSMISSION_INTERFERENCE_WARNING",
+	9:  "ONU_ACTIVATION_FAILURE",
+	10: "ONU_PROCESSING_ERROR",
+	11: "ONU_LOSS_OF_KEY_SYNC_FAILURE",
+	12: "ONU_ITU_PON_STATS",
+	13: "ONU_ALARM_LOS",
+	14: "ONU_ALARM_LOB",
+	15: "ONU_ALARM_LOPC_MISS",
+	16: "ONU_ALARM_LOPC_MIC_ERROR",
+	17: "ONU_ALARM_LOFI",
+	18: "ONU_ALARM_LOAMI",
+}
+
+var AlarmType_Types_value = map[string]int32{
+	"LOS":                                   0,
+	"DYING_GASP":                            1,
+	"ONU_ALARM":                             2,
+	"ONU_STARTUP_FAILURE":                   3,
+	"ONU_SIGNAL_DEGRADE":                    4,
+	"ONU_DRIFT_OF_WINDOW":                   5,
+	"ONU_LOSS_OF_OMCI_CHANNEL":              6,
+	"ONU_SIGNALS_FAILURE":                   7,
+	"ONU_TRANSMISSION_INTERFERENCE_WARNING": 8,
+	"ONU_ACTIVATION_FAILURE":                9,
+	"ONU_PROCESSING_ERROR":                  10,
+	"ONU_LOSS_OF_KEY_SYNC_FAILURE":          11,
+	"ONU_ITU_PON_STATS":                     12,
+	"ONU_ALARM_LOS":                         13,
+	"ONU_ALARM_LOB":                         14,
+	"ONU_ALARM_LOPC_MISS":                   15,
+	"ONU_ALARM_LOPC_MIC_ERROR":              16,
+	"ONU_ALARM_LOFI":                        17,
+	"ONU_ALARM_LOAMI":                       18,
+}
+
+func (x AlarmType_Types) String() string {
+	return proto.EnumName(AlarmType_Types_name, int32(x))
+}
+
+func (AlarmType_Types) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_ef7750073d18011b, []int{6, 0}
+}
+
 type PONPort struct {
 	ID                   int32    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
 	OperState            string   `protobuf:"bytes,2,opt,name=OperState,proto3" json:"OperState,omitempty"`
@@ -378,6 +456,150 @@
 	return ""
 }
 
+type AlarmType struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmType) Reset()         { *m = AlarmType{} }
+func (m *AlarmType) String() string { return proto.CompactTextString(m) }
+func (*AlarmType) ProtoMessage()    {}
+func (*AlarmType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ef7750073d18011b, []int{6}
+}
+
+func (m *AlarmType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmType.Unmarshal(m, b)
+}
+func (m *AlarmType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmType.Marshal(b, m, deterministic)
+}
+func (m *AlarmType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmType.Merge(m, src)
+}
+func (m *AlarmType) XXX_Size() int {
+	return xxx_messageInfo_AlarmType.Size(m)
+}
+func (m *AlarmType) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmType proto.InternalMessageInfo
+
+type AlarmParameter struct {
+	Key                  string   `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
+	Value                string   `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmParameter) Reset()         { *m = AlarmParameter{} }
+func (m *AlarmParameter) String() string { return proto.CompactTextString(m) }
+func (*AlarmParameter) ProtoMessage()    {}
+func (*AlarmParameter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ef7750073d18011b, []int{7}
+}
+
+func (m *AlarmParameter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmParameter.Unmarshal(m, b)
+}
+func (m *AlarmParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmParameter.Marshal(b, m, deterministic)
+}
+func (m *AlarmParameter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmParameter.Merge(m, src)
+}
+func (m *AlarmParameter) XXX_Size() int {
+	return xxx_messageInfo_AlarmParameter.Size(m)
+}
+func (m *AlarmParameter) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmParameter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmParameter proto.InternalMessageInfo
+
+func (m *AlarmParameter) GetKey() string {
+	if m != nil {
+		return m.Key
+	}
+	return ""
+}
+
+func (m *AlarmParameter) GetValue() string {
+	if m != nil {
+		return m.Value
+	}
+	return ""
+}
+
+// AlarmRequest includes fields common to every alarm,
+// plus an optional list of AlarmParemter list that can be used
+// to set additional fields in alarms that support them.
+type AlarmRequest struct {
+	AlarmType            AlarmType_Types   `protobuf:"varint,1,opt,name=AlarmType,proto3,enum=bbsim.AlarmType_Types" json:"AlarmType,omitempty"`
+	SerialNumber         string            `protobuf:"bytes,2,opt,name=SerialNumber,proto3" json:"SerialNumber,omitempty"`
+	Status               string            `protobuf:"bytes,3,opt,name=Status,proto3" json:"Status,omitempty"`
+	Parameters           []*AlarmParameter `protobuf:"bytes,4,rep,name=Parameters,proto3" json:"Parameters,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *AlarmRequest) Reset()         { *m = AlarmRequest{} }
+func (m *AlarmRequest) String() string { return proto.CompactTextString(m) }
+func (*AlarmRequest) ProtoMessage()    {}
+func (*AlarmRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ef7750073d18011b, []int{8}
+}
+
+func (m *AlarmRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmRequest.Unmarshal(m, b)
+}
+func (m *AlarmRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmRequest.Marshal(b, m, deterministic)
+}
+func (m *AlarmRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmRequest.Merge(m, src)
+}
+func (m *AlarmRequest) XXX_Size() int {
+	return xxx_messageInfo_AlarmRequest.Size(m)
+}
+func (m *AlarmRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmRequest proto.InternalMessageInfo
+
+func (m *AlarmRequest) GetAlarmType() AlarmType_Types {
+	if m != nil {
+		return m.AlarmType
+	}
+	return AlarmType_LOS
+}
+
+func (m *AlarmRequest) GetSerialNumber() string {
+	if m != nil {
+		return m.SerialNumber
+	}
+	return ""
+}
+
+func (m *AlarmRequest) GetStatus() string {
+	if m != nil {
+		return m.Status
+	}
+	return ""
+}
+
+func (m *AlarmRequest) GetParameters() []*AlarmParameter {
+	if m != nil {
+		return m.Parameters
+	}
+	return nil
+}
+
 type VersionNumber struct {
 	Version              string   `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
 	BuildTime            string   `protobuf:"bytes,2,opt,name=buildTime,proto3" json:"buildTime,omitempty"`
@@ -392,7 +614,7 @@
 func (m *VersionNumber) String() string { return proto.CompactTextString(m) }
 func (*VersionNumber) ProtoMessage()    {}
 func (*VersionNumber) Descriptor() ([]byte, []int) {
-	return fileDescriptor_ef7750073d18011b, []int{6}
+	return fileDescriptor_ef7750073d18011b, []int{9}
 }
 
 func (m *VersionNumber) XXX_Unmarshal(b []byte) error {
@@ -453,7 +675,7 @@
 func (m *LogLevel) String() string { return proto.CompactTextString(m) }
 func (*LogLevel) ProtoMessage()    {}
 func (*LogLevel) Descriptor() ([]byte, []int) {
-	return fileDescriptor_ef7750073d18011b, []int{7}
+	return fileDescriptor_ef7750073d18011b, []int{10}
 }
 
 func (m *LogLevel) XXX_Unmarshal(b []byte) error {
@@ -500,7 +722,7 @@
 func (m *Response) String() string { return proto.CompactTextString(m) }
 func (*Response) ProtoMessage()    {}
 func (*Response) Descriptor() ([]byte, []int) {
-	return fileDescriptor_ef7750073d18011b, []int{8}
+	return fileDescriptor_ef7750073d18011b, []int{11}
 }
 
 func (m *Response) XXX_Unmarshal(b []byte) error {
@@ -545,7 +767,7 @@
 func (m *Empty) String() string { return proto.CompactTextString(m) }
 func (*Empty) ProtoMessage()    {}
 func (*Empty) Descriptor() ([]byte, []int) {
-	return fileDescriptor_ef7750073d18011b, []int{9}
+	return fileDescriptor_ef7750073d18011b, []int{12}
 }
 
 func (m *Empty) XXX_Unmarshal(b []byte) error {
@@ -567,12 +789,16 @@
 var xxx_messageInfo_Empty proto.InternalMessageInfo
 
 func init() {
+	proto.RegisterEnum("bbsim.AlarmType_Types", AlarmType_Types_name, AlarmType_Types_value)
 	proto.RegisterType((*PONPort)(nil), "bbsim.PONPort")
 	proto.RegisterType((*NNIPort)(nil), "bbsim.NNIPort")
 	proto.RegisterType((*Olt)(nil), "bbsim.Olt")
 	proto.RegisterType((*ONU)(nil), "bbsim.ONU")
 	proto.RegisterType((*ONUs)(nil), "bbsim.ONUs")
 	proto.RegisterType((*ONURequest)(nil), "bbsim.ONURequest")
+	proto.RegisterType((*AlarmType)(nil), "bbsim.AlarmType")
+	proto.RegisterType((*AlarmParameter)(nil), "bbsim.AlarmParameter")
+	proto.RegisterType((*AlarmRequest)(nil), "bbsim.AlarmRequest")
 	proto.RegisterType((*VersionNumber)(nil), "bbsim.VersionNumber")
 	proto.RegisterType((*LogLevel)(nil), "bbsim.LogLevel")
 	proto.RegisterType((*Response)(nil), "bbsim.Response")
@@ -582,46 +808,71 @@
 func init() { proto.RegisterFile("api/bbsim/bbsim.proto", fileDescriptor_ef7750073d18011b) }
 
 var fileDescriptor_ef7750073d18011b = []byte{
-	// 617 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0xd1, 0x8e, 0xd2, 0x4c,
-	0x18, 0x6d, 0x81, 0x52, 0xf8, 0xca, 0xee, 0x9f, 0x7f, 0xb2, 0x9a, 0x86, 0x6c, 0x94, 0x4c, 0x36,
-	0x06, 0x8d, 0xb2, 0x0a, 0x26, 0x7a, 0xeb, 0x2e, 0xc4, 0x25, 0xd9, 0x14, 0xd2, 0x2e, 0xde, 0x9a,
-	0x96, 0x4e, 0xa0, 0x49, 0xdb, 0xa9, 0x9d, 0x61, 0x89, 0x0f, 0xe0, 0xa3, 0xf9, 0x08, 0x3e, 0x8c,
-	0x77, 0x66, 0xda, 0x69, 0xa1, 0xcb, 0x5e, 0x10, 0x6f, 0xbc, 0x21, 0x73, 0xce, 0x9c, 0x33, 0xf3,
-	0x7d, 0x67, 0x3e, 0x52, 0x78, 0xe2, 0x26, 0xc1, 0xa5, 0xe7, 0xb1, 0x20, 0xca, 0x7f, 0x07, 0x49,
-	0x4a, 0x39, 0x45, 0x5a, 0x06, 0xf0, 0x07, 0xd0, 0xe7, 0x33, 0x6b, 0x4e, 0x53, 0x8e, 0x4e, 0xa1,
-	0x36, 0x1d, 0x9b, 0x6a, 0x4f, 0xed, 0x6b, 0x76, 0x6d, 0x3a, 0x46, 0xe7, 0xd0, 0x9e, 0x25, 0x24,
-	0x75, 0xb8, 0xcb, 0x89, 0x59, 0xeb, 0xa9, 0xfd, 0xb6, 0xbd, 0x23, 0x84, 0xd1, 0xb2, 0xa6, 0x7f,
-	0x61, 0xfc, 0xa5, 0x42, 0x7d, 0x16, 0x1e, 0xba, 0x30, 0x74, 0x1c, 0x92, 0x06, 0x6e, 0x68, 0x6d,
-	0x22, 0x8f, 0xa4, 0xd2, 0x58, 0xe1, 0xaa, 0x27, 0xd7, 0x1f, 0x9c, 0x8c, 0x2e, 0xe0, 0x64, 0x1a,
-	0x73, 0x92, 0xc6, 0x6e, 0x98, 0x2b, 0x1a, 0x99, 0xa2, 0x4a, 0xa2, 0x57, 0xd0, 0x92, 0x85, 0x33,
-	0x53, 0xeb, 0xd5, 0xfb, 0xc6, 0xf0, 0x74, 0x90, 0x07, 0x23, 0x69, 0xbb, 0xdc, 0x17, 0x5a, 0x99,
-	0x0e, 0x33, 0x9b, 0x15, 0xad, 0xa4, 0xed, 0x72, 0x1f, 0xff, 0x16, 0x7d, 0x59, 0x8b, 0x7f, 0xd6,
-	0xd7, 0x39, 0xb4, 0xe7, 0x34, 0x16, 0xb5, 0x4c, 0xc7, 0xa6, 0x96, 0x5d, 0xbf, 0x23, 0x10, 0x82,
-	0x86, 0x73, 0xe7, 0xae, 0xcc, 0x66, 0xb6, 0x91, 0xad, 0x05, 0x77, 0x2d, 0x38, 0x3d, 0xe7, 0xc4,
-	0x5a, 0x9c, 0x72, 0xb3, 0xfd, 0xe4, 0xfb, 0x29, 0x61, 0xcc, 0x6c, 0xe5, 0x95, 0x94, 0x04, 0x7a,
-	0x0a, 0x4d, 0x71, 0x9e, 0x45, 0xcd, 0x76, 0xe6, 0x91, 0x08, 0xf7, 0xa1, 0x31, 0xb3, 0x16, 0x0c,
-	0xf5, 0x40, 0x0b, 0x38, 0x89, 0x98, 0xa9, 0x66, 0x61, 0x81, 0x0c, 0x6b, 0x66, 0x2d, 0xec, 0x7c,
-	0x03, 0xbf, 0x05, 0x10, 0x88, 0x7c, 0xdb, 0x10, 0xc6, 0x0f, 0xb2, 0x51, 0x0f, 0xb3, 0xc1, 0x3f,
-	0x54, 0x38, 0xf9, 0x42, 0x52, 0x16, 0xd0, 0x58, 0xa6, 0x65, 0x82, 0x7e, 0x9f, 0x13, 0xd2, 0x50,
-	0x40, 0x51, 0xbd, 0xb7, 0x09, 0x42, 0xff, 0x2e, 0x88, 0xca, 0xc9, 0x2b, 0x09, 0xf4, 0x0c, 0x60,
-	0x49, 0xa3, 0x28, 0xe0, 0x37, 0x2e, 0x5b, 0xcb, 0x98, 0xf7, 0x18, 0xe1, 0x5e, 0x05, 0x5c, 0xa4,
-	0xb9, 0x61, 0x32, 0xe3, 0x1d, 0x81, 0x3f, 0x42, 0xeb, 0x96, 0xae, 0x6e, 0xc9, 0x3d, 0x09, 0xd1,
-	0x19, 0x68, 0xa1, 0x58, 0xc8, 0xfb, 0x73, 0x20, 0xd2, 0x59, 0xba, 0x61, 0x28, 0xdf, 0xb8, 0x65,
-	0x4b, 0x84, 0x27, 0xd0, 0xb2, 0x09, 0x4b, 0x68, 0xcc, 0x08, 0x7a, 0x0e, 0x06, 0xcb, 0xce, 0xfb,
-	0xba, 0xa4, 0x3e, 0x91, 0x63, 0x02, 0x39, 0x75, 0x4d, 0x7d, 0x22, 0x9a, 0x8b, 0x08, 0x63, 0xee,
-	0xaa, 0x68, 0xa0, 0x80, 0x58, 0x07, 0x6d, 0x12, 0x25, 0xfc, 0xfb, 0xf0, 0x67, 0x03, 0xb4, 0xab,
-	0x2b, 0x27, 0x88, 0xd0, 0x25, 0xe8, 0x32, 0x1a, 0xd4, 0x91, 0x59, 0x67, 0x92, 0xee, 0x99, 0x44,
-	0x95, 0xe0, 0xb0, 0x82, 0x2e, 0xa0, 0xf9, 0x99, 0x70, 0xf1, 0xf7, 0xab, 0xea, 0xcb, 0x97, 0x0a,
-	0x39, 0x56, 0xd0, 0x1b, 0x80, 0x39, 0xdd, 0x92, 0x94, 0xc6, 0x87, 0xca, 0xff, 0x24, 0x2a, 0x3a,
-	0xc2, 0x0a, 0x1a, 0x80, 0xe1, 0xac, 0x37, 0xdc, 0xa7, 0xdb, 0xe3, 0xf4, 0xaf, 0xa1, 0x6d, 0x13,
-	0x8f, 0x52, 0x7e, 0x94, 0xfa, 0x05, 0xe8, 0xa2, 0x64, 0x31, 0x5e, 0x55, 0xad, 0xb1, 0x9b, 0x2e,
-	0x86, 0x15, 0xf4, 0x32, 0x6f, 0xcd, 0x5a, 0xa0, 0xff, 0xf7, 0xc6, 0x2e, 0x1f, 0xb4, 0xee, 0xde,
-	0x24, 0x62, 0x05, 0xbd, 0x03, 0xc3, 0x21, 0xbc, 0x7c, 0xcd, 0xe2, 0xd2, 0x82, 0xe8, 0x3e, 0x24,
-	0xb0, 0x82, 0x46, 0x7b, 0x3d, 0x3e, 0x7e, 0xc5, 0x23, 0xa5, 0x0f, 0x77, 0x39, 0x1e, 0xed, 0x79,
-	0x0f, 0x1d, 0x9b, 0x30, 0xee, 0xa6, 0x7c, 0xe2, 0x26, 0x34, 0x3c, 0xd2, 0x35, 0x02, 0x43, 0xba,
-	0xc6, 0xeb, 0x65, 0x72, 0x9c, 0xc9, 0x6b, 0x66, 0x5f, 0x82, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff,
-	0xff, 0x57, 0x53, 0xc7, 0x05, 0x22, 0x06, 0x00, 0x00,
+	// 1009 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4d, 0x4f, 0xeb, 0x56,
+	0x13, 0x4e, 0x08, 0xce, 0xc7, 0x04, 0x82, 0x19, 0x3e, 0x5e, 0x0b, 0xa1, 0xb7, 0xc8, 0xba, 0xad,
+	0xb8, 0x55, 0xcb, 0x6d, 0xe1, 0x56, 0xbd, 0x8b, 0x6e, 0x4c, 0x62, 0x82, 0x75, 0xc3, 0x71, 0x74,
+	0xec, 0x80, 0x58, 0x59, 0x4e, 0x72, 0x04, 0x96, 0xec, 0x38, 0xb5, 0x9d, 0x8b, 0x58, 0x57, 0xfd,
+	0x4d, 0xfd, 0x1b, 0xdd, 0x74, 0xdb, 0xff, 0xd1, 0x5d, 0x75, 0xec, 0x63, 0xc7, 0x81, 0x5b, 0x29,
+	0xea, 0xa6, 0x1b, 0x74, 0xe6, 0x99, 0x79, 0xce, 0xcc, 0x3c, 0x9e, 0x33, 0x04, 0x0e, 0xdc, 0xb9,
+	0xf7, 0x6e, 0x3c, 0x8e, 0xbd, 0x20, 0xfb, 0x7b, 0x36, 0x8f, 0xc2, 0x24, 0x44, 0x29, 0x35, 0xd4,
+	0x1f, 0xa1, 0x31, 0x34, 0xc9, 0x30, 0x8c, 0x12, 0xec, 0xc0, 0x86, 0xd1, 0x53, 0xaa, 0x27, 0xd5,
+	0x53, 0x89, 0x6e, 0x18, 0x3d, 0x3c, 0x86, 0x96, 0x39, 0x67, 0x91, 0x95, 0xb8, 0x09, 0x53, 0x36,
+	0x4e, 0xaa, 0xa7, 0x2d, 0xba, 0x04, 0x38, 0x91, 0x10, 0xe3, 0x5f, 0x10, 0xff, 0xa8, 0x42, 0xcd,
+	0xf4, 0x5f, 0xb3, 0x54, 0xd8, 0xb2, 0x58, 0xe4, 0xb9, 0x3e, 0x59, 0x04, 0x63, 0x16, 0x09, 0xe2,
+	0x0a, 0xb6, 0x7a, 0x73, 0xed, 0xc5, 0xcd, 0xf8, 0x06, 0xb6, 0x8d, 0x59, 0xc2, 0xa2, 0x99, 0xeb,
+	0x67, 0x11, 0x9b, 0x69, 0xc4, 0x2a, 0x88, 0x5f, 0x43, 0x53, 0x14, 0x1e, 0x2b, 0xd2, 0x49, 0xed,
+	0xb4, 0x7d, 0xde, 0x39, 0xcb, 0x84, 0x11, 0x30, 0x2d, 0xfc, 0x3c, 0x56, 0xa8, 0x13, 0x2b, 0xf5,
+	0x95, 0x58, 0x01, 0xd3, 0xc2, 0xaf, 0xfe, 0xc5, 0xfb, 0x22, 0xa3, 0xff, 0xac, 0xaf, 0x63, 0x68,
+	0x0d, 0xc3, 0x19, 0xaf, 0xc5, 0xe8, 0x29, 0x52, 0x9a, 0x7e, 0x09, 0x20, 0xc2, 0xa6, 0x65, 0xbb,
+	0x0f, 0x4a, 0x3d, 0x75, 0xa4, 0x67, 0x8e, 0x75, 0x39, 0xd6, 0xc8, 0x30, 0x7e, 0xe6, 0xb7, 0x5c,
+	0x3f, 0x69, 0xd3, 0x69, 0xc4, 0xe2, 0x58, 0x69, 0x66, 0x95, 0x14, 0x00, 0x1e, 0x42, 0x9d, 0xdf,
+	0x47, 0x42, 0xa5, 0x95, 0x72, 0x84, 0xa5, 0x9e, 0xc2, 0xa6, 0x49, 0x46, 0x31, 0x9e, 0x80, 0xe4,
+	0x25, 0x2c, 0x88, 0x95, 0x6a, 0x2a, 0x16, 0x08, 0xb1, 0x4c, 0x32, 0xa2, 0x99, 0x43, 0xfd, 0x0e,
+	0x80, 0x5b, 0xec, 0xe7, 0x05, 0x8b, 0x93, 0x57, 0xda, 0x54, 0x5f, 0x6b, 0xa3, 0xfe, 0x59, 0x83,
+	0x96, 0xe6, 0xbb, 0x51, 0x60, 0x3f, 0xcf, 0x99, 0xfa, 0x7b, 0x0d, 0x24, 0x7e, 0x88, 0xb1, 0x01,
+	0xb5, 0x81, 0x69, 0xc9, 0x15, 0xec, 0x00, 0xf4, 0xee, 0x0d, 0xd2, 0x77, 0xfa, 0x9a, 0x35, 0x94,
+	0xab, 0xb8, 0x0d, 0x2d, 0x93, 0x8c, 0x1c, 0x6d, 0xa0, 0xd1, 0x1b, 0x79, 0x03, 0xff, 0x07, 0x7b,
+	0xdc, 0xb4, 0x6c, 0x8d, 0xda, 0xa3, 0xa1, 0x73, 0xa5, 0x19, 0x83, 0x11, 0xd5, 0xe5, 0x1a, 0x1e,
+	0x02, 0xa6, 0x0e, 0xa3, 0x4f, 0xb4, 0x81, 0xd3, 0xd3, 0xfb, 0x54, 0xeb, 0xe9, 0xf2, 0x66, 0x4e,
+	0xe8, 0x51, 0xe3, 0xca, 0x76, 0xcc, 0x2b, 0xe7, 0xce, 0x20, 0x3d, 0xf3, 0x4e, 0x96, 0xf0, 0x18,
+	0x14, 0xee, 0x18, 0x98, 0x96, 0xc5, 0x71, 0xf3, 0xa6, 0x6b, 0x38, 0xdd, 0x6b, 0x8d, 0x10, 0x7d,
+	0x20, 0xd7, 0x8b, 0x3c, 0xe9, 0x75, 0x56, 0x91, 0xa7, 0x81, 0x6f, 0xe1, 0x4b, 0xee, 0xb0, 0xa9,
+	0x46, 0xac, 0x1b, 0xc3, 0xb2, 0x0c, 0x93, 0x38, 0x06, 0xb1, 0x75, 0x7a, 0xa5, 0x53, 0x9d, 0x74,
+	0x75, 0xe7, 0x4e, 0xa3, 0xc4, 0x20, 0x7d, 0xb9, 0x89, 0x47, 0x70, 0x98, 0x96, 0xde, 0xb5, 0x8d,
+	0x5b, 0xcd, 0xe6, 0x81, 0xf9, 0x35, 0x2d, 0x54, 0x60, 0x9f, 0xfb, 0x86, 0xd4, 0xec, 0xea, 0x96,
+	0xc5, 0xfb, 0xd5, 0x29, 0x35, 0xa9, 0x0c, 0x78, 0x02, 0xc7, 0xe5, 0xba, 0x3e, 0xea, 0xf7, 0x8e,
+	0x75, 0x4f, 0xba, 0x05, 0xb7, 0x8d, 0x07, 0xb0, 0xcb, 0x23, 0x0c, 0x7b, 0xe4, 0x0c, 0x4d, 0xc2,
+	0xb5, 0xb0, 0x2d, 0x79, 0x0b, 0x77, 0x61, 0xbb, 0x50, 0x8a, 0xd3, 0xe5, 0xed, 0x97, 0xd0, 0xa5,
+	0xdc, 0xc9, 0x1b, 0xcb, 0xa1, 0x61, 0xd7, 0xe1, 0x5d, 0xc8, 0x3b, 0xb9, 0x1e, 0x2b, 0x8e, 0xae,
+	0xa8, 0x4a, 0x46, 0x84, 0x4e, 0xd9, 0x7b, 0x65, 0xc8, 0xbb, 0xb8, 0x07, 0x3b, 0x65, 0x4c, 0xbb,
+	0x31, 0x64, 0x54, 0x3f, 0x40, 0x27, 0xfd, 0xbe, 0x43, 0x37, 0x72, 0x03, 0x96, 0xb0, 0x08, 0x65,
+	0xa8, 0x7d, 0x64, 0xcf, 0x62, 0x1a, 0xf8, 0x11, 0xf7, 0x41, 0xba, 0x75, 0xfd, 0x45, 0xbe, 0x4e,
+	0x32, 0x43, 0xfd, 0xad, 0x0a, 0x5b, 0x29, 0x35, 0x9f, 0xa7, 0xf7, 0xa5, 0x51, 0x49, 0xe9, 0x9d,
+	0xf3, 0x43, 0x31, 0x83, 0x05, 0x7e, 0x96, 0x8e, 0x0f, 0x5d, 0x06, 0xae, 0xf5, 0x42, 0x0f, 0xa1,
+	0xce, 0x9f, 0xd9, 0x22, 0x16, 0xcf, 0x53, 0x58, 0xf8, 0x03, 0x40, 0x51, 0x77, 0xac, 0x6c, 0xa6,
+	0x63, 0x7f, 0x50, 0x4e, 0x59, 0x78, 0x69, 0x29, 0x50, 0xfd, 0xb5, 0x0a, 0xdb, 0xb7, 0x2c, 0x8a,
+	0xbd, 0x70, 0x26, 0x12, 0x28, 0xd0, 0xf8, 0x94, 0x01, 0xa2, 0xef, 0xdc, 0xe4, 0x4f, 0x72, 0xbc,
+	0xf0, 0xfc, 0xa9, 0xed, 0x05, 0xc5, 0x3a, 0x2d, 0x00, 0xfc, 0x3f, 0xc0, 0x24, 0x0c, 0x02, 0x2f,
+	0xb9, 0x76, 0xe3, 0x47, 0x51, 0x5c, 0x09, 0xe1, 0xec, 0x07, 0x2f, 0x11, 0xb5, 0x67, 0x8b, 0x63,
+	0x09, 0xa8, 0x1f, 0xa0, 0x39, 0x08, 0x1f, 0x06, 0xec, 0x13, 0xf3, 0xb9, 0xc6, 0x3e, 0x3f, 0x88,
+	0xfc, 0x99, 0xc1, 0x1b, 0x9f, 0xb8, 0xbe, 0x2f, 0x64, 0x69, 0x52, 0x61, 0xa9, 0x3a, 0x34, 0x29,
+	0x8b, 0xe7, 0xe1, 0x2c, 0x66, 0xf8, 0x05, 0xb4, 0xe3, 0xf4, 0x3e, 0x67, 0x12, 0x4e, 0x99, 0xd8,
+	0x7d, 0x90, 0x41, 0xdd, 0x70, 0xca, 0x78, 0x73, 0x01, 0x8b, 0x63, 0xf7, 0x21, 0x6f, 0x20, 0x37,
+	0xd5, 0x06, 0x48, 0x7a, 0x30, 0x4f, 0x9e, 0xcf, 0x7f, 0x91, 0x40, 0xba, 0xbc, 0xb4, 0xbc, 0x00,
+	0xdf, 0x41, 0x43, 0x48, 0x83, 0x5b, 0x42, 0xc9, 0x34, 0xe4, 0x68, 0x5f, 0x58, 0x2b, 0xc2, 0xa9,
+	0x15, 0x7c, 0x03, 0xf5, 0x3e, 0x4b, 0xf8, 0xff, 0x94, 0xd5, 0xf8, 0x62, 0xfd, 0xf8, 0x89, 0x5a,
+	0xc1, 0x6f, 0x01, 0x86, 0xe1, 0x13, 0x8b, 0xc2, 0xd9, 0xeb, 0xc8, 0x1d, 0x61, 0xe5, 0x1d, 0xa9,
+	0x15, 0x3c, 0x83, 0xb6, 0xf5, 0xb8, 0x48, 0xa6, 0xe1, 0xd3, 0x7a, 0xf1, 0xdf, 0x40, 0x8b, 0xb2,
+	0x71, 0x18, 0x26, 0x6b, 0x45, 0x7f, 0x05, 0x0d, 0x5e, 0x32, 0xdf, 0x99, 0xab, 0xb1, 0xed, 0xe5,
+	0xca, 0x8c, 0xd5, 0x0a, 0xbe, 0xcd, 0x5a, 0x23, 0x23, 0xdc, 0x2d, 0xed, 0xd2, 0x6c, 0xda, 0x8f,
+	0x4a, 0xeb, 0x55, 0xad, 0xe0, 0xf7, 0xd0, 0xb6, 0x58, 0x52, 0x7c, 0xcd, 0x3c, 0x69, 0x0e, 0x1c,
+	0xbd, 0x04, 0xd4, 0x0a, 0x5e, 0x94, 0x7a, 0xfc, 0x7c, 0x8a, 0xcf, 0x94, 0x7e, 0xbe, 0xd4, 0x71,
+	0x6d, 0xce, 0x7b, 0xd8, 0xa2, 0x2c, 0x4e, 0xdc, 0x28, 0xd1, 0xdd, 0x79, 0xe8, 0xaf, 0xc9, 0xba,
+	0x80, 0xb6, 0x60, 0xf5, 0x1e, 0x27, 0xf3, 0x35, 0x49, 0x3f, 0x01, 0x5a, 0x2c, 0x49, 0x9f, 0x9e,
+	0x31, 0x9b, 0x7a, 0x13, 0x37, 0xe1, 0x83, 0xb4, 0x57, 0x7e, 0x92, 0xff, 0xcc, 0x1e, 0xd7, 0xd3,
+	0x1f, 0x47, 0x17, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x83, 0x0f, 0x4c, 0x7d, 0x35, 0x09, 0x00,
+	0x00,
 }
 
 // Reference imports to suppress errors if they are not otherwise used.
@@ -648,6 +899,7 @@
 	PoweronONU(ctx context.Context, in *ONURequest, opts ...grpc.CallOption) (*Response, error)
 	RestartEapol(ctx context.Context, in *ONURequest, opts ...grpc.CallOption) (*Response, error)
 	RestartDhcp(ctx context.Context, in *ONURequest, opts ...grpc.CallOption) (*Response, error)
+	SetAlarmIndication(ctx context.Context, in *AlarmRequest, opts ...grpc.CallOption) (*Response, error)
 }
 
 type bBSimClient struct {
@@ -766,6 +1018,15 @@
 	return out, nil
 }
 
+func (c *bBSimClient) SetAlarmIndication(ctx context.Context, in *AlarmRequest, opts ...grpc.CallOption) (*Response, error) {
+	out := new(Response)
+	err := c.cc.Invoke(ctx, "/bbsim.BBSim/SetAlarmIndication", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // BBSimServer is the server API for BBSim service.
 type BBSimServer interface {
 	Version(context.Context, *Empty) (*VersionNumber, error)
@@ -780,47 +1041,7 @@
 	PoweronONU(context.Context, *ONURequest) (*Response, error)
 	RestartEapol(context.Context, *ONURequest) (*Response, error)
 	RestartDhcp(context.Context, *ONURequest) (*Response, error)
-}
-
-// UnimplementedBBSimServer can be embedded to have forward compatible implementations.
-type UnimplementedBBSimServer struct {
-}
-
-func (*UnimplementedBBSimServer) Version(ctx context.Context, req *Empty) (*VersionNumber, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method Version not implemented")
-}
-func (*UnimplementedBBSimServer) GetOlt(ctx context.Context, req *Empty) (*Olt, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GetOlt not implemented")
-}
-func (*UnimplementedBBSimServer) PoweronOlt(ctx context.Context, req *Empty) (*Response, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method PoweronOlt not implemented")
-}
-func (*UnimplementedBBSimServer) ShutdownOlt(ctx context.Context, req *Empty) (*Response, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method ShutdownOlt not implemented")
-}
-func (*UnimplementedBBSimServer) RebootOlt(ctx context.Context, req *Empty) (*Response, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method RebootOlt not implemented")
-}
-func (*UnimplementedBBSimServer) GetONUs(ctx context.Context, req *Empty) (*ONUs, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GetONUs not implemented")
-}
-func (*UnimplementedBBSimServer) GetONU(ctx context.Context, req *ONURequest) (*ONU, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GetONU not implemented")
-}
-func (*UnimplementedBBSimServer) SetLogLevel(ctx context.Context, req *LogLevel) (*LogLevel, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method SetLogLevel not implemented")
-}
-func (*UnimplementedBBSimServer) ShutdownONU(ctx context.Context, req *ONURequest) (*Response, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method ShutdownONU not implemented")
-}
-func (*UnimplementedBBSimServer) PoweronONU(ctx context.Context, req *ONURequest) (*Response, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method PoweronONU not implemented")
-}
-func (*UnimplementedBBSimServer) RestartEapol(ctx context.Context, req *ONURequest) (*Response, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method RestartEapol not implemented")
-}
-func (*UnimplementedBBSimServer) RestartDhcp(ctx context.Context, req *ONURequest) (*Response, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method RestartDhcp not implemented")
+	SetAlarmIndication(context.Context, *AlarmRequest) (*Response, error)
 }
 
 func RegisterBBSimServer(s *grpc.Server, srv BBSimServer) {
@@ -1043,6 +1264,24 @@
 	return interceptor(ctx, in, info, handler)
 }
 
+func _BBSim_SetAlarmIndication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(AlarmRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BBSimServer).SetAlarmIndication(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bbsim.BBSim/SetAlarmIndication",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BBSimServer).SetAlarmIndication(ctx, req.(*AlarmRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 var _BBSim_serviceDesc = grpc.ServiceDesc{
 	ServiceName: "bbsim.BBSim",
 	HandlerType: (*BBSimServer)(nil),
@@ -1095,6 +1334,10 @@
 			MethodName: "RestartDhcp",
 			Handler:    _BBSim_RestartDhcp_Handler,
 		},
+		{
+			MethodName: "SetAlarmIndication",
+			Handler:    _BBSim_SetAlarmIndication_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "api/bbsim/bbsim.proto",
diff --git a/api/bbsim/bbsim.pb.gw.go b/api/bbsim/bbsim.pb.gw.go
index 9c7f8cb..0f0500b 100644
--- a/api/bbsim/bbsim.pb.gw.go
+++ b/api/bbsim/bbsim.pb.gw.go
@@ -13,7 +13,6 @@
 	"io"
 	"net/http"
 
-	"github.com/golang/protobuf/descriptor"
 	"github.com/golang/protobuf/proto"
 	"github.com/grpc-ecosystem/grpc-gateway/runtime"
 	"github.com/grpc-ecosystem/grpc-gateway/utilities"
@@ -23,13 +22,11 @@
 	"google.golang.org/grpc/status"
 )
 
-// Suppress "imported and not used" errors
 var _ codes.Code
 var _ io.Reader
 var _ status.Status
 var _ = runtime.String
 var _ = utilities.NewDoubleArray
-var _ = descriptor.ForMessage
 
 func request_BBSim_Version_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq Empty
@@ -40,15 +37,6 @@
 
 }
 
-func local_request_BBSim_Version_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq Empty
-	var metadata runtime.ServerMetadata
-
-	msg, err := server.Version(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 func request_BBSim_GetOlt_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq Empty
 	var metadata runtime.ServerMetadata
@@ -58,15 +46,6 @@
 
 }
 
-func local_request_BBSim_GetOlt_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq Empty
-	var metadata runtime.ServerMetadata
-
-	msg, err := server.GetOlt(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 func request_BBSim_GetOlt_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq Empty
 	var metadata runtime.ServerMetadata
@@ -76,15 +55,6 @@
 
 }
 
-func local_request_BBSim_GetOlt_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq Empty
-	var metadata runtime.ServerMetadata
-
-	msg, err := server.GetOlt(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 func request_BBSim_GetONUs_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq Empty
 	var metadata runtime.ServerMetadata
@@ -94,15 +64,6 @@
 
 }
 
-func local_request_BBSim_GetONUs_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq Empty
-	var metadata runtime.ServerMetadata
-
-	msg, err := server.GetONUs(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 func request_BBSim_GetONU_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq ONURequest
 	var metadata runtime.ServerMetadata
@@ -130,141 +91,6 @@
 
 }
 
-func local_request_BBSim_GetONU_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["SerialNumber"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber")
-	}
-
-	protoReq.SerialNumber, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err)
-	}
-
-	msg, err := server.GetONU(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
-// RegisterBBSimHandlerServer registers the http handlers for service BBSim to "mux".
-// UnaryRPC     :call BBSimServer directly.
-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
-func RegisterBBSimHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BBSimServer) error {
-
-	mux.Handle("GET", pattern_BBSim_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSim_Version_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSim_Version_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSim_GetOlt_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSim_GetOlt_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSim_GetOlt_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSim_GetOlt_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSim_GetOlt_1(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSim_GetOlt_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSim_GetONUs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSim_GetONUs_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSim_GetONUs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSim_GetONU_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSim_GetONU_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSim_GetONU_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	return nil
-}
-
 // RegisterBBSimHandlerFromEndpoint is same as RegisterBBSimHandler but
 // automatically dials to "endpoint" and closes the connection when "ctx" gets done.
 func RegisterBBSimHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
diff --git a/api/bbsim/bbsim.proto b/api/bbsim/bbsim.proto
index e147bb5..3cd7336 100644
--- a/api/bbsim/bbsim.proto
+++ b/api/bbsim/bbsim.proto
@@ -58,6 +58,52 @@
     string SerialNumber = 1;
 }
 
+// Alarms
+
+message AlarmType {
+    // These types correspond to the messages permitted in the oneof
+    // in AlarmIndication in the openolt protos
+    enum Types {
+        LOS = 0; // LOS is an OLT alarm for an entire PON
+        DYING_GASP = 1;
+        ONU_ALARM = 2;
+        ONU_STARTUP_FAILURE = 3;
+        ONU_SIGNAL_DEGRADE = 4;
+        ONU_DRIFT_OF_WINDOW = 5;
+        ONU_LOSS_OF_OMCI_CHANNEL = 6;
+        ONU_SIGNALS_FAILURE = 7;
+        ONU_TRANSMISSION_INTERFERENCE_WARNING = 8;
+        ONU_ACTIVATION_FAILURE = 9;
+        ONU_PROCESSING_ERROR = 10;
+        ONU_LOSS_OF_KEY_SYNC_FAILURE = 11;
+        ONU_ITU_PON_STATS = 12;
+
+        // These break out ONU_ALARM, which is a single message, but
+        // includes statuses for these six alarms.
+        ONU_ALARM_LOS = 13;
+        ONU_ALARM_LOB = 14;
+        ONU_ALARM_LOPC_MISS = 15;
+        ONU_ALARM_LOPC_MIC_ERROR = 16;
+        ONU_ALARM_LOFI = 17;
+        ONU_ALARM_LOAMI = 18;
+    }
+}
+
+message AlarmParameter {
+    string Key = 1;
+    string Value = 2;
+}
+
+// AlarmRequest includes fields common to every alarm,
+// plus an optional list of AlarmParemter list that can be used
+// to set additional fields in alarms that support them.
+message AlarmRequest {
+    AlarmType.Types AlarmType = 1;          // name of alarm to raise
+    string SerialNumber = 2;                // serial number of ONU
+    string Status = 3;                      // status of Alarm
+    repeated AlarmParameter Parameters = 4; // optional list of additional parameters
+}
+
 // Utils
 
 message VersionNumber {
@@ -92,4 +138,5 @@
     rpc PoweronONU (ONURequest) returns (Response) {}
     rpc RestartEapol (ONURequest) returns (Response) {}
     rpc RestartDhcp (ONURequest) returns (Response) {}
+    rpc SetAlarmIndication (AlarmRequest) returns (Response) {}
 }
\ No newline at end of file
diff --git a/api/legacy/bbsim.pb.go b/api/legacy/bbsim.pb.go
index 060760b..ad35c64 100644
--- a/api/legacy/bbsim.pb.go
+++ b/api/legacy/bbsim.pb.go
@@ -12,8 +12,6 @@
 	tech_profile "github.com/opencord/voltha-protos/v2/go/tech_profile"
 	_ "google.golang.org/genproto/googleapis/api/annotations"
 	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
 	math "math"
 )
 
@@ -1047,38 +1045,6 @@
 	GetFlows(context.Context, *ONUInfo) (*Flows, error)
 }
 
-// UnimplementedBBSimServiceServer can be embedded to have forward compatible implementations.
-type UnimplementedBBSimServiceServer struct {
-}
-
-func (*UnimplementedBBSimServiceServer) OLTStatus(ctx context.Context, req *Empty) (*OLTStatusResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method OLTStatus not implemented")
-}
-func (*UnimplementedBBSimServiceServer) PortStatus(ctx context.Context, req *PortInfo) (*Ports, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method PortStatus not implemented")
-}
-func (*UnimplementedBBSimServiceServer) ONUStatus(ctx context.Context, req *ONURequest) (*ONUs, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method ONUStatus not implemented")
-}
-func (*UnimplementedBBSimServiceServer) ONUActivate(ctx context.Context, req *ONURequest) (*BBSimResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method ONUActivate not implemented")
-}
-func (*UnimplementedBBSimServiceServer) ONUDeactivate(ctx context.Context, req *ONURequest) (*BBSimResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method ONUDeactivate not implemented")
-}
-func (*UnimplementedBBSimServiceServer) GenerateONUAlarm(ctx context.Context, req *ONUAlarmRequest) (*BBSimResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GenerateONUAlarm not implemented")
-}
-func (*UnimplementedBBSimServiceServer) GenerateOLTAlarm(ctx context.Context, req *OLTAlarmRequest) (*BBSimResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GenerateOLTAlarm not implemented")
-}
-func (*UnimplementedBBSimServiceServer) PerformDeviceAction(ctx context.Context, req *DeviceAction) (*BBSimResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method PerformDeviceAction not implemented")
-}
-func (*UnimplementedBBSimServiceServer) GetFlows(ctx context.Context, req *ONUInfo) (*Flows, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GetFlows not implemented")
-}
-
 func RegisterBBSimServiceServer(s *grpc.Server, srv BBSimServiceServer) {
 	s.RegisterService(&_BBSimService_serviceDesc, srv)
 }
diff --git a/api/legacy/bbsim.pb.gw.go b/api/legacy/bbsim.pb.gw.go
index d56438c..c3667c0 100644
--- a/api/legacy/bbsim.pb.gw.go
+++ b/api/legacy/bbsim.pb.gw.go
@@ -13,7 +13,6 @@
 	"io"
 	"net/http"
 
-	"github.com/golang/protobuf/descriptor"
 	"github.com/golang/protobuf/proto"
 	"github.com/grpc-ecosystem/grpc-gateway/runtime"
 	"github.com/grpc-ecosystem/grpc-gateway/utilities"
@@ -23,13 +22,11 @@
 	"google.golang.org/grpc/status"
 )
 
-// Suppress "imported and not used" errors
 var _ codes.Code
 var _ io.Reader
 var _ status.Status
 var _ = runtime.String
 var _ = utilities.NewDoubleArray
-var _ = descriptor.ForMessage
 
 func request_BBSimService_OLTStatus_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq Empty
@@ -40,15 +37,6 @@
 
 }
 
-func local_request_BBSimService_OLTStatus_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq Empty
-	var metadata runtime.ServerMetadata
-
-	msg, err := server.OLTStatus(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 func request_BBSimService_OLTStatus_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq Empty
 	var metadata runtime.ServerMetadata
@@ -58,15 +46,6 @@
 
 }
 
-func local_request_BBSimService_OLTStatus_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq Empty
-	var metadata runtime.ServerMetadata
-
-	msg, err := server.OLTStatus(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_PortStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{"port_type": 0, "port_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
 )
@@ -116,48 +95,6 @@
 
 }
 
-func local_request_BBSimService_PortStatus_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq PortInfo
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["port_type"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_type")
-	}
-
-	protoReq.PortType, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_type", err)
-	}
-
-	val, ok = pathParams["port_id"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id")
-	}
-
-	protoReq.PortId, err = runtime.Uint32(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_PortStatus_0); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.PortStatus(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
 )
@@ -178,19 +115,6 @@
 
 }
 
-func local_request_BBSimService_ONUStatus_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUStatus_0); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUStatus(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUStatus_1 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "onu_serial": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
 )
@@ -229,37 +153,6 @@
 
 }
 
-func local_request_BBSimService_ONUStatus_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["onu.onu_serial"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUStatus_1); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUStatus(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUStatus_2 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1, "onu_id": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}}
 )
@@ -309,48 +202,6 @@
 
 }
 
-func local_request_BBSimService_ONUStatus_2(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["onu.pon_port_id"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
-	}
-
-	val, ok = pathParams["onu.onu_id"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_id")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_id", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_id", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUStatus_2); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUStatus(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUStatus_3 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
 )
@@ -389,37 +240,6 @@
 
 }
 
-func local_request_BBSimService_ONUStatus_3(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["onu.pon_port_id"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUStatus_3); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUStatus(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUActivate_0 = &utilities.DoubleArray{Encoding: map[string]int{"onus_batch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
 )
@@ -448,27 +268,6 @@
 
 }
 
-func local_request_BBSimService_ONUActivate_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	newReader, berr := utilities.IOReaderFactory(req.Body)
-	if berr != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
-	}
-	if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.OnusBatch); err != nil && err != io.EOF {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUActivate_0); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUActivate(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUActivate_1 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
 )
@@ -507,37 +306,6 @@
 
 }
 
-func local_request_BBSimService_ONUActivate_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["onu.pon_port_id"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUActivate_1); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUActivate(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUActivate_2 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1, "onu_serial": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}}
 )
@@ -587,48 +355,6 @@
 
 }
 
-func local_request_BBSimService_ONUActivate_2(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["onu.pon_port_id"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
-	}
-
-	val, ok = pathParams["onu.onu_serial"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUActivate_2); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUActivate(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUDeactivate_0 = &utilities.DoubleArray{Encoding: map[string]int{"onus_batch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
 )
@@ -657,27 +383,6 @@
 
 }
 
-func local_request_BBSimService_ONUDeactivate_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	newReader, berr := utilities.IOReaderFactory(req.Body)
-	if berr != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
-	}
-	if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.OnusBatch); err != nil && err != io.EOF {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUDeactivate_0); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUDeactivate(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUDeactivate_1 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "onu_serial": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
 )
@@ -716,37 +421,6 @@
 
 }
 
-func local_request_BBSimService_ONUDeactivate_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["onu.onu_serial"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUDeactivate_1); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUDeactivate(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUDeactivate_2 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
 )
@@ -785,37 +459,6 @@
 
 }
 
-func local_request_BBSimService_ONUDeactivate_2(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["onu.pon_port_id"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUDeactivate_2); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUDeactivate(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_ONUDeactivate_3 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1, "onu_id": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}}
 )
@@ -865,48 +508,6 @@
 
 }
 
-func local_request_BBSimService_ONUDeactivate_3(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONURequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["onu.pon_port_id"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
-	}
-
-	val, ok = pathParams["onu.onu_id"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_id")
-	}
-
-	err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_id", val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_id", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUDeactivate_3); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.ONUDeactivate(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 func request_BBSimService_GenerateONUAlarm_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq ONUAlarmRequest
 	var metadata runtime.ServerMetadata
@@ -956,55 +557,6 @@
 
 }
 
-func local_request_BBSimService_GenerateONUAlarm_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONUAlarmRequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["onu_serial"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu_serial")
-	}
-
-	protoReq.OnuSerial, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu_serial", err)
-	}
-
-	val, ok = pathParams["alarm_type"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "alarm_type")
-	}
-
-	protoReq.AlarmType, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "alarm_type", err)
-	}
-
-	val, ok = pathParams["status"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status")
-	}
-
-	protoReq.Status, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err)
-	}
-
-	msg, err := server.GenerateONUAlarm(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 func request_BBSimService_GenerateOLTAlarm_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq OLTAlarmRequest
 	var metadata runtime.ServerMetadata
@@ -1054,55 +606,6 @@
 
 }
 
-func local_request_BBSimService_GenerateOLTAlarm_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq OLTAlarmRequest
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["port_type"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_type")
-	}
-
-	protoReq.PortType, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_type", err)
-	}
-
-	val, ok = pathParams["port_id"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id")
-	}
-
-	protoReq.PortId, err = runtime.Uint32(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err)
-	}
-
-	val, ok = pathParams["status"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status")
-	}
-
-	protoReq.Status, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err)
-	}
-
-	msg, err := server.GenerateOLTAlarm(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_PerformDeviceAction_0 = &utilities.DoubleArray{Encoding: map[string]int{"device_type": 0, "action": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
 )
@@ -1152,48 +655,6 @@
 
 }
 
-func local_request_BBSimService_PerformDeviceAction_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq DeviceAction
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["device_type"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_type")
-	}
-
-	protoReq.DeviceType, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_type", err)
-	}
-
-	val, ok = pathParams["action"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "action")
-	}
-
-	protoReq.Action, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "action", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_PerformDeviceAction_0); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.PerformDeviceAction(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 func request_BBSimService_PerformDeviceAction_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq DeviceAction
 	var metadata runtime.ServerMetadata
@@ -1243,55 +704,6 @@
 
 }
 
-func local_request_BBSimService_PerformDeviceAction_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq DeviceAction
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["device_type"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_type")
-	}
-
-	protoReq.DeviceType, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_type", err)
-	}
-
-	val, ok = pathParams["serial_number"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "serial_number")
-	}
-
-	protoReq.SerialNumber, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "serial_number", err)
-	}
-
-	val, ok = pathParams["action"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "action")
-	}
-
-	protoReq.Action, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "action", err)
-	}
-
-	msg, err := server.PerformDeviceAction(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_GetFlows_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
 )
@@ -1312,19 +724,6 @@
 
 }
 
-func local_request_BBSimService_GetFlows_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONUInfo
-	var metadata runtime.ServerMetadata
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_GetFlows_0); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.GetFlows(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 var (
 	filter_BBSimService_GetFlows_1 = &utilities.DoubleArray{Encoding: map[string]int{"onu_serial": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
 )
@@ -1363,445 +762,6 @@
 
 }
 
-func local_request_BBSimService_GetFlows_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ONUInfo
-	var metadata runtime.ServerMetadata
-
-	var (
-		val string
-		ok  bool
-		err error
-		_   = err
-	)
-
-	val, ok = pathParams["onu_serial"]
-	if !ok {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu_serial")
-	}
-
-	protoReq.OnuSerial, err = runtime.String(val)
-
-	if err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu_serial", err)
-	}
-
-	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_GetFlows_1); err != nil {
-		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
-	}
-
-	msg, err := server.GetFlows(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
-// RegisterBBSimServiceHandlerServer registers the http handlers for service BBSimService to "mux".
-// UnaryRPC     :call BBSimServiceServer directly.
-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
-func RegisterBBSimServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BBSimServiceServer) error {
-
-	mux.Handle("GET", pattern_BBSimService_OLTStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_OLTStatus_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_OLTStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSimService_OLTStatus_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_OLTStatus_1(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_OLTStatus_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSimService_PortStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_PortStatus_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_PortStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSimService_ONUStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUStatus_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSimService_ONUStatus_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUStatus_1(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUStatus_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSimService_ONUStatus_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUStatus_2(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUStatus_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSimService_ONUStatus_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUStatus_3(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUStatus_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("POST", pattern_BBSimService_ONUActivate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUActivate_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUActivate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("POST", pattern_BBSimService_ONUActivate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUActivate_1(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUActivate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("POST", pattern_BBSimService_ONUActivate_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUActivate_2(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUActivate_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUDeactivate_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUDeactivate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUDeactivate_1(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUDeactivate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUDeactivate_2(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUDeactivate_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_ONUDeactivate_3(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_ONUDeactivate_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("POST", pattern_BBSimService_GenerateONUAlarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_GenerateONUAlarm_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_GenerateONUAlarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("POST", pattern_BBSimService_GenerateOLTAlarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_GenerateOLTAlarm_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_GenerateOLTAlarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("PATCH", pattern_BBSimService_PerformDeviceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_PerformDeviceAction_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_PerformDeviceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("PATCH", pattern_BBSimService_PerformDeviceAction_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_PerformDeviceAction_1(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_PerformDeviceAction_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSimService_GetFlows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_GetFlows_0(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_GetFlows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	mux.Handle("GET", pattern_BBSimService_GetFlows_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_BBSimService_GetFlows_1(rctx, inboundMarshaler, server, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_BBSimService_GetFlows_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
-	return nil
-}
-
 // RegisterBBSimServiceHandlerFromEndpoint is same as RegisterBBSimServiceHandler but
 // automatically dials to "endpoint" and closes the connection when "ctx" gets done.
 func RegisterBBSimServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
diff --git a/cmd/bbsimctl/bbsimctl.go b/cmd/bbsimctl/bbsimctl.go
index 6371d83..f82cd64 100644
--- a/cmd/bbsimctl/bbsimctl.go
+++ b/cmd/bbsimctl/bbsimctl.go
@@ -39,6 +39,7 @@
 	commands.RegisterONUCommands(parser)
 	commands.RegisterCompletionCommands(parser)
 	commands.RegisterLoggingCommands(parser)
+	commands.RegisterAlarmCommands(parser)
 
 	_, err = parser.ParseArgs(os.Args[1:])
 	if err != nil {
diff --git a/go.sum b/go.sum
index 2c08395..7ba09a0 100644
--- a/go.sum
+++ b/go.sum
@@ -43,10 +43,12 @@
 github.com/looplab/fsm v0.1.0/go.mod h1:m2VaOfDHxqXBBMgc26m6yUOwkFn8H2AlJDE+jd/uafI=
 github.com/opencord/cordctl v0.0.0-20190909161711-01e9c1f04bf4 h1:Odib2px8tyALzdbyztAAqdxmpmQ/pJahJ7uz8kN/rvk=
 github.com/opencord/cordctl v0.0.0-20190909161711-01e9c1f04bf4/go.mod h1:/+3S0pwQUy7HeKnH0KfKp5W6hmh/LdZzuZTNT/m7vA4=
-github.com/opencord/omci-sim v0.0.1 h1:kME5SsHxoayQGyY4UYe4eUxaWJJoCflAVul0vy8JBr8=
-github.com/opencord/omci-sim v0.0.1/go.mod h1:ToOkj7hkHgoet9XQDadKMhYqgA7qItZsi2j1Pk/mX6Y=
+github.com/opencord/omci-sim v0.0.2 h1:ojEWzeiAgD8Yg7EISYTUD/6vaFk0wzQ6QMtMBYFbIh0=
+github.com/opencord/omci-sim v0.0.2/go.mod h1:ToOkj7hkHgoet9XQDadKMhYqgA7qItZsi2j1Pk/mX6Y=
 github.com/opencord/voltha-protos/v2 v2.1.2 h1:/eX+kXhANbzxTpBHgC6vjwBUGRKKvGUOQRDdDgROp9E=
 github.com/opencord/voltha-protos/v2 v2.1.2/go.mod h1:6kOcfYi1CadWowFxI2SH5wLfHrsRECZLZlD2MFK6WDI=
+github.com/opencord/voltha-protos/v3 v3.1.0 h1:jPBizpoIRlVIy8ZzTpC+cyQQL2esjJgIPvNcilWMDLA=
+github.com/opencord/voltha-protos/v3 v3.1.0/go.mod h1:n60tmoNSjgDGxEH7YGqDhIeiCpQETpnF5wOcNepHvWU=
 github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
diff --git a/internal/bbsim/alarmsim/alarmsim.go b/internal/bbsim/alarmsim/alarmsim.go
new file mode 100644
index 0000000..3c81265
--- /dev/null
+++ b/internal/bbsim/alarmsim/alarmsim.go
@@ -0,0 +1,214 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package alarmsim
+
+import (
+	"context"
+	"fmt"
+	"github.com/opencord/bbsim/api/bbsim"
+	"github.com/opencord/bbsim/internal/bbsim/devices"
+	"github.com/opencord/voltha-protos/v2/go/openolt"
+	"strconv"
+)
+
+// Find a key in the optional AlarmParameters, convert it to an integer,
+// return 'def' if no key exists or it cannot be converted.
+func extractInt(params []*bbsim.AlarmParameter, name string, def int) int {
+	for _, kv := range params {
+		if kv.Key == name {
+			i, err := strconv.Atoi(kv.Value)
+			if err == nil {
+				return i
+			}
+		}
+	}
+	return def
+}
+
+func BuildAlarmIndication(req *bbsim.AlarmRequest, o *devices.OltDevice) (*openolt.AlarmIndication, error) {
+	var alarm *openolt.AlarmIndication
+	var onu *devices.Onu
+	var err error
+
+	if req.AlarmType != bbsim.AlarmType_LOS {
+		// No ONU Id for LOS
+		onu, err = o.FindOnuBySn(req.SerialNumber)
+		if err != nil {
+			return nil, err
+		}
+	}
+
+	switch req.AlarmType {
+	case bbsim.AlarmType_LOS:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_LosInd{&openolt.LosIndication{
+				// No ONU Id for LOS
+				Status: req.Status,
+				IntfId: uint32(extractInt(req.Parameters, "InterfaceId", 0)),
+			}},
+		}
+	case bbsim.AlarmType_DYING_GASP:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_DyingGaspInd{&openolt.DyingGaspIndication{
+				Status: req.Status,
+				OnuId:  onu.ID,
+				IntfId: onu.PonPortID,
+			}},
+		}
+	case bbsim.AlarmType_ONU_STARTUP_FAILURE:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuStartupFailInd{&openolt.OnuStartupFailureIndication{
+				Status: req.Status,
+				OnuId:  onu.ID,
+				IntfId: onu.PonPortID,
+			}},
+		}
+	case bbsim.AlarmType_ONU_SIGNAL_DEGRADE:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuSignalDegradeInd{&openolt.OnuSignalDegradeIndication{
+				Status:              req.Status,
+				OnuId:               onu.ID,
+				IntfId:              onu.PonPortID,
+				InverseBitErrorRate: uint32(extractInt(req.Parameters, "InverseBitErrorRate", 0)),
+			}},
+		}
+	case bbsim.AlarmType_ONU_DRIFT_OF_WINDOW:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuDriftOfWindowInd{&openolt.OnuDriftOfWindowIndication{
+				Status: req.Status,
+				OnuId:  onu.ID,
+				IntfId: onu.PonPortID,
+				Drift:  uint32(extractInt(req.Parameters, "Drift", 0)),
+				NewEqd: uint32(extractInt(req.Parameters, "NewEqd", 0)),
+			}},
+		}
+	case bbsim.AlarmType_ONU_LOSS_OF_OMCI_CHANNEL:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuLossOmciInd{&openolt.OnuLossOfOmciChannelIndication{
+				Status: req.Status,
+				OnuId:  onu.ID,
+				IntfId: onu.PonPortID,
+			}},
+		}
+	case bbsim.AlarmType_ONU_TRANSMISSION_INTERFERENCE_WARNING:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuTiwiInd{&openolt.OnuTransmissionInterferenceWarning{
+				Status: req.Status,
+				OnuId:  onu.ID,
+				IntfId: onu.PonPortID,
+				Drift:  uint32(extractInt(req.Parameters, "Drift", 0)),
+			}},
+		}
+	case bbsim.AlarmType_ONU_ACTIVATION_FAILURE:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuActivationFailInd{&openolt.OnuActivationFailureIndication{
+				OnuId:      onu.ID,
+				IntfId:     onu.PonPortID,
+				FailReason: uint32(extractInt(req.Parameters, "FailReason", 0)),
+			}},
+		}
+	case bbsim.AlarmType_ONU_PROCESSING_ERROR:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuProcessingErrorInd{&openolt.OnuProcessingErrorIndication{
+				OnuId:  onu.ID,
+				IntfId: onu.PonPortID,
+			}},
+		}
+	case bbsim.AlarmType_ONU_LOSS_OF_KEY_SYNC_FAILURE:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuLossOfSyncFailInd{&openolt.OnuLossOfKeySyncFailureIndication{
+				OnuId:  onu.ID,
+				IntfId: onu.PonPortID,
+				Status: req.Status,
+			}},
+		}
+	case bbsim.AlarmType_ONU_ITU_PON_STATS:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuItuPonStatsInd{&openolt.OnuItuPonStatsIndication{
+				OnuId:     onu.ID,
+				IntfId:    onu.PonPortID,
+				RdiErrors: uint32(extractInt(req.Parameters, "RdiErrors", 0)),
+			}},
+		}
+	case bbsim.AlarmType_ONU_ALARM_LOS:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuAlarmInd{&openolt.OnuAlarmIndication{
+				LosStatus: req.Status,
+				OnuId:     onu.ID,
+				IntfId:    onu.PonPortID,
+			}},
+		}
+	case bbsim.AlarmType_ONU_ALARM_LOB:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuAlarmInd{&openolt.OnuAlarmIndication{
+				LobStatus: req.Status,
+				OnuId:     onu.ID,
+				IntfId:    onu.PonPortID,
+			}},
+		}
+	case bbsim.AlarmType_ONU_ALARM_LOPC_MISS:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuAlarmInd{&openolt.OnuAlarmIndication{
+				LopcMissStatus: req.Status,
+				OnuId:          onu.ID,
+				IntfId:         onu.PonPortID,
+			}},
+		}
+	case bbsim.AlarmType_ONU_ALARM_LOPC_MIC_ERROR:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuAlarmInd{&openolt.OnuAlarmIndication{
+				LopcMicErrorStatus: req.Status,
+				OnuId:              onu.ID,
+				IntfId:             onu.PonPortID,
+			}},
+		}
+	case bbsim.AlarmType_ONU_ALARM_LOFI:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuAlarmInd{&openolt.OnuAlarmIndication{
+				LofiStatus: req.Status,
+				OnuId:      onu.ID,
+				IntfId:     onu.PonPortID,
+			}},
+		}
+	case bbsim.AlarmType_ONU_ALARM_LOAMI:
+		alarm = &openolt.AlarmIndication{
+			Data: &openolt.AlarmIndication_OnuAlarmInd{&openolt.OnuAlarmIndication{
+				LoamiStatus: req.Status,
+				OnuId:       onu.ID,
+				IntfId:      onu.PonPortID,
+			}},
+		}
+	default:
+		return nil, fmt.Errorf("Unknown alarm type %v", req.AlarmType)
+	}
+
+	return alarm, nil
+}
+
+func SimulateAlarm(ctx context.Context, req *bbsim.AlarmRequest, o *devices.OltDevice) error {
+	alarmIndication, err := BuildAlarmIndication(req, o)
+	if err != nil {
+		return err
+	}
+
+	err = o.SendAlarmIndication(ctx, alarmIndication)
+	if err != nil {
+		return err
+	}
+
+	return nil
+}
diff --git a/internal/bbsim/api/grpc_api_server.go b/internal/bbsim/api/grpc_api_server.go
index 09e4080..ca311ce 100644
--- a/internal/bbsim/api/grpc_api_server.go
+++ b/internal/bbsim/api/grpc_api_server.go
@@ -21,6 +21,7 @@
 	"fmt"
 
 	"github.com/opencord/bbsim/api/bbsim"
+	"github.com/opencord/bbsim/internal/bbsim/alarmsim"
 	"github.com/opencord/bbsim/internal/bbsim/devices"
 	"github.com/opencord/bbsim/internal/common"
 	log "github.com/sirupsen/logrus"
@@ -129,3 +130,16 @@
 		Caller: log.StandardLogger().ReportCaller,
 	}, nil
 }
+
+func (s BBSimServer) SetAlarmIndication(ctx context.Context, req *bbsim.AlarmRequest) (*bbsim.Response, error) {
+	o := devices.GetOLT()
+	err := alarmsim.SimulateAlarm(ctx, req, o)
+	if err != nil {
+		return nil, err
+	}
+
+	res := &bbsim.Response{}
+	res.StatusCode = int32(codes.OK)
+	res.Message = fmt.Sprintf("Alarm Indication Sent.")
+	return res, nil
+}
diff --git a/internal/bbsim/devices/messageTypes.go b/internal/bbsim/devices/messageTypes.go
index acfd832..fd1d4dc 100644
--- a/internal/bbsim/devices/messageTypes.go
+++ b/internal/bbsim/devices/messageTypes.go
@@ -42,6 +42,8 @@
 	SendEapolFlow  MessageType = 12
 	SendDhcpFlow   MessageType = 13
 	OnuPacketIn    MessageType = 14
+
+	AlarmIndication MessageType = 15 // message data is an openolt.AlarmIndication
 )
 
 func (m MessageType) String() string {
diff --git a/internal/bbsim/devices/olt.go b/internal/bbsim/devices/olt.go
index b16e405..e5ed6bc 100644
--- a/internal/bbsim/devices/olt.go
+++ b/internal/bbsim/devices/olt.go
@@ -411,6 +411,18 @@
 	return nil, errors.New(fmt.Sprintf("Cannot find NniPort with id %d in OLT %d", id, o.ID))
 }
 
+func (o *OltDevice) sendAlarmIndication(alarmInd *openolt.AlarmIndication, stream openolt.Openolt_EnableIndicationServer) {
+	data := &openolt.Indication_AlarmInd{AlarmInd: alarmInd}
+	if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
+		oltLogger.Errorf("Failed to send Alarm Indication: %v", err)
+		return
+	}
+
+	oltLogger.WithFields(log.Fields{
+		"AlarmIndication": alarmInd,
+	}).Debug("Sent Indication_AlarmInd")
+}
+
 func (o *OltDevice) sendOltIndication(msg OltIndicationMessage, stream openolt.Openolt_EnableIndicationServer) {
 	data := &openolt.Indication_OltInd{OltInd: &openolt.OltIndication{OperState: msg.OperState.String()}}
 	if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
@@ -546,6 +558,9 @@
 					o.OperState.Event("disable")
 				}
 				o.sendOltIndication(msg, stream)
+			case AlarmIndication:
+				alarmInd, _ := message.Data.(*openolt.AlarmIndication)
+				o.sendAlarmIndication(alarmInd, stream)
 			case NniIndication:
 				msg, _ := message.Data.(NniIndicationMessage)
 				o.sendNniIndication(msg, stream)
@@ -1016,3 +1031,14 @@
 	oltLogger.Info("received RemoveTrafficSchedulers")
 	return new(openolt.Empty), nil
 }
+
+// assumes caller has properly formulated an openolt.AlarmIndication
+func (o OltDevice) SendAlarmIndication(context context.Context, ind *openolt.AlarmIndication) error {
+	msg := Message{
+		Type: AlarmIndication,
+		Data: ind,
+	}
+
+	o.channel <- msg
+	return nil
+}
diff --git a/internal/bbsimctl/commands/alarms.go b/internal/bbsimctl/commands/alarms.go
new file mode 100755
index 0000000..3e3efec
--- /dev/null
+++ b/internal/bbsimctl/commands/alarms.go
@@ -0,0 +1,188 @@
+/*
+ * Portions copyright 2019-present Open Networking Foundation
+ * Original copyright 2019-present Ciena Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package commands
+
+import (
+	"context"
+	"fmt"
+	"github.com/jessevdk/go-flags"
+	pb "github.com/opencord/bbsim/api/bbsim"
+	"github.com/opencord/bbsim/internal/bbsimctl/config"
+	"github.com/opencord/cordctl/pkg/format"
+	log "github.com/sirupsen/logrus"
+	"os"
+	"strings"
+)
+
+const (
+	DEFAULT_ALARM_LIST_FORMAT = "table{{ .Name }}"
+)
+
+type AlarmListOutput struct {
+	Name string
+}
+
+type AlarmRaise struct {
+	Parameters []string `short:"p" description:"Additional Alarm Parameter in name=value form"`
+	Args       struct {
+		Name         string
+		SerialNumber string
+	} `positional-args:"yes" required:"yes"`
+}
+
+type AlarmClear struct {
+	Parameters []string `short:"p" description:"Additional Alarm Parameter in name=value form"`
+	Args       struct {
+		Name         string
+		SerialNumber string
+	} `positional-args:"yes" required:"yes"`
+}
+
+type AlarmList struct{}
+
+type AlarmOptions struct {
+	Raise AlarmRaise `command:"raise"`
+	Clear AlarmClear `command:"clear"`
+	List  AlarmList  `command:"list"`
+}
+
+var AlarmNameMap = map[string]pb.AlarmType_Types{"DyingGasp": pb.AlarmType_DYING_GASP,
+	"StartupFailure":           pb.AlarmType_ONU_STARTUP_FAILURE,
+	"SignalDegrade":            pb.AlarmType_ONU_SIGNAL_DEGRADE,
+	"DriftOfWindow":            pb.AlarmType_ONU_DRIFT_OF_WINDOW,
+	"LossOfOmciChannel":        pb.AlarmType_ONU_LOSS_OF_OMCI_CHANNEL,
+	"SignalsFailure":           pb.AlarmType_ONU_SIGNALS_FAILURE,
+	"TransmissionInterference": pb.AlarmType_ONU_TRANSMISSION_INTERFERENCE_WARNING,
+	"ActivationFailure":        pb.AlarmType_ONU_ACTIVATION_FAILURE,
+	"ProcessingError":          pb.AlarmType_ONU_PROCESSING_ERROR,
+	"LossOfKeySyncFailure":     pb.AlarmType_ONU_LOSS_OF_KEY_SYNC_FAILURE,
+
+	// Break out OnuAlarm into its subcases.
+	"LossOfSignal":   pb.AlarmType_ONU_ALARM_LOS,
+	"LossOfBurst":    pb.AlarmType_ONU_ALARM_LOB,
+	"LOPC_MISS":      pb.AlarmType_ONU_ALARM_LOPC_MISS,
+	"LOPC_MIC_ERROR": pb.AlarmType_ONU_ALARM_LOPC_MIC_ERROR,
+	"LossOfFrame":    pb.AlarmType_ONU_ALARM_LOFI,
+	"LossOfPloam":    pb.AlarmType_ONU_ALARM_LOAMI,
+
+	// Whole-PON / Non-onu-specific
+	"PonLossOfSignal": pb.AlarmType_LOS,
+}
+
+func alarmNameToEnum(name string) (*pb.AlarmType_Types, error) {
+	v, okay := AlarmNameMap[name]
+	if !okay {
+		return nil, fmt.Errorf("Unknown Alarm Name: %v", name)
+	}
+
+	return &v, nil
+}
+
+// add optional parameters from the command-line to the AlarmRequest
+func addParameters(parameters []string, req *pb.AlarmRequest) error {
+	req.Parameters = make([]*pb.AlarmParameter, len(parameters))
+	for i, kv := range parameters {
+		parts := strings.Split(kv, "=")
+		if len(parts) != 2 {
+			return fmt.Errorf("Invalid parameter %v", kv)
+		}
+		req.Parameters[i] = &pb.AlarmParameter{Key: parts[0], Value: parts[1]}
+	}
+	return nil
+}
+
+func RegisterAlarmCommands(parser *flags.Parser) {
+	parser.AddCommand("alarm", "Alarm Commands", "Commands to raise and clear alarms", &AlarmOptions{})
+}
+
+func (o *AlarmRaise) Execute(args []string) error {
+	alarmType, err := alarmNameToEnum(o.Args.Name)
+	if err != nil {
+		return err
+	}
+
+	client, conn := connect()
+	defer conn.Close()
+
+	ctx, cancel := context.WithTimeout(context.Background(), config.GlobalConfig.Grpc.Timeout)
+	defer cancel()
+
+	req := pb.AlarmRequest{AlarmType: *alarmType,
+		SerialNumber: o.Args.SerialNumber,
+		Status:       "on"}
+
+	err = addParameters(o.Parameters, &req)
+	if err != nil {
+		return err
+	}
+
+	res, err := client.SetAlarmIndication(ctx, &req)
+
+	if err != nil {
+		log.Fatalf("Cannot raise alarm: %v", err)
+		return err
+	}
+
+	fmt.Println(fmt.Sprintf("[Status: %d] %s", res.StatusCode, res.Message))
+	return nil
+}
+
+func (o *AlarmClear) Execute(args []string) error {
+	alarmType, err := alarmNameToEnum(o.Args.Name)
+	if err != nil {
+		return err
+	}
+
+	client, conn := connect()
+	defer conn.Close()
+
+	ctx, cancel := context.WithTimeout(context.Background(), config.GlobalConfig.Grpc.Timeout)
+	defer cancel()
+
+	req := pb.AlarmRequest{AlarmType: *alarmType,
+		SerialNumber: o.Args.SerialNumber,
+		Status:       "off"}
+
+	err = addParameters(o.Parameters, &req)
+	if err != nil {
+		return err
+	}
+
+	res, err := client.SetAlarmIndication(ctx, &req)
+
+	if err != nil {
+		log.Fatalf("Cannot clear alarm: %v", err)
+		return err
+	}
+
+	fmt.Println(fmt.Sprintf("[Status: %d] %s", res.StatusCode, res.Message))
+	return nil
+}
+
+func (o *AlarmList) Execute(args []string) error {
+	alarmNames := make([]AlarmListOutput, len(AlarmNameMap))
+	i := 0
+	for k := range AlarmNameMap {
+		alarmNames[i] = AlarmListOutput{Name: k}
+		i++
+	}
+	// print out
+	tableFormat := format.Format(DEFAULT_ALARM_LIST_FORMAT)
+	tableFormat.Execute(os.Stdout, true, alarmNames)
+	return nil
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 8a7dff5..5d59038 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,6 +1,6 @@
 # github.com/aead/cmac v0.0.0-20160719120800-7af84192f0b1
-github.com/aead/cmac
 github.com/aead/cmac/aes
+github.com/aead/cmac
 # github.com/cboling/omci v0.1.0
 github.com/cboling/omci
 github.com/cboling/omci/generated
@@ -12,21 +12,21 @@
 github.com/golang/glog
 # github.com/golang/protobuf v1.3.2
 github.com/golang/protobuf/descriptor
-github.com/golang/protobuf/jsonpb
 github.com/golang/protobuf/proto
 github.com/golang/protobuf/protoc-gen-go
 github.com/golang/protobuf/protoc-gen-go/descriptor
-github.com/golang/protobuf/protoc-gen-go/generator
-github.com/golang/protobuf/protoc-gen-go/generator/internal/remap
-github.com/golang/protobuf/protoc-gen-go/grpc
-github.com/golang/protobuf/protoc-gen-go/plugin
-github.com/golang/protobuf/ptypes
+github.com/golang/protobuf/jsonpb
 github.com/golang/protobuf/ptypes/any
 github.com/golang/protobuf/ptypes/duration
-github.com/golang/protobuf/ptypes/empty
-github.com/golang/protobuf/ptypes/struct
 github.com/golang/protobuf/ptypes/timestamp
 github.com/golang/protobuf/ptypes/wrappers
+github.com/golang/protobuf/ptypes
+github.com/golang/protobuf/ptypes/struct
+github.com/golang/protobuf/ptypes/empty
+github.com/golang/protobuf/protoc-gen-go/generator
+github.com/golang/protobuf/protoc-gen-go/grpc
+github.com/golang/protobuf/protoc-gen-go/plugin
+github.com/golang/protobuf/protoc-gen-go/generator/internal/remap
 # github.com/google/go-cmp v0.2.0
 github.com/google/go-cmp/cmp
 github.com/google/go-cmp/cmp/internal/diff
@@ -39,74 +39,77 @@
 # github.com/gorilla/mux v1.7.3
 github.com/gorilla/mux
 # github.com/grpc-ecosystem/grpc-gateway v1.11.3
-github.com/grpc-ecosystem/grpc-gateway/codegenerator
-github.com/grpc-ecosystem/grpc-gateway/internal
-github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
-github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/descriptor
-github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/generator
-github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/gengateway
-github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/httprule
-github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
-github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger
-github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options
 github.com/grpc-ecosystem/grpc-gateway/runtime
 github.com/grpc-ecosystem/grpc-gateway/utilities
+github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options
+github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
+github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
+github.com/grpc-ecosystem/grpc-gateway/internal
+github.com/grpc-ecosystem/grpc-gateway/codegenerator
+github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/descriptor
+github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/gengateway
+github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger
+github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/httprule
+github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/generator
 # github.com/jessevdk/go-flags v1.4.0
 github.com/jessevdk/go-flags
 # github.com/jhump/protoreflect v1.5.0
-github.com/jhump/protoreflect/codec
 github.com/jhump/protoreflect/desc
-github.com/jhump/protoreflect/desc/internal
 github.com/jhump/protoreflect/dynamic
+github.com/jhump/protoreflect/desc/internal
 github.com/jhump/protoreflect/internal
+github.com/jhump/protoreflect/codec
 # github.com/konsorten/go-windows-terminal-sequences v1.0.1
 github.com/konsorten/go-windows-terminal-sequences
 # github.com/looplab/fsm v0.1.0
 github.com/looplab/fsm
 # github.com/opencord/cordctl v0.0.0-20190909161711-01e9c1f04bf4
 github.com/opencord/cordctl/pkg/format
-# github.com/opencord/omci-sim v0.0.1
+# github.com/opencord/omci-sim v0.0.2
 github.com/opencord/omci-sim
 # github.com/opencord/voltha-protos/v2 v2.1.2
 github.com/opencord/voltha-protos/v2/go/openolt
 github.com/opencord/voltha-protos/v2/go/tech_profile
+# github.com/opencord/voltha-protos/v3 v3.1.0
+github.com/opencord/voltha-protos/v3/go/openolt
+github.com/opencord/voltha-protos/v3/go/tech_profile
 # github.com/pkg/errors v0.8.1
 github.com/pkg/errors
 # github.com/sirupsen/logrus v1.4.2
 github.com/sirupsen/logrus
 # golang.org/x/net v0.0.0-20190724013045-ca1201d0de80
-golang.org/x/net/context
-golang.org/x/net/http/httpguts
+golang.org/x/net/trace
+golang.org/x/net/internal/timeseries
 golang.org/x/net/http2
 golang.org/x/net/http2/hpack
+golang.org/x/net/context
+golang.org/x/net/http/httpguts
 golang.org/x/net/idna
-golang.org/x/net/internal/timeseries
-golang.org/x/net/trace
 # golang.org/x/sys v0.0.0-20190422165155-953cdadca894
 golang.org/x/sys/unix
 # golang.org/x/text v0.3.0
 golang.org/x/text/secure/bidirule
-golang.org/x/text/transform
 golang.org/x/text/unicode/bidi
 golang.org/x/text/unicode/norm
+golang.org/x/text/transform
 # google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610
 google.golang.org/genproto/googleapis/api/annotations
 google.golang.org/genproto/googleapis/api/httpbody
-google.golang.org/genproto/googleapis/rpc/status
 google.golang.org/genproto/protobuf/field_mask
+google.golang.org/genproto/googleapis/rpc/status
 # google.golang.org/grpc v1.22.1
 google.golang.org/grpc
-google.golang.org/grpc/balancer
-google.golang.org/grpc/balancer/base
-google.golang.org/grpc/balancer/roundrobin
-google.golang.org/grpc/binarylog/grpc_binarylog_v1
 google.golang.org/grpc/codes
+google.golang.org/grpc/grpclog
+google.golang.org/grpc/status
+google.golang.org/grpc/reflection
+google.golang.org/grpc/metadata
+google.golang.org/grpc/balancer
+google.golang.org/grpc/balancer/roundrobin
 google.golang.org/grpc/connectivity
 google.golang.org/grpc/credentials
-google.golang.org/grpc/credentials/internal
 google.golang.org/grpc/encoding
 google.golang.org/grpc/encoding/proto
-google.golang.org/grpc/grpclog
 google.golang.org/grpc/internal
 google.golang.org/grpc/internal/backoff
 google.golang.org/grpc/internal/balancerload
@@ -115,26 +118,26 @@
 google.golang.org/grpc/internal/envconfig
 google.golang.org/grpc/internal/grpcrand
 google.golang.org/grpc/internal/grpcsync
-google.golang.org/grpc/internal/syscall
 google.golang.org/grpc/internal/transport
 google.golang.org/grpc/keepalive
-google.golang.org/grpc/metadata
 google.golang.org/grpc/naming
 google.golang.org/grpc/peer
-google.golang.org/grpc/reflection
-google.golang.org/grpc/reflection/grpc_reflection_v1alpha
 google.golang.org/grpc/resolver
 google.golang.org/grpc/resolver/dns
 google.golang.org/grpc/resolver/passthrough
 google.golang.org/grpc/serviceconfig
 google.golang.org/grpc/stats
-google.golang.org/grpc/status
 google.golang.org/grpc/tap
+google.golang.org/grpc/reflection/grpc_reflection_v1alpha
+google.golang.org/grpc/balancer/base
+google.golang.org/grpc/credentials/internal
+google.golang.org/grpc/binarylog/grpc_binarylog_v1
+google.golang.org/grpc/internal/syscall
 # gopkg.in/yaml.v2 v2.2.2
 gopkg.in/yaml.v2
 # gotest.tools v2.2.0+incompatible
 gotest.tools/assert
 gotest.tools/assert/cmp
-gotest.tools/internal/difflib
 gotest.tools/internal/format
 gotest.tools/internal/source
+gotest.tools/internal/difflib
