SEBA-349 GRPC
added xos proto files

Change-Id: I59feae392782331d11e1ac506c18f772ccfb8898
diff --git a/Makefile b/Makefile
index b470f16..146ad3d 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,12 @@
 CLIENT_PKG_BUILD := "${PKG}/client"
 PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
 DOCKERTAG ?= "latest"
+SEBA_PROTO_PATH := contrib/xos
+SEBA_SCHEMA_PATH := contrib/schema
+SEBA_PROTO_FILES := $(wildcard contrib/xos/*.proto)
+SEBA_PROTO_GO_FILES := $(foreach f,$(SEBA_PROTO_FILES),$(subst .proto,.pb.go,$(f)))
+SEBA_PROTO_DESC_FILES := $(foreach f,$(SEBA_PROTO_FILES),$(subst .proto,.desc,$(f)))
+
 
 .PHONY: all api server client test docker
 
@@ -43,14 +49,26 @@
 	--grpc-gateway_out=logtostderr=true:api \
 	 api/abstract_olt_api.proto
 
-api/xos.pb.go:
-	@protoc -I seba-api/ \
-	   -I${GOPATH}/src \
-	  -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
-	  -I${GOPATH}/src/github.com/googleapis/google/api \
-	  -I${GOPATH}/src/github.com/googleapis/ \
-	  --go_out=plugins=grpc:seba-api \
-	  seba-api/xos.proto
+seba-api:  schema/schema.pb.go $(SEBA_PROTO_GO_FILES)
+
+%.pb.go: %.proto
+	@protoc -I ${SEBA_PROTO_PATH} \
+                -I ${SEBA_SCHEMA_PATH} \
+                --go_out=plugins=grpc:${SEBA_PROTO_PATH} \
+                 -I${GOPATH}/src \
+                 -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
+                 $<
+
+schema/schema.pb.go:
+	@protoc -I ${SEBA_PROTO_PATH} \
+                -I ${SEBA_SCHEMA_PATH} \
+                --go_out=plugins=grpc:${SEBA_SCHEMA_PATH} \
+                -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
+                 --descriptor_set_out=${SEBA_SCHEMA_PATH}/schema.desc \
+                 --include_imports \
+                 --include_source_info \
+                 ${SEBA_SCHEMA_PATH}/schema.proto
+
 
 
 swagger:
@@ -65,15 +83,17 @@
 dep: ## Get the dependencies
 	@go get -v -d ./...
 
-server: dep api ## Build the binary file for server
+server: api seba-api dep ## Build the binary file for server
 	@go build -i -v -o $(SERVER_OUT) $(SERVER_PKG_BUILD)
 
-client: dep api ## Build the binary file for client
+client:  api dep## Build the binary file for client
 	@go build -i -v -o $(CLIENT_OUT) $(CLIENT_PKG_BUILD)
 
 clean: ## Remove previous builds
 	@rm $(SERVER_OUT) $(CLIENT_OUT) $(API_OUT) $(API_REST_OUT) $(SWAGGER_OUT)
-	@rm -rf seba-api
+	@rm contrib/xos/*.go
+	@rm contrib/schema/*.go
+
 
 test: all
 	@go test ./...
diff --git a/api/abstract_olt_api.proto b/api/abstract_olt_api.proto
index f592b38..9fb79e0 100644
--- a/api/abstract_olt_api.proto
+++ b/api/abstract_olt_api.proto
@@ -52,15 +52,15 @@
    fixed32 NumPorts = 5;
    bool Activate = 6;
    enum OltDriver {
-      openoltDriver= 0;
-      asfvolt16Driver=1;
-      adtranDriver=2;
-      tibitsDriver=3;
+      openolt= 0;
+      asfvolt16=1;
+      adtran=2;
+      tibits=3;
    }
    OltDriver Driver=7;
    enum OltType{
       edgecore=0;
-      adtran=1;
+      adtranOlt=1;
       tibit=2;
    }
    OltType Type=8;
diff --git a/client/main.go b/client/main.go
index 4f981bd..39a4bf8 100644
--- a/client/main.go
+++ b/client/main.go
@@ -270,7 +270,7 @@
 	}
 	switch *driver {
 	case "openolt":
-		driverType = api.AddOLTChassisMessage_openoltDriver
+		driverType = api.AddOLTChassisMessage_openolt
 
 	}
 
@@ -310,7 +310,7 @@
 	fmt.Println("tech_profile", *techProfile)
 	fmt.Println("speed_profile", *speedProfile)
 	res, err := c.PreProvisionOnt(context.Background(), &api.PreProvisionOntMessage{CLLI: *clli, SlotNumber: int32(*slot), PortNumber: int32(*port),
-		OntNumber: int32(*ont), STag: uint32(*stag), CTag: uint32(*ctag), TechProfile: *techProfile, SpeedProfile: *speedProfile})
+		OntNumber: int32(*ont), STag: uint32(*stag), CTag: uint32(*ctag), NasPortID: *nasPort, CircuitID: *circuitID, TechProfile: *techProfile, SpeedProfile: *speedProfile})
 	if err != nil {
 		debug.PrintStack()
 		fmt.Printf("Error when calling ProvsionOnt %s", err)
diff --git a/cmd/AbstractOLT/AbstractOLT.go b/cmd/AbstractOLT/AbstractOLT.go
index 5da82d6..d3c177c 100644
--- a/cmd/AbstractOLT/AbstractOLT.go
+++ b/cmd/AbstractOLT/AbstractOLT.go
@@ -217,6 +217,14 @@
 	settings.SetDebug(*debugPtr)
 	settings.SetMongo(*useMongo)
 	settings.SetMongodb(*mongodb)
+	if len(*mongodb) > 1 {
+		userPassHost := strings.Split(*mongodb, "://")[1]
+		passwdHost := strings.Split(userPassHost, ":")
+		user := strings.Split(userPassHost, ":")[0]
+		password := strings.Split(passwdHost[1], "@")[0]
+		settings.SetMongoUser(user)
+		settings.SetMongoPassword(password)
+	}
 	settings.SetGrpc(*grpc)
 	fmt.Println("Startup Params: debug:", *debugPtr, " Authentication:", *useAuthentication, " SSL:", *useSsl, "Cert Directory", *certDirectory,
 		"ListenAddress:", *listenAddress, " grpc port:", *grpcPort, " rest port:", *restPort, "Logging to ", *logFile, "Use XOS GRPC ", *grpc)
@@ -262,7 +270,7 @@
 	// infinite loop
 	if *useMongo {
 		clientOptions := options.Client()
-		creds := options.Credential{AuthMechanism: "SCRAM-SHA-256", AuthSource: "AbstractOLT", Username: "seba", Password: "seba"}
+		creds := options.Credential{AuthMechanism: "SCRAM-SHA-256", AuthSource: "AbstractOLT", Username: settings.GetMongoUser(), Password: settings.GetMongoPassword()}
 		clientOptions.SetAuth(creds)
 
 		client, err := mongo.NewClientWithOptions(*mongodb, clientOptions)
diff --git a/contrib/schema/schema.proto b/contrib/schema/schema.proto
new file mode 100644
index 0000000..d6e4e01
--- /dev/null
+++ b/contrib/schema/schema.proto
@@ -0,0 +1,38 @@
+syntax = "proto3";
+
+package schema;
+
+import "google/protobuf/empty.proto";
+import "annotations.proto";
+
+// Contains the name and content of a *.proto file
+message ProtoFile {
+    string file_name = 1;  // name of proto file
+    string proto = 2;  // content of proto file
+    bytes descriptor = 3;  // compiled descriptor for proto (zlib compressed)
+}
+
+// Proto files and compiled descriptors for this interface
+message Schemas {
+
+    // Proto files
+    repeated ProtoFile protos = 1;
+
+    // Proto file name from which swagger.json shall be generated
+    string swagger_from = 2;
+
+    // Proto file name from which yang schemas shall be generated
+    string yang_from = 3;
+}
+
+// Schema services
+service SchemaService {
+
+    // Return active grpc schemas
+    rpc GetSchema(google.protobuf.Empty) returns (Schemas) {
+        option (googleapi.http) = {
+            get: "/schema"
+        };
+    }
+
+}
diff --git a/contrib/xos/annotations.proto b/contrib/xos/annotations.proto
new file mode 100644
index 0000000..2ed81a6
--- /dev/null
+++ b/contrib/xos/annotations.proto
@@ -0,0 +1,34 @@
+// Copyright (c) 2015, Google Inc.
+// Modififications (C) 2018, 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.
+
+// See NOTE in http.proto for the modifications made to these files
+
+syntax = "proto3";
+
+package googleapi;
+
+import "http.proto";
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "AnnotationsProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.MethodOptions {
+  // See `HttpRule`.
+  HttpRule http = 72295728;
+}
diff --git a/contrib/xos/common.proto b/contrib/xos/common.proto
new file mode 100644
index 0000000..5f82f7d
--- /dev/null
+++ b/contrib/xos/common.proto
@@ -0,0 +1,39 @@
+syntax = "proto3";
+
+package xos;
+
+message ID {
+    int32 id = 1;
+}
+
+message QueryElement {
+    enum QueryOperator {
+        EQUAL = 0;
+        GREATER_THAN = 1;
+        LESS_THAN = 2;
+        GREATER_THAN_OR_EQUAL = 3;
+        LESS_THAN_OR_EQUAL = 4;
+        IEXACT = 5;
+    }
+    QueryOperator operator = 1;
+    bool invert = 2;
+    string name = 3;
+    oneof value {
+        string sValue = 4;
+        int32 iValue = 5;
+    }
+};
+
+message Query {
+    enum QueryKind {
+        DEFAULT=0;
+        ALL=1;
+        SYNCHRONIZER_DIRTY_OBJECTS = 2;
+        SYNCHRONIZER_DELETED_OBJECTS = 3;
+        SYNCHRONIZER_DIRTY_POLICIES = 4;
+        SYNCHRONIZER_DELETED_POLICIES = 5;
+    }
+    QueryKind kind = 1;
+    repeated QueryElement elements = 2;
+};
+
diff --git a/contrib/xos/dynamicload.proto b/contrib/xos/dynamicload.proto
new file mode 100644
index 0000000..0279f71
--- /dev/null
+++ b/contrib/xos/dynamicload.proto
@@ -0,0 +1,90 @@
+syntax = "proto3";
+
+package xos;
+
+import "google/protobuf/empty.proto";
+import "annotations.proto";
+
+message Xproto {
+    string filename = 1;
+    string contents = 2;
+}
+
+message DeclFile {
+    string filename = 1;
+    string contents = 2;
+};
+
+message AtticFile {
+    string filename = 1;
+    string contents = 2;
+};
+
+message APIConvenienceFile {
+    string filename = 1;
+    string contents = 2;
+};
+
+message LoadModelsRequest {
+    string name = 1;
+    string version = 2;
+    repeated Xproto xprotos = 3;
+    repeated DeclFile decls = 4;
+    repeated AtticFile attics = 5;
+    repeated APIConvenienceFile convenience_methods = 6;
+};
+
+message ListConvenienceMethodsReply {
+    repeated APIConvenienceFile convenience_methods = 1;
+}
+
+message LoadModelsReply {
+    enum LoadModelsStatus {
+        SUCCESS = 0;
+        ERROR = 1;
+    }
+    LoadModelsStatus status = 1;
+};
+
+message UnloadModelsRequest {
+    string name = 1;
+    string version = 2;
+};
+
+message ServiceModelStatus {
+    string name = 1;
+    string version = 2;
+    string state = 3;
+};
+
+message LoadStatusReply {
+    int32 model_status = 1;
+    string model_output = 2;
+    repeated ServiceModelStatus services = 3;
+}
+
+service dynamicload {
+  rpc LoadModels(LoadModelsRequest) returns (LoadModelsReply) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/dynamicload/load_models"
+            body: "*"
+        };
+  }
+  rpc UnloadModels(UnloadModelsRequest) returns (LoadModelsReply) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/dynamicload/unload_models"
+            body: "*"
+        };
+  }
+  rpc GetLoadStatus(google.protobuf.Empty) returns (LoadStatusReply) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/dynamicload/load_status"
+        };
+  }
+  rpc GetConvenienceMethods(google.protobuf.Empty) returns (ListConvenienceMethodsReply) {
+        option (googleapi.http) = {
+            // NOTE do we need to expose this via rest? maybe for debug...
+            get: "/xosapi/v1/dynamicload/convenience_methods"
+        };
+  }
+};
diff --git a/contrib/xos/http.proto b/contrib/xos/http.proto
new file mode 100644
index 0000000..99d0ce3
--- /dev/null
+++ b/contrib/xos/http.proto
@@ -0,0 +1,353 @@
+// Copyright 2018 Google LLC
+// Modififications (C) 2018, 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.
+
+// NOTE: On the provenance of and modifications to http.proto and
+// annotations.proto
+//
+// TL;DR: The files http.proto and annotations.proto are originally from here:
+//  https://github.com/googleapis/googleapis
+// They have been modified slightly to avoid a namespace conflict.
+//
+// Long winded explanation:
+// These files are designed to interact with Google's first party API's, and
+// the recommended way to use them is to compiled them to code with protoc and
+// included in your codebase before being used.  Due to the fact that we're not
+// using them that way, and because of how Chameleon and XOS work (dynamically
+// defining our own API's), we have to ship these *.proto files as a part of
+// our artifacts.
+//
+// The problems start when you try to include these specific .proto files in
+// python. The protoc compiler includes the `google.protobuf` classes, which
+// python can look up in the standard python library path. Unfortunately these
+// files are namespaced with `google.api` in the path and aren't shipped with
+// protoc.  This leads to a path conflict - you can't have two library paths
+// start with the same path component (`google` in this case) without getting
+// an "ImportError: No module named ..." on one of the paths when you import
+// them.
+//
+// Historically, various confusing hacks were implemented to override and
+// special-case the python `include` directive to include a file at a different
+// path than was specified. These hacks also failed when updating the base OS,
+// and would likely continue to fail in other, stranger ways as we update the
+// codebase.  Specifically, Python 3 reimplemented these features in the
+// importlib section of the standard library, so there's little confidence our
+// hacks would continue to work.  As an aside, there are various protobuf
+// `options` statements to deal with this sort of issue in other languages (see
+// the `go_package` and `java_package` below ) but these don't currently exist
+// for python: https://github.com/google/protobuf/issues/973
+//
+// To avoid this entire psychotic namespace hellscape, it's much easier to
+// modify these files to remove the google.api path component, and have them
+// included directly at a path of our own choice.
+
+syntax = "proto3";
+
+package googleapi;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "HttpProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+
+// Defines the HTTP configuration for an API service. It contains a list of
+// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+// to one or more HTTP REST API methods.
+message Http {
+  // A list of HTTP configuration rules that apply to individual API methods.
+  //
+  // **NOTE:** All service configuration rules follow "last one wins" order.
+  repeated HttpRule rules = 1;
+
+  // When set to true, URL path parmeters will be fully URI-decoded except in
+  // cases of single segment matches in reserved expansion, where "%2F" will be
+  // left encoded.
+  //
+  // The default behavior is to not decode RFC 6570 reserved characters in multi
+  // segment matches.
+  bool fully_decode_reserved_expansion = 2;
+}
+
+// `HttpRule` defines the mapping of an RPC method to one or more HTTP
+// REST API methods. The mapping specifies how different portions of the RPC
+// request message are mapped to URL path, URL query parameters, and
+// HTTP request body. The mapping is typically specified as an
+// `google.api.http` annotation on the RPC method,
+// see "google/api/annotations.proto" for details.
+//
+// The mapping consists of a field specifying the path template and
+// method kind.  The path template can refer to fields in the request
+// message, as in the example below which describes a REST GET
+// operation on a resource collection of messages:
+//
+//
+//     service Messaging {
+//       rpc GetMessage(GetMessageRequest) returns (Message) {
+//         option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
+//       }
+//     }
+//     message GetMessageRequest {
+//       message SubMessage {
+//         string subfield = 1;
+//       }
+//       string message_id = 1; // mapped to the URL
+//       SubMessage sub = 2;    // `sub.subfield` is url-mapped
+//     }
+//     message Message {
+//       string text = 1; // content of the resource
+//     }
+//
+// The same http annotation can alternatively be expressed inside the
+// `GRPC API Configuration` YAML file.
+//
+//     http:
+//       rules:
+//         - selector: <proto_package_name>.Messaging.GetMessage
+//           get: /v1/messages/{message_id}/{sub.subfield}
+//
+// This definition enables an automatic, bidrectional mapping of HTTP
+// JSON to RPC. Example:
+//
+// HTTP | RPC
+// -----|-----
+// `GET /v1/messages/123456/foo`  | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))`
+//
+// In general, not only fields but also field paths can be referenced
+// from a path pattern. Fields mapped to the path pattern cannot be
+// repeated and must have a primitive (non-message) type.
+//
+// Any fields in the request message which are not bound by the path
+// pattern automatically become (optional) HTTP query
+// parameters. Assume the following definition of the request message:
+//
+//
+//     service Messaging {
+//       rpc GetMessage(GetMessageRequest) returns (Message) {
+//         option (google.api.http).get = "/v1/messages/{message_id}";
+//       }
+//     }
+//     message GetMessageRequest {
+//       message SubMessage {
+//         string subfield = 1;
+//       }
+//       string message_id = 1; // mapped to the URL
+//       int64 revision = 2;    // becomes a parameter
+//       SubMessage sub = 3;    // `sub.subfield` becomes a parameter
+//     }
+//
+//
+// This enables a HTTP JSON to RPC mapping as below:
+//
+// HTTP | RPC
+// -----|-----
+// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
+//
+// Note that fields which are mapped to HTTP parameters must have a
+// primitive type or a repeated primitive type. Message types are not
+// allowed. In the case of a repeated type, the parameter can be
+// repeated in the URL, as in `...?param=A&param=B`.
+//
+// For HTTP method kinds which allow a request body, the `body` field
+// specifies the mapping. Consider a REST update method on the
+// message resource collection:
+//
+//
+//     service Messaging {
+//       rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+//         option (google.api.http) = {
+//           put: "/v1/messages/{message_id}"
+//           body: "message"
+//         };
+//       }
+//     }
+//     message UpdateMessageRequest {
+//       string message_id = 1; // mapped to the URL
+//       Message message = 2;   // mapped to the body
+//     }
+//
+//
+// The following HTTP JSON to RPC mapping is enabled, where the
+// representation of the JSON in the request body is determined by
+// protos JSON encoding:
+//
+// HTTP | RPC
+// -----|-----
+// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+//
+// The special name `*` can be used in the body mapping to define that
+// every field not bound by the path template should be mapped to the
+// request body.  This enables the following alternative definition of
+// the update method:
+//
+//     service Messaging {
+//       rpc UpdateMessage(Message) returns (Message) {
+//         option (google.api.http) = {
+//           put: "/v1/messages/{message_id}"
+//           body: "*"
+//         };
+//       }
+//     }
+//     message Message {
+//       string message_id = 1;
+//       string text = 2;
+//     }
+//
+//
+// The following HTTP JSON to RPC mapping is enabled:
+//
+// HTTP | RPC
+// -----|-----
+// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
+//
+// Note that when using `*` in the body mapping, it is not possible to
+// have HTTP parameters, as all fields not bound by the path end in
+// the body. This makes this option more rarely used in practice of
+// defining REST APIs. The common usage of `*` is in custom methods
+// which don't use the URL at all for transferring data.
+//
+// It is possible to define multiple HTTP methods for one RPC by using
+// the `additional_bindings` option. Example:
+//
+//     service Messaging {
+//       rpc GetMessage(GetMessageRequest) returns (Message) {
+//         option (google.api.http) = {
+//           get: "/v1/messages/{message_id}"
+//           additional_bindings {
+//             get: "/v1/users/{user_id}/messages/{message_id}"
+//           }
+//         };
+//       }
+//     }
+//     message GetMessageRequest {
+//       string message_id = 1;
+//       string user_id = 2;
+//     }
+//
+//
+// This enables the following two alternative HTTP JSON to RPC
+// mappings:
+//
+// HTTP | RPC
+// -----|-----
+// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
+// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
+//
+// # Rules for HTTP mapping
+//
+// The rules for mapping HTTP path, query parameters, and body fields
+// to the request message are as follows:
+//
+// 1. The `body` field specifies either `*` or a field path, or is
+//    omitted. If omitted, it indicates there is no HTTP request body.
+// 2. Leaf fields (recursive expansion of nested messages in the
+//    request) can be classified into three types:
+//     (a) Matched in the URL template.
+//     (b) Covered by body (if body is `*`, everything except (a) fields;
+//         else everything under the body field)
+//     (c) All other fields.
+// 3. URL query parameters found in the HTTP request are mapped to (c) fields.
+// 4. Any body sent with an HTTP request can contain only (b) fields.
+//
+// The syntax of the path template is as follows:
+//
+//     Template = "/" Segments [ Verb ] ;
+//     Segments = Segment { "/" Segment } ;
+//     Segment  = "*" | "**" | LITERAL | Variable ;
+//     Variable = "{" FieldPath [ "=" Segments ] "}" ;
+//     FieldPath = IDENT { "." IDENT } ;
+//     Verb     = ":" LITERAL ;
+//
+// The syntax `*` matches a single path segment. The syntax `**` matches zero
+// or more path segments, which must be the last part of the path except the
+// `Verb`. The syntax `LITERAL` matches literal text in the path.
+//
+// The syntax `Variable` matches part of the URL path as specified by its
+// template. A variable template must not contain other variables. If a variable
+// matches a single path segment, its template may be omitted, e.g. `{var}`
+// is equivalent to `{var=*}`.
+//
+// If a variable contains exactly one path segment, such as `"{var}"` or
+// `"{var=*}"`, when such a variable is expanded into a URL path, all characters
+// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the
+// Discovery Document as `{var}`.
+//
+// If a variable contains one or more path segments, such as `"{var=foo/*}"`
+// or `"{var=**}"`, when such a variable is expanded into a URL path, all
+// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables
+// show up in the Discovery Document as `{+var}`.
+//
+// NOTE: While the single segment variable matches the semantics of
+// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2
+// Simple String Expansion, the multi segment variable **does not** match
+// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion
+// does not expand special characters like `?` and `#`, which would lead
+// to invalid URLs.
+//
+// NOTE: the field paths in variables and in the `body` must not refer to
+// repeated fields or map fields.
+message HttpRule {
+  // Selects methods to which this rule applies.
+  //
+  // Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
+  string selector = 1;
+
+  // Determines the URL pattern is matched by this rules. This pattern can be
+  // used with any of the {get|put|post|delete|patch} methods. A custom method
+  // can be defined using the 'custom' field.
+  oneof pattern {
+    // Used for listing and getting information about resources.
+    string get = 2;
+
+    // Used for updating a resource.
+    string put = 3;
+
+    // Used for creating a resource.
+    string post = 4;
+
+    // Used for deleting a resource.
+    string delete = 5;
+
+    // Used for updating a resource.
+    string patch = 6;
+
+    // The custom pattern is used for specifying an HTTP method that is not
+    // included in the `pattern` field, such as HEAD, or "*" to leave the
+    // HTTP method unspecified for this rule. The wild-card rule is useful
+    // for services that provide content to Web (HTML) clients.
+    CustomHttpPattern custom = 8;
+  }
+
+  // The name of the request field whose value is mapped to the HTTP body, or
+  // `*` for mapping all fields not captured by the path pattern to the HTTP
+  // body. NOTE: the referred field must not be a repeated field and must be
+  // present at the top-level of request message type.
+  string body = 7;
+
+  // Additional HTTP bindings for the selector. Nested bindings must
+  // not contain an `additional_bindings` field themselves (that is,
+  // the nesting may only be one level deep).
+  repeated HttpRule additional_bindings = 11;
+}
+
+// A custom pattern is used for defining custom HTTP verb.
+message CustomHttpPattern {
+  // The name of this custom HTTP verb.
+  string kind = 1;
+
+  // The path matched by this custom verb.
+  string path = 2;
+}
diff --git a/contrib/xos/modeldefs.proto b/contrib/xos/modeldefs.proto
new file mode 100644
index 0000000..1df3234
--- /dev/null
+++ b/contrib/xos/modeldefs.proto
@@ -0,0 +1,61 @@
+syntax = "proto3";
+
+package xos;
+
+import "google/protobuf/empty.proto";
+import "annotations.proto";
+
+// This API is used by the UI to validate fields.
+
+message FieldValidator {
+    string name = 1;
+    oneof val_value {
+        bool bool_value = 2;
+        int64 int_value = 3;
+        string str_value = 4;
+    };
+};
+
+message FieldOption {
+    string id = 1;
+    string label = 2;
+}
+
+message FieldRelation {
+    string model = 1;
+    string type = 2;
+    string on_field = 3;
+};
+
+message ModelField {
+    string name = 1;
+    string hint = 2;
+    string type = 3;
+    FieldRelation relation = 4;
+    repeated FieldValidator validators = 5;
+    repeated FieldOption options = 6;
+    string default = 7;
+    bool read_only = 8;
+};
+
+message ModelDef {
+    string name = 1;
+    repeated ModelField fields = 2;
+    repeated FieldRelation relations = 3;
+    string app = 4;
+    string verbose_name = 5;
+    string description = 6;
+};
+
+message ModelDefs {
+    repeated ModelDef items = 1;
+};
+
+service modeldefs {
+
+  rpc ListModelDefs(google.protobuf.Empty) returns (ModelDefs) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/modeldefs"
+        };
+  }
+};
diff --git a/contrib/xos/seba.proto b/contrib/xos/seba.proto
new file mode 100644
index 0000000..55a0892
--- /dev/null
+++ b/contrib/xos/seba.proto
@@ -0,0 +1,2531 @@
+syntax = "proto3";
+
+package xos;
+
+import "google/protobuf/empty.proto";
+import "annotations.proto";
+import "common.proto";
+import "xosoptions.proto";
+
+// Note: all fields are wrapped in a "oneof". This causes proto3 to always send
+// fields that are set by the caller, regardless if they are set to a default
+// value. XOS uses this to know when to apply a default value.
+
+
+message AttWorkflowDriverService {
+    option (contentTypeId) = "att-workflow-driver.attworkflowdriverservice";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof description_present {
+      string description = 101 [(val).maxLength = 254];
+    }
+    oneof enabled_present {
+      bool enabled = 102 [(val).nonNull = true];
+    }
+    oneof kind_present {
+      string kind = 103 [(val).maxLength = 30, (val).nonNull = true];
+    }
+    oneof name_present {
+      string name = 104 [(val).maxLength = 30, (val).nonNull = true];
+    }
+    oneof versionNumber_present {
+      string versionNumber = 105 [(val).maxLength = 30];
+    }
+    oneof published_present {
+      bool published = 106 [(val).nonNull = true];
+    }
+    oneof icon_url_present {
+      string icon_url = 108 [(val).maxLength = 1024];
+    }
+    oneof public_key_present {
+      string public_key = 109 [(val).maxLength = 4096];
+    }
+    oneof private_key_fn_present {
+      string private_key_fn = 110 [(val).maxLength = 4096];
+    }
+    oneof service_specific_id_present {
+      string service_specific_id = 111 [(val).maxLength = 30];
+    }
+    oneof service_specific_attribute_present {
+      string service_specific_attribute = 112 ;
+    }
+    repeated int32 addresspools_ids  = 1001 [(reverseForeignKey).modelName = "AddressPool"];
+    repeated int32 serviceports_ids  = 1002 [(reverseForeignKey).modelName = "ServicePort"];
+    repeated int32 serviceattributes_ids  = 1003 [(reverseForeignKey).modelName = "ServiceAttribute"];
+    repeated int32 provided_dependencies_ids  = 1004 [(reverseForeignKey).modelName = "ServiceDependency"];
+    repeated int32 subscribed_dependencies_ids  = 1005 [(reverseForeignKey).modelName = "ServiceDependency"];
+    repeated int32 slices_ids  = 1006 [(reverseForeignKey).modelName = "Slice"];
+    repeated int32 tags_ids  = 1007 [(reverseForeignKey).modelName = "Tag"];
+    repeated int32 service_interfaces_ids  = 1008 [(reverseForeignKey).modelName = "ServiceInterface"];
+    repeated int32 service_instances_ids  = 1009 [(reverseForeignKey).modelName = "ServiceInstance"];
+    repeated int32 subscribed_links_ids  = 1010 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 owned_trust_domains_ids  = 1011 [(reverseForeignKey).modelName = "TrustDomain"];
+    repeated int32 whitelist_entries_ids  = 1101 [(reverseForeignKey).modelName = "AttWorkflowDriverWhiteListEntry"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message AttWorkflowDriverServices {
+    repeated AttWorkflowDriverService items = 1;
+}
+
+message AttWorkflowDriverServiceInstance {
+    option (contentTypeId) = "att-workflow-driver.attworkflowdriverserviceinstance";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof name_present {
+      string name = 101 [(val).maxLength = 200];
+    }
+    oneof owner_present {
+      int32 owner_id = 102 [(val).nonNull = true, (foreignKey).modelName = "Service", (foreignKey).reverseFieldName = "service_instances"];
+    }
+    oneof service_specific_id_present {
+      string service_specific_id = 103 [(val).maxLength = 30];
+    }
+    oneof service_specific_attribute_present {
+      string service_specific_attribute = 110 ;
+    }
+    oneof link_deleted_count_present {
+      uint32 link_deleted_count = 111 ;
+    }
+    oneof master_serviceinstance_present {
+      int32 master_serviceinstance_id = 112 [(foreignKey).modelName = "ServiceInstance", (foreignKey).reverseFieldName = "child_serviceinstances"];
+    }
+    oneof serial_number_present {
+      string serial_number = 202 [(val).maxLength = 254];
+    }
+    oneof authentication_state_present {
+      string authentication_state = 203 [(val).maxLength = 50];
+    }
+    oneof of_dpid_present {
+      string of_dpid = 204 [(val).maxLength = 254];
+    }
+    oneof uni_port_id_present {
+      int32 uni_port_id = 205 ;
+    }
+    oneof onu_state_present {
+      string onu_state = 206 [(val).maxLength = 254];
+    }
+    oneof status_message_present {
+      string status_message = 207 [(val).maxLength = 254];
+    }
+    oneof dhcp_state_present {
+      string dhcp_state = 208 [(val).maxLength = 254];
+    }
+    oneof ip_address_present {
+      string ip_address = 209 [(val).maxLength = 20];
+    }
+    oneof mac_address_present {
+      string mac_address = 210 [(val).maxLength = 20];
+    }
+    repeated int32 ports_ids  = 1001 [(reverseForeignKey).modelName = "Port"];
+    repeated int32 child_serviceinstances_ids  = 1002 [(reverseForeignKey).modelName = "ServiceInstance"];
+    repeated int32 provided_links_ids  = 1003 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 subscribed_links_ids  = 1005 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 service_instance_attributes_ids  = 1006 [(reverseForeignKey).modelName = "ServiceInstanceAttribute"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message AttWorkflowDriverServiceInstances {
+    repeated AttWorkflowDriverServiceInstance items = 1;
+}
+
+message AttWorkflowDriverWhiteListEntry {
+    option (contentTypeId) = "att-workflow-driver.attworkflowdriverwhitelistentry";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof owner_present {
+      int32 owner_id = 101 [(foreignKey).modelName = "AttWorkflowDriverService", (foreignKey).reverseFieldName = "whitelist_entries"];
+    }
+    oneof serial_number_present {
+      string serial_number = 102 [(val).maxLength = 254];
+    }
+    oneof pon_port_id_present {
+      int32 pon_port_id = 103 ;
+    }
+    oneof device_id_present {
+      string device_id = 104 [(val).maxLength = 54];
+    }
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message attworkflowdriverwhitelistentries {
+    repeated AttWorkflowDriverWhiteListEntry items = 1;
+}
+
+message BNGPortMapping {
+    option (contentTypeId) = "fabric-crossconnect.bngportmapping";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof s_tag_present {
+      string s_tag = 101 [(val).nonNull = true];
+    }
+    oneof switch_port_present {
+      int32 switch_port = 102 [(val).nonNull = true];
+    }
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message BNGPortMappings {
+    repeated BNGPortMapping items = 1;
+}
+
+message FabricCrossconnectService {
+    option (contentTypeId) = "fabric-crossconnect.fabriccrossconnectservice";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof description_present {
+      string description = 101 [(val).maxLength = 254];
+    }
+    oneof enabled_present {
+      bool enabled = 102 [(val).nonNull = true];
+    }
+    oneof kind_present {
+      string kind = 103 [(val).maxLength = 30, (val).nonNull = true];
+    }
+    oneof name_present {
+      string name = 104 [(val).maxLength = 30, (val).nonNull = true];
+    }
+    oneof versionNumber_present {
+      string versionNumber = 105 [(val).maxLength = 30];
+    }
+    oneof published_present {
+      bool published = 106 [(val).nonNull = true];
+    }
+    oneof icon_url_present {
+      string icon_url = 108 [(val).maxLength = 1024];
+    }
+    oneof public_key_present {
+      string public_key = 109 [(val).maxLength = 4096];
+    }
+    oneof private_key_fn_present {
+      string private_key_fn = 110 [(val).maxLength = 4096];
+    }
+    oneof service_specific_id_present {
+      string service_specific_id = 111 [(val).maxLength = 30];
+    }
+    oneof service_specific_attribute_present {
+      string service_specific_attribute = 112 ;
+    }
+    repeated int32 addresspools_ids  = 1001 [(reverseForeignKey).modelName = "AddressPool"];
+    repeated int32 serviceports_ids  = 1002 [(reverseForeignKey).modelName = "ServicePort"];
+    repeated int32 serviceattributes_ids  = 1003 [(reverseForeignKey).modelName = "ServiceAttribute"];
+    repeated int32 provided_dependencies_ids  = 1004 [(reverseForeignKey).modelName = "ServiceDependency"];
+    repeated int32 subscribed_dependencies_ids  = 1005 [(reverseForeignKey).modelName = "ServiceDependency"];
+    repeated int32 slices_ids  = 1006 [(reverseForeignKey).modelName = "Slice"];
+    repeated int32 tags_ids  = 1007 [(reverseForeignKey).modelName = "Tag"];
+    repeated int32 service_interfaces_ids  = 1008 [(reverseForeignKey).modelName = "ServiceInterface"];
+    repeated int32 service_instances_ids  = 1009 [(reverseForeignKey).modelName = "ServiceInstance"];
+    repeated int32 subscribed_links_ids  = 1010 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 owned_trust_domains_ids  = 1011 [(reverseForeignKey).modelName = "TrustDomain"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message FabricCrossconnectServices {
+    repeated FabricCrossconnectService items = 1;
+}
+
+message FabricCrossconnectServiceInstance {
+    option (contentTypeId) = "fabric-crossconnect.fabriccrossconnectserviceinstance";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof name_present {
+      string name = 101 [(val).maxLength = 200];
+    }
+    oneof owner_present {
+      int32 owner_id = 102 [(val).nonNull = true, (foreignKey).modelName = "Service", (foreignKey).reverseFieldName = "service_instances"];
+    }
+    oneof service_specific_id_present {
+      string service_specific_id = 103 [(val).maxLength = 30];
+    }
+    oneof service_specific_attribute_present {
+      string service_specific_attribute = 110 ;
+    }
+    oneof link_deleted_count_present {
+      uint32 link_deleted_count = 111 ;
+    }
+    oneof master_serviceinstance_present {
+      int32 master_serviceinstance_id = 112 [(foreignKey).modelName = "ServiceInstance", (foreignKey).reverseFieldName = "child_serviceinstances"];
+    }
+    oneof s_tag_present {
+      int32 s_tag = 201 ;
+    }
+    oneof switch_datapath_id_present {
+      string switch_datapath_id = 202 ;
+    }
+    oneof source_port_present {
+      int32 source_port = 203 ;
+    }
+    repeated int32 ports_ids  = 1001 [(reverseForeignKey).modelName = "Port"];
+    repeated int32 child_serviceinstances_ids  = 1002 [(reverseForeignKey).modelName = "ServiceInstance"];
+    repeated int32 provided_links_ids  = 1003 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 subscribed_links_ids  = 1005 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 service_instance_attributes_ids  = 1006 [(reverseForeignKey).modelName = "ServiceInstanceAttribute"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message FabricCrossconnectServiceInstances {
+    repeated FabricCrossconnectServiceInstance items = 1;
+}
+
+message NNIPort {
+    option (contentTypeId) = "volt.nniport";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof name_present {
+      string name = 101 ;
+    }
+    oneof port_no_present {
+      int32 port_no = 103 ;
+    }
+    oneof admin_state_present {
+      string admin_state = 104 ;
+    }
+    oneof oper_status_present {
+      string oper_status = 105 ;
+    }
+    oneof olt_device_present {
+      int32 olt_device_id = 201 [(foreignKey).modelName = "OLTDevice", (foreignKey).reverseFieldName = "nni_ports"];
+    }
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message NNIPorts {
+    repeated NNIPort items = 1;
+}
+
+message OLTDevice {
+    option (contentTypeId) = "volt.oltdevice";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof volt_service_present {
+      int32 volt_service_id = 101 [(foreignKey).modelName = "VOLTService", (foreignKey).reverseFieldName = "volt_devices"];
+    }
+    oneof name_present {
+      string name = 102 [(val).maxLength = 254];
+    }
+    oneof device_type_present {
+      string device_type = 103 [(val).maxLength = 254];
+    }
+    oneof host_present {
+      string host = 104 [(val).maxLength = 254];
+    }
+    oneof port_present {
+      int32 port = 105 ;
+    }
+    oneof mac_address_present {
+      string mac_address = 106 ;
+    }
+    oneof serial_number_present {
+      string serial_number = 109 ;
+    }
+    oneof device_id_present {
+      string device_id = 110 ;
+    }
+    oneof admin_state_present {
+      string admin_state = 111 ;
+    }
+    oneof oper_status_present {
+      string oper_status = 112 ;
+    }
+    oneof of_id_present {
+      string of_id = 113 ;
+    }
+    oneof dp_id_present {
+      string dp_id = 114 ;
+    }
+    oneof uplink_present {
+      string uplink = 115 ;
+    }
+    oneof driver_present {
+      string driver = 116 ;
+    }
+    oneof switch_datapath_id_present {
+      string switch_datapath_id = 117 ;
+    }
+    oneof switch_port_present {
+      string switch_port = 118 ;
+    }
+    oneof outer_tpid_present {
+      string outer_tpid = 119 ;
+    }
+    oneof nas_id_present {
+      string nas_id = 120 ;
+    }
+    repeated int32 pon_ports_ids  = 1001 [(reverseForeignKey).modelName = "PONPort"];
+    repeated int32 nni_ports_ids  = 1002 [(reverseForeignKey).modelName = "NNIPort"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message OLTDevices {
+    repeated OLTDevice items = 1;
+}
+
+message ONUDevice {
+    option (contentTypeId) = "volt.onudevice";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof pon_port_present {
+      int32 pon_port_id = 101 [(foreignKey).modelName = "PONPort", (foreignKey).reverseFieldName = "onu_devices"];
+    }
+    oneof serial_number_present {
+      string serial_number = 102 [(val).maxLength = 254];
+    }
+    oneof vendor_present {
+      string vendor = 103 [(val).maxLength = 254];
+    }
+    oneof device_type_present {
+      string device_type = 104 [(val).maxLength = 254];
+    }
+    oneof device_id_present {
+      string device_id = 105 [(val).maxLength = 254];
+    }
+    oneof admin_state_present {
+      string admin_state = 106 ;
+    }
+    oneof oper_status_present {
+      string oper_status = 107 ;
+    }
+    oneof connect_status_present {
+      string connect_status = 108 ;
+    }
+    repeated int32 pononu_ports_ids  = 1001 [(reverseForeignKey).modelName = "PONONUPort"];
+    repeated int32 uni_ports_ids  = 1002 [(reverseForeignKey).modelName = "UNIPort"];
+    repeated int32 volt_service_instances_ids  = 1003 [(reverseForeignKey).modelName = "VOLTServiceInstance"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message ONUDevices {
+    repeated ONUDevice items = 1;
+}
+
+message PONONUPort {
+    option (contentTypeId) = "volt.pononuport";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof name_present {
+      string name = 101 ;
+    }
+    oneof port_no_present {
+      int32 port_no = 103 ;
+    }
+    oneof admin_state_present {
+      string admin_state = 104 ;
+    }
+    oneof oper_status_present {
+      string oper_status = 105 ;
+    }
+    oneof onu_device_present {
+      int32 onu_device_id = 201 [(foreignKey).modelName = "ONUDevice", (foreignKey).reverseFieldName = "pononu_ports"];
+    }
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message PONONUPorts {
+    repeated PONONUPort items = 1;
+}
+
+message PONPort {
+    option (contentTypeId) = "volt.ponport";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof name_present {
+      string name = 101 ;
+    }
+    oneof port_no_present {
+      int32 port_no = 103 ;
+    }
+    oneof admin_state_present {
+      string admin_state = 104 ;
+    }
+    oneof oper_status_present {
+      string oper_status = 105 ;
+    }
+    oneof olt_device_present {
+      int32 olt_device_id = 201 [(foreignKey).modelName = "OLTDevice", (foreignKey).reverseFieldName = "pon_ports"];
+    }
+    repeated int32 onu_devices_ids  = 1001 [(reverseForeignKey).modelName = "ONUDevice"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message PONPorts {
+    repeated PONPort items = 1;
+}
+
+message PortBase {
+    option (contentTypeId) = "volt.portbase";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof name_present {
+      string name = 101 ;
+    }
+    oneof port_no_present {
+      int32 port_no = 103 ;
+    }
+    oneof admin_state_present {
+      string admin_state = 104 ;
+    }
+    oneof oper_status_present {
+      string oper_status = 105 ;
+    }
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message PortBases {
+    repeated PortBase items = 1;
+}
+
+message RCORDIpAddress {
+    option (contentTypeId) = "rcord.rcordipaddress";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof subscriber_present {
+      int32 subscriber_id = 101 [(val).nonNull = true, (foreignKey).modelName = "RCORDSubscriber", (foreignKey).reverseFieldName = "ips"];
+    }
+    oneof ip_present {
+      string ip = 102 [(val).maxLength = 52, (val).nonNull = true];
+    }
+    oneof description_present {
+      string description = 103 [(val).maxLength = 254, (val).nonNull = true];
+    }
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message RCORDIpAddresses {
+    repeated RCORDIpAddress items = 1;
+}
+
+message RCORDService {
+    option (contentTypeId) = "rcord.rcordservice";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof description_present {
+      string description = 101 [(val).maxLength = 254];
+    }
+    oneof enabled_present {
+      bool enabled = 102 [(val).nonNull = true];
+    }
+    oneof kind_present {
+      string kind = 103 [(val).maxLength = 30, (val).nonNull = true];
+    }
+    oneof name_present {
+      string name = 104 [(val).maxLength = 30, (val).nonNull = true];
+    }
+    oneof versionNumber_present {
+      string versionNumber = 105 [(val).maxLength = 30];
+    }
+    oneof published_present {
+      bool published = 106 [(val).nonNull = true];
+    }
+    oneof icon_url_present {
+      string icon_url = 108 [(val).maxLength = 1024];
+    }
+    oneof public_key_present {
+      string public_key = 109 [(val).maxLength = 4096];
+    }
+    oneof private_key_fn_present {
+      string private_key_fn = 110 [(val).maxLength = 4096];
+    }
+    oneof service_specific_id_present {
+      string service_specific_id = 111 [(val).maxLength = 30];
+    }
+    oneof service_specific_attribute_present {
+      string service_specific_attribute = 112 ;
+    }
+    oneof access_present {
+      string access = 211 [(val).maxLength = 30];
+    }
+    repeated int32 addresspools_ids  = 1001 [(reverseForeignKey).modelName = "AddressPool"];
+    repeated int32 serviceports_ids  = 1002 [(reverseForeignKey).modelName = "ServicePort"];
+    repeated int32 serviceattributes_ids  = 1003 [(reverseForeignKey).modelName = "ServiceAttribute"];
+    repeated int32 provided_dependencies_ids  = 1004 [(reverseForeignKey).modelName = "ServiceDependency"];
+    repeated int32 subscribed_dependencies_ids  = 1005 [(reverseForeignKey).modelName = "ServiceDependency"];
+    repeated int32 slices_ids  = 1006 [(reverseForeignKey).modelName = "Slice"];
+    repeated int32 tags_ids  = 1007 [(reverseForeignKey).modelName = "Tag"];
+    repeated int32 service_interfaces_ids  = 1008 [(reverseForeignKey).modelName = "ServiceInterface"];
+    repeated int32 service_instances_ids  = 1009 [(reverseForeignKey).modelName = "ServiceInstance"];
+    repeated int32 subscribed_links_ids  = 1010 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 owned_trust_domains_ids  = 1011 [(reverseForeignKey).modelName = "TrustDomain"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message RCORDServices {
+    repeated RCORDService items = 1;
+}
+
+message RCORDSubscriber {
+    option (contentTypeId) = "rcord.rcordsubscriber";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof name_present {
+      string name = 101 [(val).maxLength = 200];
+    }
+    oneof owner_present {
+      int32 owner_id = 102 [(val).nonNull = true, (foreignKey).modelName = "Service", (foreignKey).reverseFieldName = "service_instances"];
+    }
+    oneof service_specific_id_present {
+      string service_specific_id = 103 [(val).maxLength = 30];
+    }
+    oneof service_specific_attribute_present {
+      string service_specific_attribute = 110 ;
+    }
+    oneof link_deleted_count_present {
+      uint32 link_deleted_count = 111 ;
+    }
+    oneof master_serviceinstance_present {
+      int32 master_serviceinstance_id = 112 [(foreignKey).modelName = "ServiceInstance", (foreignKey).reverseFieldName = "child_serviceinstances"];
+    }
+    oneof status_present {
+      string status = 211 [(val).maxLength = 30];
+    }
+    oneof c_tag_present {
+      int32 c_tag = 212 ;
+    }
+    oneof onu_device_present {
+      string onu_device = 213 ;
+    }
+    oneof creator_present {
+      int32 creator_id = 215 [(foreignKey).modelName = "User", (foreignKey).reverseFieldName = "created_rcord_subscribers"];
+    }
+    oneof mac_address_present {
+      string mac_address = 218 ;
+    }
+    oneof s_tag_present {
+      int32 s_tag = 219 ;
+    }
+    oneof nas_port_id_present {
+      string nas_port_id = 220 ;
+    }
+    oneof circuit_id_present {
+      string circuit_id = 221 ;
+    }
+    oneof remote_id_present {
+      string remote_id = 222 ;
+    }
+    repeated int32 ports_ids  = 1001 [(reverseForeignKey).modelName = "Port"];
+    repeated int32 child_serviceinstances_ids  = 1002 [(reverseForeignKey).modelName = "ServiceInstance"];
+    repeated int32 provided_links_ids  = 1003 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 subscribed_links_ids  = 1005 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 service_instance_attributes_ids  = 1006 [(reverseForeignKey).modelName = "ServiceInstanceAttribute"];
+    repeated int32 ips_ids  = 1101 [(reverseForeignKey).modelName = "RCORDIpAddress"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message RCORDSubscribers {
+    repeated RCORDSubscriber items = 1;
+}
+
+message UNIPort {
+    option (contentTypeId) = "volt.uniport";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof name_present {
+      string name = 101 ;
+    }
+    oneof port_no_present {
+      int32 port_no = 103 ;
+    }
+    oneof admin_state_present {
+      string admin_state = 104 ;
+    }
+    oneof oper_status_present {
+      string oper_status = 105 ;
+    }
+    oneof onu_device_present {
+      int32 onu_device_id = 201 [(foreignKey).modelName = "ONUDevice", (foreignKey).reverseFieldName = "uni_ports"];
+    }
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message UNIPorts {
+    repeated UNIPort items = 1;
+}
+
+message VOLTService {
+    option (contentTypeId) = "volt.voltservice";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof description_present {
+      string description = 101 [(val).maxLength = 254];
+    }
+    oneof enabled_present {
+      bool enabled = 102 [(val).nonNull = true];
+    }
+    oneof kind_present {
+      string kind = 103 [(val).maxLength = 30, (val).nonNull = true];
+    }
+    oneof name_present {
+      string name = 104 [(val).maxLength = 30, (val).nonNull = true];
+    }
+    oneof versionNumber_present {
+      string versionNumber = 105 [(val).maxLength = 30];
+    }
+    oneof published_present {
+      bool published = 106 [(val).nonNull = true];
+    }
+    oneof icon_url_present {
+      string icon_url = 108 [(val).maxLength = 1024];
+    }
+    oneof public_key_present {
+      string public_key = 109 [(val).maxLength = 4096];
+    }
+    oneof private_key_fn_present {
+      string private_key_fn = 110 [(val).maxLength = 4096];
+    }
+    oneof service_specific_id_present {
+      string service_specific_id = 111 [(val).maxLength = 30];
+    }
+    oneof service_specific_attribute_present {
+      string service_specific_attribute = 112 ;
+    }
+    oneof voltha_url_present {
+      string voltha_url = 201 [(val).maxLength = 254];
+    }
+    oneof voltha_port_present {
+      int32 voltha_port = 202 ;
+    }
+    oneof voltha_user_present {
+      string voltha_user = 203 [(val).maxLength = 254];
+    }
+    oneof voltha_pass_present {
+      string voltha_pass = 204 [(val).maxLength = 254];
+    }
+    oneof onos_voltha_url_present {
+      string onos_voltha_url = 205 [(val).maxLength = 254];
+    }
+    oneof onos_voltha_port_present {
+      int32 onos_voltha_port = 206 ;
+    }
+    oneof onos_voltha_user_present {
+      string onos_voltha_user = 207 [(val).maxLength = 254];
+    }
+    oneof onos_voltha_pass_present {
+      string onos_voltha_pass = 208 [(val).maxLength = 254];
+    }
+    repeated int32 addresspools_ids  = 1001 [(reverseForeignKey).modelName = "AddressPool"];
+    repeated int32 serviceports_ids  = 1002 [(reverseForeignKey).modelName = "ServicePort"];
+    repeated int32 serviceattributes_ids  = 1003 [(reverseForeignKey).modelName = "ServiceAttribute"];
+    repeated int32 provided_dependencies_ids  = 1004 [(reverseForeignKey).modelName = "ServiceDependency"];
+    repeated int32 subscribed_dependencies_ids  = 1005 [(reverseForeignKey).modelName = "ServiceDependency"];
+    repeated int32 slices_ids  = 1006 [(reverseForeignKey).modelName = "Slice"];
+    repeated int32 tags_ids  = 1007 [(reverseForeignKey).modelName = "Tag"];
+    repeated int32 service_interfaces_ids  = 1008 [(reverseForeignKey).modelName = "ServiceInterface"];
+    repeated int32 service_instances_ids  = 1009 [(reverseForeignKey).modelName = "ServiceInstance"];
+    repeated int32 subscribed_links_ids  = 1010 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 owned_trust_domains_ids  = 1011 [(reverseForeignKey).modelName = "TrustDomain"];
+    repeated int32 volt_devices_ids  = 1101 [(reverseForeignKey).modelName = "OLTDevice"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message VOLTServices {
+    repeated VOLTService items = 1;
+}
+
+message VOLTServiceInstance {
+    option (contentTypeId) = "volt.voltserviceinstance";
+    oneof id_present {
+      int32 id = 1 ;
+    }
+    oneof created_present {
+      double created = 2 ;
+    }
+    oneof updated_present {
+      double updated = 3 ;
+    }
+    oneof enacted_present {
+      double enacted = 4 ;
+    }
+    oneof policed_present {
+      double policed = 5 ;
+    }
+    oneof backend_register_present {
+      string backend_register = 6 [(val).maxLength = 1024];
+    }
+    oneof backend_need_delete_present {
+      bool backend_need_delete = 7 ;
+    }
+    oneof backend_need_reap_present {
+      bool backend_need_reap = 8 ;
+    }
+    oneof backend_status_present {
+      string backend_status = 9 [(val).maxLength = 1024];
+    }
+    oneof backend_code_present {
+      int32 backend_code = 10 ;
+    }
+    oneof deleted_present {
+      bool deleted = 11 ;
+    }
+    oneof write_protect_present {
+      bool write_protect = 12 ;
+    }
+    oneof lazy_blocked_present {
+      bool lazy_blocked = 13 ;
+    }
+    oneof no_sync_present {
+      bool no_sync = 14 ;
+    }
+    oneof no_policy_present {
+      bool no_policy = 15 ;
+    }
+    oneof policy_status_present {
+      string policy_status = 16 [(val).maxLength = 1024];
+    }
+    oneof policy_code_present {
+      int32 policy_code = 17 ;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 18 [(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof backend_need_delete_policy_present {
+      bool backend_need_delete_policy = 19 ;
+    }
+    oneof xos_managed_present {
+      bool xos_managed = 20 ;
+    }
+    oneof backend_handle_present {
+      string backend_handle = 21 [(val).maxLength = 1024];
+    }
+    oneof changed_by_step_present {
+      double changed_by_step = 22 ;
+    }
+    oneof changed_by_policy_present {
+      double changed_by_policy = 23 ;
+    }
+    oneof name_present {
+      string name = 101 [(val).maxLength = 200];
+    }
+    oneof owner_present {
+      int32 owner_id = 102 [(val).nonNull = true, (foreignKey).modelName = "Service", (foreignKey).reverseFieldName = "service_instances"];
+    }
+    oneof service_specific_id_present {
+      string service_specific_id = 103 [(val).maxLength = 30];
+    }
+    oneof service_specific_attribute_present {
+      string service_specific_attribute = 110 ;
+    }
+    oneof link_deleted_count_present {
+      uint32 link_deleted_count = 111 ;
+    }
+    oneof master_serviceinstance_present {
+      int32 master_serviceinstance_id = 112 [(foreignKey).modelName = "ServiceInstance", (foreignKey).reverseFieldName = "child_serviceinstances"];
+    }
+    oneof description_present {
+      string description = 201 [(val).maxLength = 254];
+    }
+    oneof onu_device_present {
+      int32 onu_device_id = 202 [(foreignKey).modelName = "ONUDevice", (foreignKey).reverseFieldName = "volt_service_instances"];
+    }
+    repeated int32 ports_ids  = 1001 [(reverseForeignKey).modelName = "Port"];
+    repeated int32 child_serviceinstances_ids  = 1002 [(reverseForeignKey).modelName = "ServiceInstance"];
+    repeated int32 provided_links_ids  = 1003 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 subscribed_links_ids  = 1005 [(reverseForeignKey).modelName = "ServiceInstanceLink"];
+    repeated int32 service_instance_attributes_ids  = 1006 [(reverseForeignKey).modelName = "ServiceInstanceAttribute"];
+  string class_names = 2046;
+  string self_content_type_id = 2047;
+}
+
+message VOLTServiceInstances {
+    repeated VOLTServiceInstance items = 1;
+}
+
+
+service xos {
+
+rpc ListAttWorkflowDriverService(google.protobuf.Empty) returns (AttWorkflowDriverServices) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/att-workflow-driver/attworkflowdriverservices"
+        };
+  }
+  rpc FilterAttWorkflowDriverService(Query) returns (AttWorkflowDriverServices) {
+  }
+  rpc GetAttWorkflowDriverService(ID) returns (AttWorkflowDriverService) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/att-workflow-driver/attworkflowdriverservices/{id}"
+        };
+  }
+  rpc CreateAttWorkflowDriverService(AttWorkflowDriverService) returns (AttWorkflowDriverService) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/att-workflow-driver/attworkflowdriverservices"
+            body: "*"
+        };
+  }
+  rpc UpdateAttWorkflowDriverService(AttWorkflowDriverService) returns (AttWorkflowDriverService) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/att-workflow-driver/attworkflowdriverservices/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteAttWorkflowDriverService(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/att-workflow-driver/attworkflowdriverservices/{id}"
+        };
+  }
+
+rpc ListAttWorkflowDriverServiceInstance(google.protobuf.Empty) returns (AttWorkflowDriverServiceInstances) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/att-workflow-driver/attworkflowdriverserviceinstances"
+        };
+  }
+  rpc FilterAttWorkflowDriverServiceInstance(Query) returns (AttWorkflowDriverServiceInstances) {
+  }
+  rpc GetAttWorkflowDriverServiceInstance(ID) returns (AttWorkflowDriverServiceInstance) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/att-workflow-driver/attworkflowdriverserviceinstances/{id}"
+        };
+  }
+  rpc CreateAttWorkflowDriverServiceInstance(AttWorkflowDriverServiceInstance) returns (AttWorkflowDriverServiceInstance) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/att-workflow-driver/attworkflowdriverserviceinstances"
+            body: "*"
+        };
+  }
+  rpc UpdateAttWorkflowDriverServiceInstance(AttWorkflowDriverServiceInstance) returns (AttWorkflowDriverServiceInstance) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/att-workflow-driver/attworkflowdriverserviceinstances/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteAttWorkflowDriverServiceInstance(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/att-workflow-driver/attworkflowdriverserviceinstances/{id}"
+        };
+  }
+
+rpc ListAttWorkflowDriverWhiteListEntry(google.protobuf.Empty) returns (attworkflowdriverwhitelistentries) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/att-workflow-driver/attworkflowdriverwhitelistentries"
+        };
+  }
+  rpc FilterAttWorkflowDriverWhiteListEntry(Query) returns (attworkflowdriverwhitelistentries) {
+  }
+  rpc GetAttWorkflowDriverWhiteListEntry(ID) returns (AttWorkflowDriverWhiteListEntry) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/att-workflow-driver/attworkflowdriverwhitelistentries/{id}"
+        };
+  }
+  rpc CreateAttWorkflowDriverWhiteListEntry(AttWorkflowDriverWhiteListEntry) returns (AttWorkflowDriverWhiteListEntry) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/att-workflow-driver/attworkflowdriverwhitelistentries"
+            body: "*"
+        };
+  }
+  rpc UpdateAttWorkflowDriverWhiteListEntry(AttWorkflowDriverWhiteListEntry) returns (AttWorkflowDriverWhiteListEntry) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/att-workflow-driver/attworkflowdriverwhitelistentries/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteAttWorkflowDriverWhiteListEntry(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/att-workflow-driver/attworkflowdriverwhitelistentries/{id}"
+        };
+  }
+
+rpc ListBNGPortMapping(google.protobuf.Empty) returns (BNGPortMappings) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/fabric-crossconnect/bngportmappings"
+        };
+  }
+  rpc FilterBNGPortMapping(Query) returns (BNGPortMappings) {
+  }
+  rpc GetBNGPortMapping(ID) returns (BNGPortMapping) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/fabric-crossconnect/bngportmappings/{id}"
+        };
+  }
+  rpc CreateBNGPortMapping(BNGPortMapping) returns (BNGPortMapping) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/fabric-crossconnect/bngportmappings"
+            body: "*"
+        };
+  }
+  rpc UpdateBNGPortMapping(BNGPortMapping) returns (BNGPortMapping) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/fabric-crossconnect/bngportmappings/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteBNGPortMapping(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/fabric-crossconnect/bngportmappings/{id}"
+        };
+  }
+
+rpc ListFabricCrossconnectService(google.protobuf.Empty) returns (FabricCrossconnectServices) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/fabric-crossconnect/fabriccrossconnectservices"
+        };
+  }
+  rpc FilterFabricCrossconnectService(Query) returns (FabricCrossconnectServices) {
+  }
+  rpc GetFabricCrossconnectService(ID) returns (FabricCrossconnectService) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/fabric-crossconnect/fabriccrossconnectservices/{id}"
+        };
+  }
+  rpc CreateFabricCrossconnectService(FabricCrossconnectService) returns (FabricCrossconnectService) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/fabric-crossconnect/fabriccrossconnectservices"
+            body: "*"
+        };
+  }
+  rpc UpdateFabricCrossconnectService(FabricCrossconnectService) returns (FabricCrossconnectService) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/fabric-crossconnect/fabriccrossconnectservices/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteFabricCrossconnectService(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/fabric-crossconnect/fabriccrossconnectservices/{id}"
+        };
+  }
+
+rpc ListFabricCrossconnectServiceInstance(google.protobuf.Empty) returns (FabricCrossconnectServiceInstances) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/fabric-crossconnect/fabriccrossconnectserviceinstances"
+        };
+  }
+  rpc FilterFabricCrossconnectServiceInstance(Query) returns (FabricCrossconnectServiceInstances) {
+  }
+  rpc GetFabricCrossconnectServiceInstance(ID) returns (FabricCrossconnectServiceInstance) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/fabric-crossconnect/fabriccrossconnectserviceinstances/{id}"
+        };
+  }
+  rpc CreateFabricCrossconnectServiceInstance(FabricCrossconnectServiceInstance) returns (FabricCrossconnectServiceInstance) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/fabric-crossconnect/fabriccrossconnectserviceinstances"
+            body: "*"
+        };
+  }
+  rpc UpdateFabricCrossconnectServiceInstance(FabricCrossconnectServiceInstance) returns (FabricCrossconnectServiceInstance) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/fabric-crossconnect/fabriccrossconnectserviceinstances/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteFabricCrossconnectServiceInstance(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/fabric-crossconnect/fabriccrossconnectserviceinstances/{id}"
+        };
+  }
+
+rpc ListNNIPort(google.protobuf.Empty) returns (NNIPorts) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/nniports"
+        };
+  }
+  rpc FilterNNIPort(Query) returns (NNIPorts) {
+  }
+  rpc GetNNIPort(ID) returns (NNIPort) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/nniports/{id}"
+        };
+  }
+  rpc CreateNNIPort(NNIPort) returns (NNIPort) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/volt/nniports"
+            body: "*"
+        };
+  }
+  rpc UpdateNNIPort(NNIPort) returns (NNIPort) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/volt/nniports/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteNNIPort(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/volt/nniports/{id}"
+        };
+  }
+
+rpc ListOLTDevice(google.protobuf.Empty) returns (OLTDevices) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/oltdevices"
+        };
+  }
+  rpc FilterOLTDevice(Query) returns (OLTDevices) {
+  }
+  rpc GetOLTDevice(ID) returns (OLTDevice) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/oltdevices/{id}"
+        };
+  }
+  rpc CreateOLTDevice(OLTDevice) returns (OLTDevice) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/volt/oltdevices"
+            body: "*"
+        };
+  }
+  rpc UpdateOLTDevice(OLTDevice) returns (OLTDevice) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/volt/oltdevices/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteOLTDevice(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/volt/oltdevices/{id}"
+        };
+  }
+
+rpc ListONUDevice(google.protobuf.Empty) returns (ONUDevices) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/onudevices"
+        };
+  }
+  rpc FilterONUDevice(Query) returns (ONUDevices) {
+  }
+  rpc GetONUDevice(ID) returns (ONUDevice) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/onudevices/{id}"
+        };
+  }
+  rpc CreateONUDevice(ONUDevice) returns (ONUDevice) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/volt/onudevices"
+            body: "*"
+        };
+  }
+  rpc UpdateONUDevice(ONUDevice) returns (ONUDevice) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/volt/onudevices/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteONUDevice(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/volt/onudevices/{id}"
+        };
+  }
+
+rpc ListPONONUPort(google.protobuf.Empty) returns (PONONUPorts) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/pononuports"
+        };
+  }
+  rpc FilterPONONUPort(Query) returns (PONONUPorts) {
+  }
+  rpc GetPONONUPort(ID) returns (PONONUPort) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/pononuports/{id}"
+        };
+  }
+  rpc CreatePONONUPort(PONONUPort) returns (PONONUPort) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/volt/pononuports"
+            body: "*"
+        };
+  }
+  rpc UpdatePONONUPort(PONONUPort) returns (PONONUPort) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/volt/pononuports/{id}"
+            body: "*"
+        };
+  }
+  rpc DeletePONONUPort(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/volt/pononuports/{id}"
+        };
+  }
+
+rpc ListPONPort(google.protobuf.Empty) returns (PONPorts) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/ponports"
+        };
+  }
+  rpc FilterPONPort(Query) returns (PONPorts) {
+  }
+  rpc GetPONPort(ID) returns (PONPort) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/ponports/{id}"
+        };
+  }
+  rpc CreatePONPort(PONPort) returns (PONPort) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/volt/ponports"
+            body: "*"
+        };
+  }
+  rpc UpdatePONPort(PONPort) returns (PONPort) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/volt/ponports/{id}"
+            body: "*"
+        };
+  }
+  rpc DeletePONPort(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/volt/ponports/{id}"
+        };
+  }
+
+rpc ListPortBase(google.protobuf.Empty) returns (PortBases) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/portbases"
+        };
+  }
+  rpc FilterPortBase(Query) returns (PortBases) {
+  }
+  rpc GetPortBase(ID) returns (PortBase) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/portbases/{id}"
+        };
+  }
+  rpc CreatePortBase(PortBase) returns (PortBase) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/volt/portbases"
+            body: "*"
+        };
+  }
+  rpc UpdatePortBase(PortBase) returns (PortBase) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/volt/portbases/{id}"
+            body: "*"
+        };
+  }
+  rpc DeletePortBase(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/volt/portbases/{id}"
+        };
+  }
+
+rpc ListRCORDIpAddress(google.protobuf.Empty) returns (RCORDIpAddresses) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/rcord/rcordipaddresses"
+        };
+  }
+  rpc FilterRCORDIpAddress(Query) returns (RCORDIpAddresses) {
+  }
+  rpc GetRCORDIpAddress(ID) returns (RCORDIpAddress) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/rcord/rcordipaddresses/{id}"
+        };
+  }
+  rpc CreateRCORDIpAddress(RCORDIpAddress) returns (RCORDIpAddress) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/rcord/rcordipaddresses"
+            body: "*"
+        };
+  }
+  rpc UpdateRCORDIpAddress(RCORDIpAddress) returns (RCORDIpAddress) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/rcord/rcordipaddresses/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteRCORDIpAddress(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/rcord/rcordipaddresses/{id}"
+        };
+  }
+
+rpc ListRCORDService(google.protobuf.Empty) returns (RCORDServices) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/rcord/rcordservices"
+        };
+  }
+  rpc FilterRCORDService(Query) returns (RCORDServices) {
+  }
+  rpc GetRCORDService(ID) returns (RCORDService) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/rcord/rcordservices/{id}"
+        };
+  }
+  rpc CreateRCORDService(RCORDService) returns (RCORDService) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/rcord/rcordservices"
+            body: "*"
+        };
+  }
+  rpc UpdateRCORDService(RCORDService) returns (RCORDService) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/rcord/rcordservices/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteRCORDService(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/rcord/rcordservices/{id}"
+        };
+  }
+
+rpc ListRCORDSubscriber(google.protobuf.Empty) returns (RCORDSubscribers) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/rcord/rcordsubscribers"
+        };
+  }
+  rpc FilterRCORDSubscriber(Query) returns (RCORDSubscribers) {
+  }
+  rpc GetRCORDSubscriber(ID) returns (RCORDSubscriber) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/rcord/rcordsubscribers/{id}"
+        };
+  }
+  rpc CreateRCORDSubscriber(RCORDSubscriber) returns (RCORDSubscriber) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/rcord/rcordsubscribers"
+            body: "*"
+        };
+  }
+  rpc UpdateRCORDSubscriber(RCORDSubscriber) returns (RCORDSubscriber) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/rcord/rcordsubscribers/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteRCORDSubscriber(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/rcord/rcordsubscribers/{id}"
+        };
+  }
+
+rpc ListUNIPort(google.protobuf.Empty) returns (UNIPorts) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/uniports"
+        };
+  }
+  rpc FilterUNIPort(Query) returns (UNIPorts) {
+  }
+  rpc GetUNIPort(ID) returns (UNIPort) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/uniports/{id}"
+        };
+  }
+  rpc CreateUNIPort(UNIPort) returns (UNIPort) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/volt/uniports"
+            body: "*"
+        };
+  }
+  rpc UpdateUNIPort(UNIPort) returns (UNIPort) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/volt/uniports/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteUNIPort(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/volt/uniports/{id}"
+        };
+  }
+
+rpc ListVOLTService(google.protobuf.Empty) returns (VOLTServices) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/voltservices"
+        };
+  }
+  rpc FilterVOLTService(Query) returns (VOLTServices) {
+  }
+  rpc GetVOLTService(ID) returns (VOLTService) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/voltservices/{id}"
+        };
+  }
+  rpc CreateVOLTService(VOLTService) returns (VOLTService) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/volt/voltservices"
+            body: "*"
+        };
+  }
+  rpc UpdateVOLTService(VOLTService) returns (VOLTService) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/volt/voltservices/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteVOLTService(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/volt/voltservices/{id}"
+        };
+  }
+
+rpc ListVOLTServiceInstance(google.protobuf.Empty) returns (VOLTServiceInstances) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/voltserviceinstances"
+        };
+  }
+  rpc FilterVOLTServiceInstance(Query) returns (VOLTServiceInstances) {
+  }
+  rpc GetVOLTServiceInstance(ID) returns (VOLTServiceInstance) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/volt/voltserviceinstances/{id}"
+        };
+  }
+  rpc CreateVOLTServiceInstance(VOLTServiceInstance) returns (VOLTServiceInstance) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/volt/voltserviceinstances"
+            body: "*"
+        };
+  }
+  rpc UpdateVOLTServiceInstance(VOLTServiceInstance) returns (VOLTServiceInstance) {
+        option (googleapi.http) = {
+            put: "/xosapi/v1/volt/voltserviceinstances/{id}"
+            body: "*"
+        };
+  }
+  rpc DeleteVOLTServiceInstance(ID) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            delete: "/xosapi/v1/volt/voltserviceinstances/{id}"
+        };
+  }
+
+}
+
diff --git a/contrib/xos/utility.proto b/contrib/xos/utility.proto
new file mode 100644
index 0000000..554e0a9
--- /dev/null
+++ b/contrib/xos/utility.proto
@@ -0,0 +1,111 @@
+syntax = "proto3";
+
+package xos;
+
+import "google/protobuf/empty.proto";
+import "annotations.proto";
+import "common.proto";
+import "xosoptions.proto";
+
+message LoginRequest {
+    string username = 1;
+    string password = 2;
+};
+
+message LoginResponse {
+    string sessionid = 1;
+};
+
+message ModelFilter {
+    string class_name = 1;
+};
+
+message ModelListEntry {
+    string class_name = 1;
+    int32 id = 2;
+    string info = 3;
+};
+
+message ModelList {
+    repeated ModelListEntry items = 1;
+};
+
+message XProtos {
+    string xproto = 1;
+};
+
+message PopulatedServiceInstance {
+    option (contentTypeId) = "core.serviceinstance";
+    oneof id_present {
+      int32 id = 1;
+    }
+    oneof leaf_model_name_present {
+      string leaf_model_name = 2[(val).maxLength = 1024, (val).nonNull = true];
+    }
+    oneof name_present {
+      string name = 3[(val).maxLength = 200];
+    }
+    oneof owner_present {
+      int32 owner_id = 4[(val).nonNull = true, (foreignKey).modelName = "Service", (foreignKey).reverseFieldName = "service_instances"];
+    }
+    repeated int32 provided_service_instances = 5;
+    repeated int32 subscribed_service_instances = 6;
+    repeated int32 subscribed_service = 7;
+    repeated int32 subscribed_network = 8;
+};
+
+service utility {
+
+  rpc Login(LoginRequest) returns (LoginResponse) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/utility/login"
+            body: "*"
+        };
+  }
+
+  rpc Logout(google.protobuf.Empty) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/utility/logout"
+            body: "*"
+        };
+  }
+
+  rpc NoOp(google.protobuf.Empty) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/utility/noop"
+            body: "*"
+        };
+  }
+
+  rpc AuthenticatedNoOp(google.protobuf.Empty) returns (google.protobuf.Empty) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/utility/auth_noop"
+            body: "*"
+        };
+  }
+
+  rpc SetDirtyModels(ModelFilter) returns (ModelList) {
+        option (googleapi.http) = {
+            post: "/xosapi/v1/utility/dirty_models"
+            body: "*"
+        };
+  }
+
+  rpc ListDirtyModels(ModelFilter) returns (ModelList) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/utility/dirty_models"
+        };
+  }
+
+  rpc GetXproto(google.protobuf.Empty) returns (XProtos) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/xproto"
+        };
+  }
+
+  rpc GetPopulatedServiceInstances(ID) returns (PopulatedServiceInstance) {
+        option (googleapi.http) = {
+            get: "/xosapi/v1/core/populatedserviceinstance/{id}"
+        };
+  }
+};
diff --git a/contrib/xos/xosoptions.proto b/contrib/xos/xosoptions.proto
new file mode 100644
index 0000000..0494ada
--- /dev/null
+++ b/contrib/xos/xosoptions.proto
@@ -0,0 +1,36 @@
+syntax = "proto3";
+
+package xos;
+
+import "google/protobuf/descriptor.proto";
+
+message ValRule {
+  int32 maxLength = 1;
+  bool nonNull = 2;
+  bool unique = 3;
+}
+
+message ForeignKeyRule {
+  string modelName = 1;
+  string reverseFieldName = 2;
+}
+
+message ReverseForeignKeyRule {
+  string modelName = 1;
+}
+
+message ManyToManyForeignKeyRule {
+  string modelName = 1;
+}
+
+extend google.protobuf.FieldOptions {
+  ValRule val = 1001;
+  ForeignKeyRule foreignKey = 1002;
+  ReverseForeignKeyRule reverseForeignKey = 1003;
+  ManyToManyForeignKeyRule manyToManyForeignKey = 1004;
+}
+
+extend google.protobuf.MessageOptions {
+  string contentTypeId = 1001;
+}
+
diff --git a/internal/pkg/impl/ouput.go b/internal/pkg/impl/ouput.go
index d6943d0..0cf5172 100644
--- a/internal/pkg/impl/ouput.go
+++ b/internal/pkg/impl/ouput.go
@@ -39,7 +39,7 @@
 		chassisMap := models.GetChassisMap()
 		if settings.GetMongo() {
 			clientOptions := options.Client()
-			creds := options.Credential{AuthMechanism: "SCRAM-SHA-256", AuthSource: "AbstractOLT", Username: "seba", Password: "seba"}
+			creds := options.Credential{AuthMechanism: "SCRAM-SHA-256", AuthSource: "AbstractOLT", Username: settings.GetMongoUser(), Password: settings.GetMongoPassword()}
 			clientOptions.SetAuth(creds)
 
 			client, err := mongo.NewClientWithOptions(settings.GetMongodb(), clientOptions)
diff --git a/internal/pkg/impl/xosuser.go b/internal/pkg/impl/xosuser.go
index 77a9367..c7537d4 100644
--- a/internal/pkg/impl/xosuser.go
+++ b/internal/pkg/impl/xosuser.go
@@ -59,6 +59,9 @@
 	if settings.GetDummy() {
 		return true
 	}
+	if settings.GetGrpc() {
+		return true
+	}
 	var dummyYaml = `
 tosca_definitions_version: tosca_simple_yaml_1_0
 imports:
diff --git a/internal/pkg/settings/Settings.go b/internal/pkg/settings/Settings.go
index 6df5eaa..2dcfe5e 100644
--- a/internal/pkg/settings/Settings.go
+++ b/internal/pkg/settings/Settings.go
@@ -21,6 +21,8 @@
 var mongo = false
 var grpc = true
 var mongodb = ""
+var mongoUser = ""
+var mongoPasswd = ""
 
 /*
 SetDebug - sets debug setting
@@ -78,6 +80,34 @@
 }
 
 /*
+SetMongoUser - sets the connection string for mongo db used for backups
+*/
+func SetMongoUser(user string) {
+	mongoUser = user
+}
+
+/*
+GetMongoUser - returns the connection string used for connecting to mongo db
+*/
+func GetMongoUser() string {
+	return mongoUser
+}
+
+/*
+SetMongoPassword - sets the connection string for mongo db used for backups
+*/
+func SetMongoPassword(password string) {
+	mongoPasswd = password
+}
+
+/*
+GetMongoPassword - returns the connection string used for connecting to mongo db
+*/
+func GetMongoPassword() string {
+	return mongoPasswd
+}
+
+/*
 SetGrpc - sets useGrpc mode
 */
 func SetGrpc(useGrpc bool) {
diff --git a/models/inventory/gather.go b/models/inventory/gather.go
index 75e762f..573fcb2 100644
--- a/models/inventory/gather.go
+++ b/models/inventory/gather.go
@@ -48,6 +48,7 @@
 }
 type Ont struct {
 	Number       int
+	Active       bool
 	SVlan        uint32
 	CVlan        uint32
 	SerialNumber string
@@ -114,8 +115,8 @@
 					port := Port{AbstractNumber: i + 1, PhysicalNumber: ponPort.Number}
 					onts := []Ont{}
 					for _, physicalONT := range ponPort.Onts {
-						if physicalONT.Active {
-							ont := Ont{Number: physicalONT.Number, SVlan: physicalONT.Svlan, CVlan: physicalONT.Cvlan, SerialNumber: physicalONT.SerialNumber,
+						if physicalONT.CircuitID != "" {
+							ont := Ont{Number: physicalONT.Number, Active: physicalONT.Active, SVlan: physicalONT.Svlan, CVlan: physicalONT.Cvlan, SerialNumber: physicalONT.SerialNumber,
 								NasPortID: physicalONT.NasPortID, CircuitID: physicalONT.CircuitID}
 							onts = append(onts, ont)
 						}
diff --git a/models/physical/chassis.go b/models/physical/chassis.go
index 943c830..7761bf6 100644
--- a/models/physical/chassis.go
+++ b/models/physical/chassis.go
@@ -17,16 +17,38 @@
 package physical
 
 import (
+	"context"
+	"encoding/base64"
+	"errors"
 	"fmt"
 	"log"
 	"net"
 	"net/http"
 	"strings"
 
+	"gerrit.opencord.org/abstract-olt/contrib/xos"
 	"gerrit.opencord.org/abstract-olt/internal/pkg/settings"
 	"gerrit.opencord.org/abstract-olt/models/tosca"
+	"google.golang.org/grpc"
 )
 
+type basicAuth struct {
+	username string
+	password string
+}
+
+func (b basicAuth) GetRequestMetadata(ctx context.Context, in ...string) (map[string]string, error) {
+	auth := b.username + ":" + b.password
+	enc := base64.StdEncoding.EncodeToString([]byte(auth))
+	return map[string]string{
+		"authorization": "Basic " + enc,
+	}, nil
+}
+
+func (basicAuth) RequireTransportSecurity() bool {
+	return false
+}
+
 /*
 Chassis is a model that takes up to 16 discreet OLT chassis as if it is a 16 slot OLT chassis
 */
@@ -39,17 +61,15 @@
 	Rack        int
 	Shelf       int
 }
+
+/*
+UnprovisionedSlotError - Error thrown when attempting to provision to a line card that hasn't been activated
+*/
 type UnprovisionedSlotError struct {
 	CLLI       string
 	SlotNumber int
 }
 
-func (c *Chassis) Output() {
-	for _, olt := range c.Linecards {
-		olt.Output()
-	}
-}
-
 func (e *UnprovisionedSlotError) Error() string {
 	return fmt.Sprintf("SlotNumber %d in Chassis %s is currently unprovsioned", e.SlotNumber, e.CLLI)
 }
@@ -60,51 +80,84 @@
 func (chassis *Chassis) AddOLTChassis(olt SimpleOLT) {
 	olt.SetNumber((len(chassis.Linecards) + 1))
 	chassis.Linecards = append(chassis.Linecards, olt)
-	chassis.SendOltTosca(olt)
-
+	if settings.GetGrpc() {
+		chassis.SendOltGRPC(olt)
+	} else {
+		chassis.SendOltTosca(olt)
+	}
 }
 
 /*
-SendOltTosca - Broke above method apart to support Reflow
+SendOltGRPC - provisions olt using grpc interface
 */
-func (chassis *Chassis) SendOltTosca(olt SimpleOLT) {
+func (chassis *Chassis) SendOltGRPC(olt SimpleOLT) error {
+	if settings.GetDummy() {
+		log.Println("Running in Dummy mode with GRPC in SendOltGRPC")
+		return nil
+	}
+	conn, err := grpc.Dial(chassis.XOSAddress.String(), grpc.WithInsecure(), grpc.WithPerRPCCredentials(basicAuth{
+		username: chassis.XOSUser,
+		password: chassis.XOSPassword,
+	}))
+	defer conn.Close()
+	if err != nil {
+		log.Println(err)
+		return err
+	}
+
+	xosClient := xos.NewXosClient(conn)
+	//queryElement := &xos.QueryElement{Operator: xos.QueryElement_EQUAL, Name: "volt_service_instances", Value: &xos.QueryElement_SValue{"volt"}}
+	queryElement := &xos.QueryElement{Operator: xos.QueryElement_EQUAL, Name: "name", Value: &xos.QueryElement_SValue{"volt"}}
+	queryElements := []*xos.QueryElement{queryElement}
+	query := &xos.Query{Kind: xos.Query_DEFAULT, Elements: queryElements}
+
+	voltResponse, err := xosClient.FilterVOLTService(context.Background(), query)
+	if err != nil {
+		log.Println(err)
+		return err
+	}
+	voltServices := voltResponse.GetItems()
+	if len(voltServices) == 0 {
+		return errors.New("xosClient.FilterVOLTService returned 0 entries with name \"volt\"")
+	}
+	voltService := voltServices[0]
+
+	response, err := xosClient.CreateOLTDevice(context.Background(), &xos.OLTDevice{
+		NamePresent:             &xos.OLTDevice_Name{olt.Hostname},
+		DeviceTypePresent:       &xos.OLTDevice_DeviceType{olt.Driver},
+		HostPresent:             &xos.OLTDevice_Host{olt.GetAddress().IP.String()},
+		PortPresent:             &xos.OLTDevice_Port{int32(olt.GetAddress().Port)},
+		OuterTpidPresent:        &xos.OLTDevice_OuterTpid{"0x8100"},
+		UplinkPresent:           &xos.OLTDevice_Uplink{"65536"},
+		NasIdPresent:            &xos.OLTDevice_NasId{olt.CLLI},
+		SwitchDatapathIdPresent: &xos.OLTDevice_SwitchDatapathId{"of:0000000000000001"},
+		SwitchPortPresent:       &xos.OLTDevice_SwitchPort{"1"},
+		VoltServicePresent:      &xos.OLTDevice_VoltServiceId{voltService.GetId()},
+	})
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		return err
+	}
+	log.Printf("Response is %v\n", response)
+	return nil
+}
+
+/*
+SendOltTosca - Provision OLT using TOSCA Interface
+*/
+func (chassis *Chassis) SendOltTosca(olt SimpleOLT) error {
 	ipString := olt.GetAddress().IP.String()
 	webServerPort := olt.GetAddress().Port
 	oltStruct := tosca.NewOltProvision(chassis.CLLI, olt.GetHostname(), olt.Driver, ipString, webServerPort)
 	yaml, _ := oltStruct.ToYaml()
 	if settings.GetDummy() {
 		log.Printf("yaml:%s\n", yaml)
-		log.Println("YAML IS NOT BEING SET TO XOS")
-		return
+		log.Println("YAML IS NOT BEING SET TO XOS or DEBUG is Set")
+		return nil
 	}
-	client := &http.Client{}
-	requestList := fmt.Sprintf("http://%s:%d/run", chassis.XOSAddress.IP.String(), chassis.XOSAddress.Port)
-	req, err := http.NewRequest("POST", requestList, strings.NewReader(yaml))
-	req.Header.Add("xos-username", chassis.XOSUser)
-	req.Header.Add("xos-password", chassis.XOSPassword)
-	resp, err := client.Do(req)
-	if err != nil {
-		//TODO
-		// handle error
-	}
-	log.Printf("Server response was %v\n", resp)
-}
-func (chassis *Chassis) provisionONT(ont Ont) {
-	//TODO - api call to provison s/c vlans and ont serial number etc
-	log.Printf("chassis.provisionONT(%s,SVlan:%d,CVlan:%d)\n", ont.SerialNumber, ont.Svlan, ont.Cvlan)
-	chassis.SendOntTosca(ont)
-	chassis.SendSubscriberTosca(ont)
-}
-func (chassis *Chassis) SendOntTosca(ont Ont) {
-	ponPort := ont.Parent
-	slot := ponPort.Parent
-	ontStruct := tosca.NewOntProvision(ont.SerialNumber, slot.Address.IP, ponPort.Number)
-	yaml, _ := ontStruct.ToYaml()
 
-	if settings.GetDummy() {
+	if settings.GetDebug() {
 		log.Printf("yaml:%s\n", yaml)
-		log.Println("YAML IS NOT BEING SET TO XOS")
-		return
 	}
 	client := &http.Client{}
 	requestList := fmt.Sprintf("http://%s:%d/run", chassis.XOSAddress.IP.String(), chassis.XOSAddress.Port)
@@ -114,11 +167,171 @@
 	resp, err := client.Do(req)
 	if err != nil {
 		log.Printf("ERROR :) %v\n", err)
-		// handle error
+		return err
+	}
+	log.Printf("Server response was %v\n", resp.Body)
+	return nil
+}
+func (chassis *Chassis) provisionONT(ont Ont) {
+	//TODO - api call to provison s/c vlans and ont serial number etc
+	log.Printf("chassis.provisionONT(%s,SVlan:%d,CVlan:%d)\n", ont.SerialNumber, ont.Svlan, ont.Cvlan)
+	if settings.GetGrpc() {
+		chassis.SendOntGRPC(ont)
+		chassis.SendSubscriberGRPC(ont)
+	} else {
+		chassis.SendOntTosca(ont)
+		chassis.SendSubscriberTosca(ont)
+	}
+}
+
+/*
+SendOntGRPC - Provision ONT on XOS using GRPC interface
+*/
+func (chassis *Chassis) SendOntGRPC(ont Ont) error {
+	if settings.GetDummy() {
+		log.Println("Running in Dummy mode with GRPC in SendOntGRPC")
+		return nil
+	}
+	ponPort := ont.Parent
+	slot := ponPort.Parent
+	ip := slot.Address.IP
+	ipNum := []byte(ip[12:16]) //only handling ipv4
+	ofID := fmt.Sprintf("of:00000000%0x", ipNum)
+
+	conn, err := grpc.Dial(chassis.XOSAddress.String(), grpc.WithInsecure(), grpc.WithPerRPCCredentials(basicAuth{
+		username: chassis.XOSUser,
+		password: chassis.XOSPassword,
+	},
+	))
+	defer conn.Close()
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		return err
+	}
+	xosClient := xos.NewXosClient(conn)
+	queryElement := &xos.QueryElement{Operator: xos.QueryElement_EQUAL, Name: "name", Value: &xos.QueryElement_SValue{"att-workflow-driver"}}
+	queryElements := []*xos.QueryElement{queryElement}
+	query := &xos.Query{Kind: xos.Query_DEFAULT, Elements: queryElements}
+
+	attWorkFlowResponse, err := xosClient.FilterAttWorkflowDriverService(context.Background(), query)
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		return err
+	}
+
+	attWorkFlowServices := attWorkFlowResponse.GetItems()
+	if len(attWorkFlowServices) == 0 {
+		err := "xosClient.FilterAttWorkflowDriverService return zero attWorkFlowServices with name att-workflow-driver"
+		log.Print(err)
+		return errors.New(err)
+	}
+	log.Printf("FilterAttWorkflowDriver response is %s", attWorkFlowResponse)
+	attWorkFlowService := attWorkFlowServices[0]
+
+	newQueryElement := &xos.QueryElement{Operator: xos.QueryElement_EQUAL, Name: "serial_number", Value: &xos.QueryElement_SValue{ont.SerialNumber}}
+	newQueryElements := []*xos.QueryElement{newQueryElement}
+	query = &xos.Query{Kind: xos.Query_DEFAULT, Elements: newQueryElements}
+
+	onuResponse, err := xosClient.FilterONUDevice(context.Background(), query)
+	log.Printf("FilterONU response is %s", onuResponse)
+	onus := onuResponse.GetItems()
+	if len(onus) == 0 {
+		err := fmt.Sprintf("xosClient.FilterONUDevices return zero onus with serial number %s", ont.SerialNumber)
+		log.Print(err)
+		return errors.New(err)
+	}
+	deviceID := onus[0].GetDeviceId()
+
+	offset := 1 << 29
+	ponPortNumber := offset + (ponPort.Number - 1)
+	log.Printf("Calling xosClient.CreateAttWorkflowDriverWhiteListEntry with SerialNumberPresent: %s DeviceIdPresent: %s PonPortIdPresent: %d OwnerPresent: %d", ont.SerialNumber, deviceID, ponPortNumber, attWorkFlowService.GetId())
+	response, err := xosClient.CreateAttWorkflowDriverWhiteListEntry(context.Background(), &xos.AttWorkflowDriverWhiteListEntry{
+		SerialNumberPresent: &xos.AttWorkflowDriverWhiteListEntry_SerialNumber{ont.SerialNumber},
+		//DeviceIdPresent:     &xos.AttWorkflowDriverWhiteListEntry_DeviceId{deviceID},
+		DeviceIdPresent:  &xos.AttWorkflowDriverWhiteListEntry_DeviceId{ofID},
+		PonPortIdPresent: &xos.AttWorkflowDriverWhiteListEntry_PonPortId{int32(ponPortNumber)},
+		OwnerPresent:     &xos.AttWorkflowDriverWhiteListEntry_OwnerId{attWorkFlowService.GetId()},
+	})
+
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		return err
+	}
+	log.Printf("Response is %v\n", response)
+	return nil
+}
+
+/*
+SendOntTosca - Provision ONT on XOS using Tosca interface
+*/
+func (chassis *Chassis) SendOntTosca(ont Ont) error {
+	ponPort := ont.Parent
+	slot := ponPort.Parent
+	ontStruct := tosca.NewOntProvision(ont.SerialNumber, slot.Address.IP, ponPort.Number)
+	yaml, _ := ontStruct.ToYaml()
+
+	if settings.GetDummy() {
+		log.Printf("yaml:%s\n", yaml)
+		log.Println("YAML IS NOT BEING SET TO XOS")
+		return nil
+	}
+	client := &http.Client{}
+	requestList := fmt.Sprintf("http://%s:%d/run", chassis.XOSAddress.IP.String(), chassis.XOSAddress.Port)
+	req, err := http.NewRequest("POST", requestList, strings.NewReader(yaml))
+	req.Header.Add("xos-username", chassis.XOSUser)
+	req.Header.Add("xos-password", chassis.XOSPassword)
+	resp, err := client.Do(req)
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		return err
 	}
 	log.Printf("Response is %v\n", resp)
+	return nil
 }
-func (chassis *Chassis) SendSubscriberTosca(ont Ont) {
+
+/*
+SendSubscriberGRPC - Provisons a subscriber using the GRPC Interface
+*/
+func (chassis *Chassis) SendSubscriberGRPC(ont Ont) error {
+	if settings.GetDummy() {
+		log.Println("Running in Dummy mode with GRPC in SendSubscriberGRPC")
+		return nil
+	}
+	ponPort := ont.Parent
+	slot := ponPort.Parent
+	conn, err := grpc.Dial(chassis.XOSAddress.String(), grpc.WithInsecure(), grpc.WithPerRPCCredentials(basicAuth{
+		username: chassis.XOSUser,
+		password: chassis.XOSPassword,
+	}))
+	defer conn.Close()
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		return err
+	}
+
+	xosClient := xos.NewXosClient(conn)
+	rgName := fmt.Sprintf("%s_%d_%d_%d_RG", chassis.CLLI, slot.Number, ponPort.Number, ont.Number)
+	response, err := xosClient.CreateRCORDSubscriber(context.Background(), &xos.RCORDSubscriber{
+		NamePresent:      &xos.RCORDSubscriber_Name{rgName},
+		CTagPresent:      &xos.RCORDSubscriber_CTag{int32(ont.Cvlan)},
+		STagPresent:      &xos.RCORDSubscriber_STag{int32(ont.Svlan)},
+		OnuDevicePresent: &xos.RCORDSubscriber_OnuDevice{ont.SerialNumber},
+		NasPortIdPresent: &xos.RCORDSubscriber_NasPortId{ont.NasPortID},
+		CircuitIdPresent: &xos.RCORDSubscriber_CircuitId{ont.CircuitID},
+		RemoteIdPresent:  &xos.RCORDSubscriber_RemoteId{chassis.CLLI}})
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		return err
+	}
+	log.Println(response)
+	return nil
+
+}
+
+/*
+SendSubscriberTosca - Provisons a subscriber using the Tosca Interface
+*/
+func (chassis *Chassis) SendSubscriberTosca(ont Ont) error {
 	ponPort := ont.Parent
 	slot := ponPort.Parent
 	requestList := fmt.Sprintf("http://%s:%d/run", chassis.XOSAddress.IP.String(), chassis.XOSAddress.Port)
@@ -128,26 +341,79 @@
 	if settings.GetDummy() {
 		log.Printf("yaml:%s\n", yaml)
 		log.Println("YAML IS NOT BEING SET TO XOS")
-	} else {
-		req, err := http.NewRequest("POST", requestList, strings.NewReader(yaml))
-		req.Header.Add("xos-username", chassis.XOSUser)
-		req.Header.Add("xos-password", chassis.XOSPassword)
-		client := &http.Client{}
-		resp, err := client.Do(req)
-		if err != nil {
-			log.Printf("ERROR :) %v\n", err)
-			// handle error
-		}
-		log.Printf("Response is %v\n", resp)
-
+		return nil
 	}
+	req, err := http.NewRequest("POST", requestList, strings.NewReader(yaml))
+	req.Header.Add("xos-username", chassis.XOSUser)
+	req.Header.Add("xos-password", chassis.XOSPassword)
+	client := &http.Client{}
+	resp, err := client.Do(req)
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		return err
+	}
+	log.Printf("Response is %v\n", resp)
+
+	return nil
 }
