diff --git a/README.md b/README.md
index cb0dc8c..d0457cf 100644
--- a/README.md
+++ b/README.md
@@ -9,9 +9,23 @@
 
 ![bbf-adapter-architecture](docs/images/bbf-adapter-architecture.svg)
 
-## Documentation
+## Deployment
 
-For information on how to deploy the BBF Adapter, please refer to [the docs folder](docs/deploy.md).
+For information on how to deploy the BBF Adapter, please refer to [deploy.md](docs/deploy.md) in the [docs](docs/README.md) folder.
+
+## Building
+
+The default credentials used to authenticate to the netopeer2 server in the BBF adapter's container are `voltha:onf`.
+
+An image with custom credentials can be built by running the following command:
+
+```
+NETCONF_USER=<username> NETCONF_PASSWORD=<password> make build
+```
+
+## Additional doucmentation
+
+Further documentation for the adapter's development can be found in the [docs](docs/README.md) folder.
 
 ## Development `make` targets
 
diff --git a/build/package/Dockerfile.bbf-adapter b/build/package/Dockerfile.bbf-adapter
index 0d8fadc..eccf3fa 100644
--- a/build/package/Dockerfile.bbf-adapter
+++ b/build/package/Dockerfile.bbf-adapter
@@ -79,7 +79,7 @@
 
 # Copy yang files and install them to sysrepo
 COPY ./build/yang-files /yang