+
 func (chassis *Chassis) deleteONT(ont Ont) {
 	log.Printf("chassis.deleteONT(%s,SVlan:%d,CVlan:%d)\n", ont.SerialNumber, ont.Svlan, ont.Cvlan)
+	if settings.GetGrpc() {
+		chassis.deleteOntWhitelistGRPC(ont)
+	} else {
+		chassis.deleteOntTosca(ont)
+	}
+}
+
+/*
+deleteOntGRPC - deletes ONT using XOS GRPC Interface
+*/
+func (chassis *Chassis) deleteOntWhitelistGRPC(ont Ont) error {
+	if settings.GetDummy() {
+		log.Println("Running in Dummy mode with GRPC in SendSubscriberGRPC")
+		return nil
+	}
+	conn, err := grpc.Dial(chassis.XOSAddress.String(), grpc.WithInsecure(), grpc.WithPerRPCCredentials(basicAuth{
+		username: chassis.XOSUser,
+		password: chassis.XOSPassword,
+	}))
+	defer conn.Close()
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		return err
+	}
+	xosClient := xos.NewXosClient(conn)
+	queryElement := &xos.QueryElement{Operator: xos.QueryElement_EQUAL, Name: "serial_number", Value: &xos.QueryElement_SValue{ont.SerialNumber}}
+	queryElements := []*xos.QueryElement{queryElement}
+	query := &xos.Query{Kind: xos.Query_DEFAULT, Elements: queryElements}
+	onuResponse, err := xosClient.FilterAttWorkflowDriverWhiteListEntry(context.Background(), query)
+	onus := onuResponse.GetItems()
+	if len(onus) == 0 {
+		errorMsg := fmt.Sprintf("Unable to find WhiteListEntry in XOS with SerialNumber %s", ont.SerialNumber)
+		return errors.New(errorMsg)
+	}
+	onu := onus[0]
+	log.Printf("DeleteAttWorkflowDriverWhiteListEntry ONU : %v\n", onu)
+
+	id := &xos.ID{Id: onu.GetId()}
+	log.Printf("DeleteAttWorkflowDriverWhiteListEntry XOSID:%v\n", id)
+	response, err := xosClient.DeleteAttWorkflowDriverWhiteListEntry(context.Background(), id)
+
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		return err
+	}
+	log.Printf("Response is %v\n", response)
+	return nil
+}
+
+/*
+deleteOntTosca - deletes ONT using XOS Tosca Interface
+*/
+func (chassis *Chassis) deleteOntTosca(ont Ont) {
 	ponPort := ont.Parent
 	slot := ponPort.Parent
-
-	//func NewOntProvision(serialNumber string, oltIP net.IP, ponPortNumber int) OntProvision {
 	ontStruct := tosca.NewOntProvision(ont.SerialNumber, slot.Address.IP, ponPort.Number)
 	yaml, _ := ontStruct.ToYaml()
 	fmt.Println(yaml)
@@ -181,15 +447,14 @@
 		log.Printf("yaml:%s\n", yaml)
 		log.Println("YAML IS NOT BEING SET TO XOS")
 		return
-	} else {
-		req, err := http.NewRequest("POST", requestList, strings.NewReader(yaml))
-		req.Header.Add("xos-username", chassis.XOSUser)
-		req.Header.Add("xos-password", chassis.XOSPassword)
-		resp, err := client.Do(req)
-		if err != nil {
-			log.Printf("ERROR :) %v\n", err)
-			// handle error
-		}
-		log.Printf("Response is %v\n", resp)
 	}