-RUN sysrepoctl -a -i /yang/bbf-device-aggregation.yang -s /yang -p 664 -v3
+RUN for f in /yang/*.yang; do sysrepoctl -a -i "$f" -s /yang -p 664 -v3; done
 
 # Add user for connecting to netopeer2-server through ssh
 ARG NETCONF_USER=voltha
diff --git a/cmd/bbf-adapter/main.go b/cmd/bbf-adapter/main.go
index 48ac7b8..85ed990 100644
--- a/cmd/bbf-adapter/main.go
+++ b/cmd/bbf-adapter/main.go
@@ -21,16 +21,15 @@
 	"fmt"
 	"os"
 	"os/signal"
-	"sync"
 	"syscall"
 	"time"
 
-	"github.com/golang/protobuf/ptypes/empty"
 	"github.com/opencord/voltha-lib-go/v7/pkg/log"
 	"github.com/opencord/voltha-lib-go/v7/pkg/probe"
 	"github.com/opencord/voltha-lib-go/v7/pkg/version"
 	"github.com/opencord/voltha-northbound-bbf-adapter/internal/clients"
 	"github.com/opencord/voltha-northbound-bbf-adapter/internal/config"
+	"github.com/opencord/voltha-northbound-bbf-adapter/internal/core"
 	"github.com/opencord/voltha-northbound-bbf-adapter/internal/sysrepo"
 )
 
@@ -53,7 +52,7 @@
 	}
 }
 
-func (a *bbfAdapter) start(ctx context.Context, wg *sync.WaitGroup) {
+func (a *bbfAdapter) start(ctx context.Context) {
 	var err error
 
 	//Connect to the voltha northbound api
@@ -72,6 +71,9 @@
 		probe.UpdateStatusFromContext(ctx, a.conf.OnosRestEndpoint, probe.ServiceStatusRunning)
 	}
 
+	//Create the global adapter that will be used by callbacks
+	core.AdapterInstance = core.NewVolthaYangAdapter(a.volthaNbiClient, a.oltAppClient)
+
 	//Load sysrepo plugin
 	a.sysrepoPlugin, err = sysrepo.StartNewPlugin(ctx)
 	if err != nil {
@@ -80,56 +82,23 @@
 		probe.UpdateStatusFromContext(ctx, sysrepoService, probe.ServiceStatusRunning)
 	}
 
-	//Run the main logic of the BBF adapter
-
 	//Set the service as running, making the adapter finally ready
 	probe.UpdateStatusFromContext(ctx, bbfAdapterService, probe.ServiceStatusRunning)
 	logger.Info(ctx, "bbf-adapter-ready")
-
-loop:
-	for {
-		select {
-		case <-ctx.Done():
-			logger.Info(ctx, "stop-for-context-done")
-			break loop
-		case <-time.After(15 * time.Second):
-			//TODO: this is just to test functionality
-
-			//Make a request to voltha
-			devices, err := a.volthaNbiClient.Service.ListDevices(ctx, &empty.Empty{})
-			if err != nil {
-				logger.Errorw(ctx, "failed-to-list-devices", log.Fields{"err": err})
-				continue
-			}
-			logger.Debugw(ctx, "Got devices from VOLTHA", log.Fields{"devNum": len(devices.Items)})
-
-			//Make a request to Olt app
-			response, err := a.oltAppClient.GetStatus()
-			if err != nil {
-				logger.Errorw(ctx, "failed-to-get-status", log.Fields{
-					"err":     err,
-					"reponse": response,
-				})
-				continue
-			} else {
-				logger.Debugw(ctx, "Got status from OltApp", log.Fields{"response": response})
-			}
-
-			logger.Warn(ctx, "BBF Adapter currently has no implemented logic.")
-		}
-	}
-
-	probe.UpdateStatusFromContext(ctx, bbfAdapterService, probe.ServiceStatusStopped)
-	wg.Done()
 }
 
 //Close all connections of the adapter
 func (a *bbfAdapter) cleanup(ctx context.Context) {
+	core.AdapterInstance = nil
+
 	a.volthaNbiClient.Close(ctx)
+
 	err := a.sysrepoPlugin.Stop(ctx)
 	if err != nil {
 		logger.Errorw(ctx, "failed-to-stop-sysrepo-plugin", log.Fields{"err": err})
 	}
+
+	probe.UpdateStatusFromContext(ctx, bbfAdapterService, probe.ServiceStatusStopped)
 }
 
 func printBanner() {
@@ -245,9 +214,7 @@
 	adapter := newBbfAdapter(conf)
 
 	//Run the adapter
-	wg := &sync.WaitGroup{}
-	wg.Add(1)
-	go adapter.start(probeCtx, wg)
+	adapter.start(probeCtx)
 	defer adapter.cleanup(probeCtx)
 
 	//Wait a signal to stop execution
@@ -256,8 +223,6 @@
 
 	//Stop everything that waits for the context to be done
 	cancelCtx()
-	//Wait for the adapter logic to stop
-	wg.Wait()
 
 	elapsed := time.Since(start)
 	logger.Infow(ctx, "run-time", log.Fields{"time": elapsed.Seconds()})
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..c37a0c3
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,13 @@
+The goal of the voltha-northbound-bbf-adapter is to enable VOLTHA to be controlled through NETCONF using standard BBF yang modules. The current state of the translation between the two mainly consists in the use of the models from [TR-383](https://wiki.broadband-forum.org/display/BBF/TR-383%3A+Common+YANG+Modules+for+Access+Networks).\
+The architecture used by the adapter to achieve this involves the use of netopeer2 as a NETCONF server and sysrepo as its datastore. This configuration was proposed by BISDN, more information can be found in the [slides](https://wiki.broadband-forum.org/display/BBF/ONF+and+BBF+SEBA+Collaboration?preview=/131466119/141855024/20220309%20-%20vOLTHA%20adaption%20to%20BBF%20yang%20models.pptx).
+
+On its northbound, the BBF adapter interacts with sysrepo by acting as a plugin, using the APIs of libsysrepo.
+Instead, on its southbound, it interacts with VOLTHA's northbound APIs and the Olt ONOS app REST APIs to collect data and perform commands.
+
+![bbf-adapter-architecture](images/bbf-adapter-architecture.svg)
+
+# Additional documentation
+
+- [Deployment](deploy.md)
+- [Code structure](code_structure.md)
+- [Expanding functionality](expanding.md)
\ No newline at end of file
diff --git a/docs/code_structure.md b/docs/code_structure.md
new file mode 100644
index 0000000..4eb3e0d
--- /dev/null
+++ b/docs/code_structure.md
@@ -0,0 +1,46 @@
+# BBF Adapter code structure
+
+## `build` directory and Docker images
+
+The `build` directory contains the files used for the creation of a voltha-northbound-bbf-adapter Docker image that can be used for deployment.
+
+- `build/tools` contains the Dockerfile of the "builder" image. This image includes a golang toolchain and the .deb packages for libyang and sysrepo.\
+The presence of these packages allows the correct compilation of the project, which would otherwise fail due to missing dependencies. The same image is used for linting and testing through the Makefile.
+- `build/package` contains the Dockerfile of the actual BBF adapter image. It uses the builder image to compile the code of this repository. The generated binaries are then copied on the production image, where packages for libyang, sysrepo and netopeer2 are installed.\
+During this step, the yang files in `build/yang-files` are installed with sysrepoctl, making them available at runtime.\
+A user account that can be used to log in to netopeer2 is also created at this time. The credentials of this user can be changed by setting the `NETCONF_USER` and `NETCONF_PASSWORD` arguments.
+
+When the adapter image is deployed with the `onf/voltha-northbound-bbf-adapter` helm chart defined in [voltha-helm-charts](https://github.com/opencord/voltha-helm-charts), netopeer2 is automatically started with the `netopeer2-server` command before running the adapter itself.
+
+## `cmd` directory
+
+The `cmd/bbf-adapter` directory contains the source for the main function of the adapter.\
+`main.go` loads the configuration provided through CLI flags by the user, starts all the necessary components defined in the `internal` directory, keeps track of the adapter's readiness status and exposes it through the probe package of voltha-lib-go.
+
+## `internal` directory
+
+The `interal` directory contains the remaining logic of the adapter, split in multiple packages.
+
+### `internal/clients`
+
+This package contains the implementation of clients that the adapter can use to interact with the VOLTHA components that are necessary to provide its funcionality.
+-  `nbi.go` provides a connection to VOLTHA's "northbound interface" gRPC service, which can be used to interact with the core the same way a user would using voltctl. This client can be used to list the devices, provision a new OLT and enable it.
+- `olt_app.go` provides wrapper functions for the REST APIs exposed by the Olt ONOS application. This client can be used to provision a subscriber on a specific device and port.
+
+### `internal/config`
+
+This package contains the definition of CLI flags that can be used to configure the adapter's behavior, and their default values.
+
+### `interal/core`
+
+This package contains the implementation of the VolthaYangAdapter (`adapter.go`), an instance of which is exposed globally as core.AdapterInstance. This is necessary because the callback functions defined in `internal/sysrepo/syrepo.go` would have no other way to reference it when being called from sysrepo.\
+VolthaYangAdapter provides methods to perform actions through its clients or request data from them. In the latter case, the functions defined in `translation.go` are used to translate information to a set of yang paths and values that will be used to update the NETCONF datastore.
+
+### `internal/sysrepo`
+
+Since sysrepo doesn't provide official bindings for golang, this project uses CGO to interact with sysrepo through its official C library: libsysrepo.
+
+- `plugin.c` is a C file used to include dependencies (like libyang and sysrepo header files) and define some utilities that make it possible to perform all the necessary operations through CGO.
+- `sysrepo.go` imports `plugin.c` and defines the SysrepoPlugin struct, which keeps track of the adapter's connection with sysrepo. At startup, a connection is created and the necessary callback functions are registered.
+
+When a NETCONF operation is executed on one of the modules managed by the BBF adapter, the corresponding go function will be called. The latter will interact with the global instance of VolthaYangAdapter to fulfill the request and provide a result, eventually updating the content of the datastore.
\ No newline at end of file
diff --git a/docs/deploy.md b/docs/deploy.md
index 44f5a3a..0f80c77 100644
--- a/docs/deploy.md
+++ b/docs/deploy.md
@@ -13,7 +13,7 @@
 
 ```
 helm upgrade --install --create-namespace -n voltha bbf \
-            onf/voltha-northbound-bbf-adapter/ --devel \
+            onf/voltha-northbound-bbf-adapter --devel \
             --set global.voltha_infra_name=voltha-infra \
             --set global.voltha_infra_namespace=infra \
             --set global.voltha_stack_name=voltha \
@@ -54,11 +54,9 @@
 After a successful login, a request can be performed:
 
 ```
-get-data --datastore operational --filter-xpath /bbf-device-aggregation:devices
+get-data --datastore operational --filter-xpath /bbf-device-aggregation:*
 ```
 
-The adapter doesn't perform request translations yet, but the success of the operation can be inferred by looking at the container's logs, which will show a `>>>>>>>RECEIVED REQUEST FROM SYSREPO<<<<<<<` message.
-
 ## Stop the BBF adapter
 ```
 helm delete -n voltha bbf
diff --git a/docs/expanding.md b/docs/expanding.md
new file mode 100644
index 0000000..eb7b773
--- /dev/null
+++ b/docs/expanding.md
@@ -0,0 +1,14 @@
+# Expanding the adapter's functionality
+
+## Resources
+- [libsysrepo API documentation](https://netopeer.liberouter.org/doc/sysrepo/master/html/modules.html)
+- [libyang API documentation](https://netopeer.liberouter.org/doc/libyang/master/html/modules.html)
+
+## How to expand the adapter's functionality by creating new callbacks
+
+- If additional yang modules are needed, add them to `build/yang-files` to be installed to sysrepo during the creation of the adapter's Docker image
+- A new callback function has to be created. CGO cannot directly express the `const` keyword used in the signature of the C callbacks of libsysrepo.\
+For this reason, a Go function can be created and exposed in `internal/sysrepo/sysrepo.go`, while its corresponding wrapper with the right signature has to be created in `internal/sysrepo/plugin.go`.
+- The new callback wrapper has to be registered in the StartNewPlugin function of `internal/sysrepo/sysrepo.go`, using the sysrepo API to subscribe to the desired type of operation and XPath.
+- The Golang callback will interact with VOLTHA through the instance of VolthaYangAdapter exposed by the `core.AdapterInstance` variable.\
+If the operation needed by the new callback is not implemented already, it can be created as a new method in `internal/core/adapter.go`, eventually expanding the capabilities of the clients in `internal/clients/nbi.go` and `internal/clients/olt_app.go`, or creating new translation functions in `internal/core/translation.go`.
\ No newline at end of file
diff --git a/internal/core/adapter.go b/internal/core/adapter.go
new file mode 100644
index 0000000..a96767f
--- /dev/null
+++ b/internal/core/adapter.go
@@ -0,0 +1,54 @@
+/*
+* Copyright 2022-present Open Networking Foundation
+
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+
+* http://www.apache.org/licenses/LICENSE-2.0
+
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+ */
+
+package core
+
+import (
+	"context"
+	"fmt"
+
+	"github.com/golang/protobuf/ptypes/empty"
+	"github.com/opencord/voltha-lib-go/v7/pkg/log"
+	"github.com/opencord/voltha-northbound-bbf-adapter/internal/clients"
+)
+
+var AdapterInstance *VolthaYangAdapter
+
+type VolthaYangAdapter struct {
+	volthaNbiClient *clients.VolthaNbiClient
+	oltAppClient    *clients.OltAppClient
+}
+
+func NewVolthaYangAdapter(nbiClient *clients.VolthaNbiClient, oltClient *clients.OltAppClient) *VolthaYangAdapter {
+	return &VolthaYangAdapter{
+		volthaNbiClient: nbiClient,
+		oltAppClient:    oltClient,
+	}
+}
+
+func (t *VolthaYangAdapter) GetDevices(ctx context.Context) ([]YangItem, error) {
+	devices, err := t.volthaNbiClient.Service.ListDevices(ctx, &empty.Empty{})
+	if err != nil {
+		err = fmt.Errorf("get-devices-failed: %v", err)
+		return nil, err
+	}
+
+	items := translateDevices(*devices)
+
+	logger.Debugw(ctx, "get-devices-success", log.Fields{"items": items})
+
+	return items, nil
+}
diff --git a/internal/core/logger.go b/internal/core/logger.go
new file mode 100644
index 0000000..0aa6eef
--- /dev/null
+++ b/internal/core/logger.go
@@ -0,0 +1,32 @@
+/*
+* Copyright 2022-present Open Networking Foundation
+
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+
+* http://www.apache.org/licenses/LICENSE-2.0
+
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+ */
+
+package core
+
+import (
+	"github.com/opencord/voltha-lib-go/v7/pkg/log"
+)
+
+var logger log.CLogger
+
+func init() {
+	// Setup this package so that it's log level can be modified at run time
+	var err error
+	logger, err = log.RegisterPackage(log.JSON, log.ErrorLevel, log.Fields{})
+	if err != nil {
+		panic(err)
+	}
+}
diff --git a/internal/core/translation.go b/internal/core/translation.go
new file mode 100644
index 0000000..bc7c692
--- /dev/null
+++ b/internal/core/translation.go
@@ -0,0 +1,67 @@
+/*
+* Copyright 2022-present Open Networking Foundation
+
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+
+* http://www.apache.org/licenses/LICENSE-2.0
+
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+ */
+
+package core
+
+import (
+	"fmt"
+
+	"github.com/opencord/voltha-protos/v5/go/voltha"
+)
+
+const (
+	DeviceAggregationModel = "bbf-device-aggregation"
+	DevicesPath            = "/" + DeviceAggregationModel + ":devices"
+	DeviceTypeOlt          = "bbf-device-types:olt"
+	DeviceTypeOnu          = "bbf-device-types:onu"
+)
+
+type YangItem struct {
+	Path  string
+	Value string
+}
+
+//getDevicePath returns the yang path to the root of the device with a specific ID
+func getDevicePath(id string) string {
+	return fmt.Sprintf("%s/device[name='%s']", DevicesPath, id)
+}
+
+//translateDevice returns a slice of yang items that represent a voltha device
+func translateDevice(device voltha.Device) []YangItem {
+	devicePath := getDevicePath(device.Id)
+
+	typeItem := YangItem{}
+	typeItem.Path = fmt.Sprintf("%s/type", devicePath)
+
+	if device.Root {
+		typeItem.Value = DeviceTypeOlt
+	} else {
+		typeItem.Value = DeviceTypeOnu
+	}
+
+	return []YangItem{typeItem}
+}
+
+//translateDevices returns a slice of yang items that represent a list of voltha devices
+func translateDevices(devices voltha.Devices) []YangItem {
+	result := []YangItem{}
+
+	for _, device := range devices.Items {
+		result = append(result, translateDevice(*device)...)
+	}
+
+	return result
+}
diff --git a/internal/core/translation_test.go b/internal/core/translation_test.go
new file mode 100644
index 0000000..fb2e751
--- /dev/null
+++ b/internal/core/translation_test.go
@@ -0,0 +1,101 @@
+/*
+* Copyright 2022-present Open Networking Foundation
+
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+
+* http://www.apache.org/licenses/LICENSE-2.0
+
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+ */
+
+package core
+
+import (
+	"fmt"
+	"testing"
+
+	"github.com/opencord/voltha-protos/v5/go/voltha"
+	"github.com/stretchr/testify/assert"
+)
+
+const (
+	testDeviceId = "123145abcdef"
+)
+
+func getItemWithPath(items []YangItem, path string) (value string, ok bool) {
+	for _, item := range items {
+		if item.Path == path {
+			return item.Value, true
+		}
+	}
+
+	return "", false
+}
+
+func TestDevicePath(t *testing.T) {
+	path := getDevicePath(testDeviceId)
+	assert.Equal(t, fmt.Sprintf("/bbf-device-aggregation:devices/device[name='%s']", testDeviceId), path)
+}
+
+func TestTranslateDevice(t *testing.T) {
+	olt := voltha.Device{
+		Id:   testDeviceId,
+		Root: true,
+	}
+	items := translateDevice(olt)
+
+	val, ok := getItemWithPath(items, fmt.Sprintf("%s/type", getDevicePath(testDeviceId)))
+	assert.True(t, ok, "No type item for olt")
+	assert.Equal(t, DeviceTypeOlt, val)
+
+	onu := voltha.Device{
+		Id:   testDeviceId,
+		Root: false,
+	}
+	items = translateDevice(onu)
+
+	val, ok = getItemWithPath(items, fmt.Sprintf("%s/type", getDevicePath(testDeviceId)))
+	assert.True(t, ok, "No type item for onu")
+	assert.Equal(t, DeviceTypeOnu, val)
+}
+
+func TestTranslateDevices(t *testing.T) {
+	devicesNum := 10
+
+	//Create test devices
+	devices := voltha.Devices{
+		Items: []*voltha.Device{},
+	}
+
+	for i := 0; i < devicesNum; i++ {
+		devices.Items = append(devices.Items, &voltha.Device{
+			Id:   fmt.Sprintf("%d", i),
+			Root: i%2 == 0,
+		})
+	}
+
+	//Translate them to items
+	items := translateDevices(devices)
+
+	//Check if the number of generated items is correct
+	singleDeviceItemsNum := len(translateDevice(*devices.Items[0]))
+	assert.Equal(t, singleDeviceItemsNum*devicesNum, len(items))
+
+	//Check if the content is right
+	for i := 0; i < devicesNum; i++ {
+		val, ok := getItemWithPath(items, fmt.Sprintf("%s/type", getDevicePath(devices.Items[i].Id)))
+		assert.True(t, ok, fmt.Sprintf("No type item for device %d", i))
+
+		if devices.Items[i].Root {
+			assert.Equal(t, DeviceTypeOlt, val)
+		} else {
+			assert.Equal(t, DeviceTypeOnu, val)
+		}
+	}
+}
diff --git a/internal/sysrepo/plugin.c b/internal/sysrepo/plugin.c
index edbf0e5..f3ff6a3 100644
--- a/internal/sysrepo/plugin.c
+++ b/internal/sysrepo/plugin.c
@@ -14,16 +14,22 @@
 * limitations under the License.
  */
 