+	req, err := http.NewRequest("POST", requestList, strings.NewReader(yaml))
+	req.Header.Add("xos-username", chassis.XOSUser)
+	req.Header.Add("xos-password", chassis.XOSPassword)
+	resp, err := client.Do(req)
+	if err != nil {
+		log.Printf("ERROR :) %v\n", err)
+		// handle error
+	}
+	log.Printf("Response is %v\n", resp)
 }
diff --git a/models/physical/ponport.go b/models/physical/ponport.go
index 738d65e..5012fe1 100644
--- a/models/physical/ponport.go
+++ b/models/physical/ponport.go
@@ -68,6 +68,7 @@
 PreProvisionOnt - passes ont information to chassis to make call to NEM to activate (whitelist) ont
 */
 func (port *PONPort) PreProvisionOnt(number int, sVlan uint32, cVlan uint32, nasPortID string, circuitID string, techProfile string, speedProfile string) error {
+	fmt.Printf("PrPreProvisionOnt(number %d, sVlan %d, cVlan %d, nasPortID %s, circuitID %s, techProfile %s, speedProfile %s\n", number, sVlan, cVlan, nasPortID, circuitID, techProfile, speedProfile)
 	slot := port.Parent
 	chassis := slot.Parent
 
@@ -84,6 +85,7 @@
 	ont.CircuitID = circuitID
 	ont.TechProfile = techProfile
 	ont.SpeedProfile = speedProfile
+	fmt.Printf("ponPort PreProvision ont :%v\n", ont)
 	return nil
 }
 