+#include <libyang/libyang.h>
 #include <sysrepo.h>
 #include <sysrepo/xpath.h>
 
 //Needed to handle callback functions with a working data type in CGO
 typedef void (*function)(); // https://golang.org/issue/19835
 
-//Exported by sysrepo.go
-void get_data_cb();
+//CGO can't see raw structs
+typedef struct lyd_node lyd_node;
 
-int get_data_cb_wrapper(
+//Exported by sysrepo.go
+sr_error_t get_devices_cb(sr_session_ctx_t *session, lyd_node **parent);
+
+//The wrapper function is needed because CGO cannot express const char*
+//and thus it can't match sysrepo's callback signature
+int get_devices_cb_wrapper(
     sr_session_ctx_t *session,
     uint32_t subscription_id,
     const char *module_name,
@@ -33,7 +39,5 @@
     struct lyd_node **parent,
     void *private_data)
 {
-    get_data_cb();
-
-    return SR_ERR_OK;
+    return get_devices_cb(session, parent);
 }
\ No newline at end of file
diff --git a/internal/sysrepo/sysrepo.go b/internal/sysrepo/sysrepo.go
index b0ebc1f..57de757 100644
--- a/internal/sysrepo/sysrepo.go
+++ b/internal/sysrepo/sysrepo.go
@@ -17,19 +17,16 @@
 package sysrepo
 
 //#cgo CFLAGS: -I/usr/include
-//#cgo LDFLAGS: -lsysrepo -Wl,--allow-multiple-definition
+//#cgo LDFLAGS: -lsysrepo -lyang -Wl,--allow-multiple-definition
 //#include "plugin.c"
 import "C"
 import (
 	"context"
 	"fmt"
+	"unsafe"
 
 	"github.com/opencord/voltha-lib-go/v7/pkg/log"
-)
-
-const (
-	BASE_YANG_MODEL    = "bbf-device-aggregation"
-	DEVICES_YANG_MODEL = "/" + BASE_YANG_MODEL + ":devices"
+	"github.com/opencord/voltha-northbound-bbf-adapter/internal/core"
 )
 
 type SysrepoPlugin struct {
@@ -42,10 +39,48 @@
 	return C.GoString(C.sr_strerror(code))
 }
 
+func freeCString(str *C.char) {
+	if str != nil {
+		C.free(unsafe.Pointer(str))
+		str = nil
+	}
+}
+
+func updateYangItems(ctx context.Context, session *C.sr_session_ctx_t, parent **C.lyd_node, items []core.YangItem) error {
+	conn := C.sr_session_get_connection(session)
+	if conn == nil {
+		return fmt.Errorf("null-connection")
+	}
+
+	//libyang context
+	ly_ctx := C.sr_get_context(conn)
+	if ly_ctx == nil {
+		return fmt.Errorf("null-libyang-context")
+	}
+
+	for _, item := range items {
+		logger.Debugw(ctx, "updating-yang-item", log.Fields{"item": item})
+
+		path := C.CString(item.Path)
+		value := C.CString(item.Value)
+
+		lyErr := C.lyd_new_path(*parent, ly_ctx, path, value, 0, nil)
+		if lyErr != C.LY_SUCCESS {
+			freeCString(path)
+			freeCString(value)
+			return fmt.Errorf("libyang-new-path-failed: %d", lyErr)
+		}
+
+		freeCString(path)
+		freeCString(value)
+	}
+
+	return nil
+}
+
 //createPluginState populates a SysrepoPlugin struct by establishing
 //a connection and a session
 func (p *SysrepoPlugin) createSession(ctx context.Context) error {
-
 	var errCode C.int
 
 	//Populates connection
@@ -70,17 +105,42 @@
 	return nil
 }
 
-//export get_data_cb
-func get_data_cb() {
-	//This function is a callback for the retrieval of data from sysrepo
+//export get_devices_cb
+func get_devices_cb(session *C.sr_session_ctx_t, parent **C.lyd_node) C.sr_error_t {
+	//This function is a callback for the retrieval of devices from sysrepo
 	//The "export" comment instructs CGO to create a C function for it
 
-	//As a placeholder, it just reports that a request to get data
-	//has been received from the netconf server
-
-	//TODO: get actual information
 	ctx := context.Background()
-	logger.Info(ctx, ">>>>>>>RECEIVED REQUEST FROM SYSREPO<<<<<<<")
+	logger.Debug(ctx, "processing-get-data-request")
+
+	if session == nil {
+		logger.Error(ctx, "sysrepo-get-data-null-session")
+		return C.SR_ERR_OPERATION_FAILED
+	}
+
+	if parent == nil {
+		logger.Error(ctx, "sysrepo-get-data-null-parent-node")
+		return C.SR_ERR_OPERATION_FAILED
+	}
+
+	if core.AdapterInstance == nil {
+		logger.Error(ctx, "sysrepo-get-data-nil-translator")
+		return C.SR_ERR_OPERATION_FAILED
+	}
+
+	devices, err := core.AdapterInstance.GetDevices(ctx)
+	if err != nil {
+		logger.Errorw(ctx, "sysrepo-get-data-translator-error", log.Fields{"err": err})
+		return C.SR_ERR_OPERATION_FAILED
+	}
+
+	err = updateYangItems(ctx, session, parent, devices)
+	if err != nil {
+		logger.Errorw(ctx, "sysrepo-get-data-update-error", log.Fields{"err": err})
+		return C.SR_ERR_OPERATION_FAILED
+	}
+
+	return C.SR_ERR_OK
 }
 
 func StartNewPlugin(ctx context.Context) (*SysrepoPlugin, error) {
@@ -98,11 +158,17 @@
 	//Set callbacks for events
 
 	//Subscribe with a callback to the request of data on a certain path
+	module := C.CString(core.DeviceAggregationModel)
+	defer freeCString(module)
+
+	path := C.CString(core.DevicesPath + "/*")
+	defer freeCString(path)
+
 	errCode := C.sr_oper_get_items_subscribe(
 		plugin.session,
-		C.CString(BASE_YANG_MODEL),
-		C.CString(DEVICES_YANG_MODEL+"/*"),
-		C.function(C.get_data_cb_wrapper),
+		module,
+		path,
+		C.function(C.get_devices_cb_wrapper),
 		C.NULL,
 		C.SR_SUBSCR_CTX_REUSE,
 		&plugin.subscription,