@@ -98,10 +100,10 @@
 		e := AllReadyActiveError{ontNumber: number, slotNum: slot.Number, ponportNum: port.Number, clli: chassis.CLLI}
 		return &e
 	}
-	ont := port.Onts[number-1]
+	ont := &port.Onts[number-1]
 	ont.SerialNumber = serialNumber
 	fmt.Println(ont)
-	port.Parent.Parent.provisionONT(ont)
+	port.Parent.Parent.provisionONT(*ont)
 	port.Onts[number-1].Active = true
 	return nil
 
@@ -130,6 +132,8 @@
 DeleteOnt - passes ont information to chassis to make call to NEM to de-activate (de-whitelist) ont
 */
 func (port *PONPort) DeleteOnt(number int, sVlan uint32, cVlan uint32, serialNumber string) error {
+
+	fmt.Printf("DeleteOnt(number %d, sVlan %d, cVlan %d, serialNumber %s)\n", number, sVlan, cVlan, serialNumber)
 	slot := port.Parent
 	chassis := slot.Parent
 	if port.Onts[number-1].Active != true {
diff --git a/models/tosca/addOlt.go b/models/tosca/addOlt.go
index 30e8d12..07bd997 100644
--- a/models/tosca/addOlt.go
+++ b/models/tosca/addOlt.go
@@ -44,10 +44,10 @@
            host: test
            port: 32
            outer_tpid: "0x8100"
-           uplink: "65536"
            nas_id:
            switch_datapath_id: of:0000000000000001
            switch_port: "1"
+           uplink: "65536"
         requirements:
           - volt_service:
               node: service#volt