diff --git a/osam-core/web/pom.xml b/osam-core/web/pom.xml
new file mode 100644
index 0000000..e8bd078
--- /dev/null
+++ b/osam-core/web/pom.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--/*-
+        * ============LICENSE_START=======================================================
+        * OSAM Core
+        * ================================================================================
+        * Copyright (C) 2018 Netsia
+        * ================================================================================
+        * 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.
+        * ============LICENSE_END=========================================================
+        */-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>osam-core</artifactId>
+        <groupId>org.onap.osam</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>web</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.osam</groupId>
+            <artifactId>core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>${swagger.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>${swagger.version}</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/osam-core/web/src/main/java/org/onap/osam/controller/AbstractController.java b/osam-core/web/src/main/java/org/onap/osam/controller/AbstractController.java
new file mode 100644
index 0000000..97bfa7c
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/controller/AbstractController.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.controller;
+
+import org.onap.osam.common.exception.BadFormatException;
+import org.onap.osam.common.exception.NotFoundException;
+import org.onap.osam.common.exception.UnknownTypeException;
+import org.slf4j.Logger;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * Created by cemturker on 30.09.2018.
+ */
+public abstract class AbstractController {
+
+    private Logger logger;
+
+    public AbstractController(Logger logger) {
+        this.logger = logger;
+    }
+
+    public <T>  ResponseEntity<T> proceedException(Exception e) {
+        if (e instanceof BadFormatException || e instanceof UnknownTypeException) {
+            return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();
+        } else if(e instanceof NotFoundException) {
+            return ResponseEntity.status(HttpStatus.NOT_FOUND).build();
+        } else {
+            logger.error("",e);
+            return ResponseEntity.status(HttpStatus.SERVICE_UNAVAILABLE).build();
+        }
+    }
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/controller/AccessPodRestController.java b/osam-core/web/src/main/java/org/onap/osam/controller/AccessPodRestController.java
new file mode 100644
index 0000000..b4fbec0
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/controller/AccessPodRestController.java
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.controller;
+
+import lombok.extern.slf4j.Slf4j;
+import org.onap.osam.dto.AccessPodDTO;
+import org.onap.osam.helper.DTOMapper;
+import org.onap.osam.model.dao.AccessPod;
+import org.onap.osam.api.service.AccessPodService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * Created by cemturker on 27.09.2018.
+ */
+@RestController
+@RequestMapping("/accessPod")
+@Slf4j
+public class AccessPodRestController extends AbstractController {
+
+    private AccessPodService accessPodService;
+
+    @Autowired
+    public AccessPodRestController(AccessPodService accessPodService) {
+        super(log);
+        this.accessPodService = accessPodService;
+    }
+
+    @GetMapping
+    public List<AccessPodDTO> getAccessPods(){
+        return DTOMapper.covertAccessPodsToDtos(accessPodService.getAll());
+    }
+
+    @PostMapping
+    public ResponseEntity<AccessPodDTO> postAccessPod(@RequestBody AccessPodDTO accessPodDTO){
+        try {
+            log.info("Post request for {} is received",accessPodDTO);
+            AccessPod accessPod = DTOMapper.covertDtoToAccessPod(accessPodDTO);
+            accessPod = accessPodService.addOrUpdate(accessPod);
+            return new ResponseEntity<>(DTOMapper.covertAccessPodToDto(accessPod),HttpStatus.CREATED);
+        }catch (Exception e){
+            return super.proceedException(e);
+        }
+    }
+
+    @DeleteMapping("pnf/{pnfId}")
+    public ResponseEntity deleteAccessPodByPnfId(@PathVariable("pnfId") String pnfId) {
+        try{
+            this.accessPodService.removeByPnfId(pnfId);
+            return ResponseEntity.ok().build();
+        }catch (Exception e) {
+            return super.proceedException(e);
+        }
+
+    }
+
+    @DeleteMapping("/{id}")
+    public ResponseEntity deleteAccessPod(@PathVariable("id") Long id) {
+        try {
+            this.accessPodService.removeById(id);
+        }catch (Exception e) {
+            return super.proceedException(e);
+        }
+        return ResponseEntity.ok().build();
+    }
+
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/controller/DeviceController.java b/osam-core/web/src/main/java/org/onap/osam/controller/DeviceController.java
new file mode 100644
index 0000000..026ec17
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/controller/DeviceController.java
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.controller;
+
+import lombok.extern.slf4j.Slf4j;
+import org.onap.osam.api.service.DeviceService;
+import org.onap.osam.dto.ChassisDTO;
+import org.onap.osam.dto.OLTChassisDTO;
+import org.onap.osam.dto.ONTDTO;
+import org.onap.osam.helper.DTOMapper;
+import org.onap.osam.model.dao.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by Zafer Kaban on 27.09.2018.
+ */
+@CrossOrigin
+@RestController
+@RequestMapping("/device")
+@Slf4j
+public class DeviceController extends AbstractController {
+
+    private DeviceService deviceService;
+
+    @Autowired
+    public DeviceController(DeviceService deviceService) {
+        super(log);
+        this.deviceService = deviceService;
+    }
+
+    @PostMapping("/chassis")
+    public ResponseEntity<ChassisDTO> postChassis(@RequestBody ChassisDTO chassisDTO){
+        try {
+            log.info("postChassis request is received {}",chassisDTO);
+            Chassis chassis = DTOMapper.convertToChassis(chassisDTO);
+            chassis = deviceService.addChassis(chassis);
+            return new ResponseEntity<>(DTOMapper.convertChassisToDTO(chassis),HttpStatus.CREATED);
+        }catch (Exception e){
+            return super.proceedException(e);
+        }
+
+    }
+
+    @DeleteMapping("chassis/{clli}")
+    public ResponseEntity deleteChassisByClli(@PathVariable("clli") String clli) {
+        try{
+            this.deviceService.deleteChassisByClli(clli);
+            return ResponseEntity.ok().build();
+        }catch (Exception e) {
+            return super.proceedException(e);
+        }
+
+    }
+
+
+    @PostMapping("/chassis/olt")
+    public ResponseEntity<OLTChassisDTO> postOLTChassis(@RequestBody OLTChassisDTO oltChassisDTO){
+        try {
+            Chassis chassis = this.deviceService.getChassisByClli(oltChassisDTO.getClli());
+            OLTSlot oltSlot = DTOMapper.convertToOLT(oltChassisDTO);
+            oltSlot.setChassis(chassis);
+            this.deviceService.addOLTSlot(oltSlot, chassis);
+            return new ResponseEntity<> (DTOMapper.convertFromOLT(oltSlot),HttpStatus.CREATED);
+        }catch (Exception e){
+            return super.proceedException(e);
+        }
+
+    }
+
+    @PostMapping("/chassis/olt/ont")
+    public ResponseEntity<ONTDTO> postONTDevice(@RequestBody ONTDTO ontDTO){
+        try {
+            ONTDevice ont = deviceService.addONTDevice(ontDTO.getClli()
+                    ,ontDTO.getSlotNumber()
+                    ,ontDTO.getPortNumber()
+                    ,ontDTO.getSerialNumber());
+            return new ResponseEntity<> (DTOMapper.convertFromONTDevice(ont),HttpStatus.CREATED);
+        }catch (Exception e){
+            return super.proceedException(e);
+        }
+
+    }
+
+    @GetMapping("/chassis")
+    public ResponseEntity<List<ChassisDTO>> getAllChassis(){
+        try {
+            return new ResponseEntity<> (DTOMapper.convertChassisToDTO(deviceService.getAllChassis()), HttpStatus.OK);
+        }catch (Exception e){
+            return super.proceedException(e);
+        }
+    }
+
+    @GetMapping("/chassis/olt")
+    public ResponseEntity<Map<String, List<OLTChassisDTO>>> getAllOLTDevices(){
+        try {
+            return new ResponseEntity<> (DTOMapper.convertFromOLT(deviceService.getAllOLTSlots()), HttpStatus.OK);
+        }catch (Exception e){
+            return super.proceedException(e);
+        }
+    }
+
+    @GetMapping("/chassis/olt/ont")
+    public ResponseEntity<Map<String, List<ONTDTO>>> getAllONTDevices(){
+        try {
+            return new ResponseEntity<> (DTOMapper.convertFromONTDevice(deviceService.getAllONTDevices()), HttpStatus.OK);
+        }catch (Exception e){
+            return super.proceedException(e);
+        }
+    }
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/controller/ServiceController.java b/osam-core/web/src/main/java/org/onap/osam/controller/ServiceController.java
new file mode 100644
index 0000000..d033a1a
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/controller/ServiceController.java
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.controller;
+
+import lombok.extern.slf4j.Slf4j;
+import org.onap.osam.model.dao.SpeedProfile;
+import org.onap.osam.model.dao.TechnologyProfile;
+import org.onap.osam.api.service.BroadBandService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * Created by cemturker on 19.09.2018.
+ */
+@RestController
+@RequestMapping("/service")
+@Slf4j
+public class ServiceController extends AbstractController {
+
+    private BroadBandService broadBandService;
+
+    //TODOs add validations for post reqs...
+
+    @Autowired
+    public ServiceController(BroadBandService broadBandService){
+        super(log);
+        this.broadBandService = broadBandService;
+    }
+
+    @GetMapping("/speedProfile")
+    public ResponseEntity<List<SpeedProfile>> getSpeedProfiles() {
+        try{
+            return ResponseEntity.ok(this.broadBandService.getSpeedProfiles());
+        }catch (Exception e){
+            return super.proceedException(e);
+        }
+    }
+
+    @GetMapping("/speedProfile/{id}")
+    public ResponseEntity<SpeedProfile> getSpeedProfile(@PathVariable("id") Long id) {
+        try {
+            return ResponseEntity.ok(this.broadBandService.getSpeedProfile(id));
+        }catch (Exception e) {
+            return super.proceedException(e);
+        }
+    }
+
+    @DeleteMapping("/speedProfile/{id}")
+    public ResponseEntity deleteSpeedProfile(@PathVariable("id") Long id) {
+        try {
+            this.broadBandService.removeSpeedProfile(id);
+            return ResponseEntity.ok().build();
+        }catch (Exception e) {
+            return super.proceedException(e);
+        }
+    }
+
+    @PostMapping("/speedProfile")
+    public ResponseEntity<SpeedProfile> createSpeedProfile(@RequestBody SpeedProfile speedProfile) {
+        try {
+            return new ResponseEntity<>(this.broadBandService.addSpeedProfile(speedProfile),
+                    HttpStatus.CREATED);
+        }catch (Exception e) {
+            return super.proceedException(e);
+        }
+
+    }
+
+    @GetMapping("/technologyProfile")
+    public ResponseEntity<List<TechnologyProfile>> getTechnologyProfiles() {
+        try {
+            return ResponseEntity.ok(this.broadBandService.getTechnologyProfiles());
+        }catch (Exception e) {
+            return super.proceedException(e);
+        }
+    }
+
+    @GetMapping("/technologyProfile/{id}")
+    public ResponseEntity<TechnologyProfile> getTechnologyProfile(@PathVariable("id") Long id) {
+        try {
+            return ResponseEntity.ok(this.broadBandService.getTechnologyProfile(id));
+        }catch (Exception e) {
+            return super.proceedException(e);
+        }
+    }
+
+    @DeleteMapping("/technologyProfile/{id}")
+    public ResponseEntity deleteTechnologyProfile(@PathVariable("id") Long id) {
+        try {
+            this.broadBandService.removeSpeedProfile(id);
+            return ResponseEntity.ok().build();
+        }catch (Exception e){
+            return super.proceedException(e);
+        }
+    }
+
+    @PostMapping("/technologyProfile")
+    public ResponseEntity<TechnologyProfile> createTechnologyProfile(@RequestBody TechnologyProfile technologyProfile) {
+        try {
+            return new ResponseEntity<>(this.broadBandService.addTechnologyProfile(technologyProfile),HttpStatus.CREATED);
+        }catch (Exception e){
+            return super.proceedException(e);
+        }
+    }
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/controller/TopologyController.java b/osam-core/web/src/main/java/org/onap/osam/controller/TopologyController.java
new file mode 100644
index 0000000..6f760ee
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/controller/TopologyController.java
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.controller;
+
+import lombok.extern.slf4j.Slf4j;
+import org.onap.osam.api.service.AccessPodService;
+import org.onap.osam.api.service.DeviceService;
+import org.onap.osam.dto.AccessPodDTO;
+import org.onap.osam.helper.DTOMapper;
+import org.onap.osam.model.dao.AccessPod;
+import org.onap.osam.model.dao.Chassis;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * Created by cemturker on 03.10.2018.
+ */
+@RestController
+@RequestMapping("topology")
+@Slf4j
+public class TopologyController extends AbstractController {
+    private AccessPodService accessPodService;
+    private DeviceService deviceService;
+
+    @Autowired
+    public TopologyController(AccessPodService accessPodService,
+                              DeviceService deviceService) {
+        super(log);
+        this.accessPodService = accessPodService;
+        this.deviceService = deviceService;
+    }
+
+    @GetMapping("/accessPod/{pnfId}")
+    public ResponseEntity<AccessPodDTO> getTopologyWithPnfId(@PathVariable("pnfId") String pnfId) {
+        try{
+            log.info("GetTopology with pnfId:{} is received.",pnfId);
+            AccessPod accessPod = accessPodService.findByPnfId(pnfId);
+            List<Chassis> chassisList = deviceService.getByPnfId(pnfId);
+            return ResponseEntity.ok(DTOMapper.representTheAccessPod(chassisList,accessPod));
+        }catch (Exception e) {
+            return super.proceedException(e);
+        }
+    }
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/controller/config/SwaggerConfig.java b/osam-core/web/src/main/java/org/onap/osam/controller/config/SwaggerConfig.java
new file mode 100644
index 0000000..20a538c
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/controller/config/SwaggerConfig.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.controller.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * Created by cemturker on 04.10.2018.
+ */
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig extends WebMvcConfigurationSupport {
+    @Bean
+    public Docket osamApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .select()                 .apis(RequestHandlerSelectors.any())
+                .paths(PathSelectors.any())
+                .build();
+    }
+
+    @Override
+    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("swagger-ui.html")
+                .addResourceLocations("classpath:/META-INF/resources/");
+
+        registry.addResourceHandler("/webjars/**")
+                .addResourceLocations("classpath:/META-INF/resources/webjars/");
+    }
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/dto/AccessPodDTO.java b/osam-core/web/src/main/java/org/onap/osam/dto/AccessPodDTO.java
new file mode 100644
index 0000000..52570c7
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/dto/AccessPodDTO.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.dto;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * Created by cemturker on 01.10.2018.
+ */
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+@JsonRootName("AccessPod")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class AccessPodDTO {
+    private Long id;
+    private String pnfId;
+    private String ip;
+    private String port;
+    private String coreIp;
+    private String corePort;
+    private String username;
+    private String password;
+    private List<ChassisDTO> chassises;
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("AccessPodDTO{");
+        sb.append("id=").append(id);
+        sb.append(", pnfId='").append(pnfId).append('\'');
+        sb.append(", ip='").append(ip).append('\'');
+        sb.append(", port='").append(port).append('\'');
+        sb.append(", coreIp='").append(coreIp).append('\'');
+        sb.append(", corePort='").append(corePort).append('\'');
+        sb.append(", username='").append(username).append('\'');
+        sb.append(", password='").append(password).append('\'');
+        sb.append(", chassises=").append(chassises);
+        sb.append('}');
+        return sb.toString();
+    }
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/dto/ChassisDTO.java b/osam-core/web/src/main/java/org/onap/osam/dto/ChassisDTO.java
new file mode 100644
index 0000000..96462cf
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/dto/ChassisDTO.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.dto;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@JsonRootName("Chassis")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class ChassisDTO {
+    private Long id;
+    private String clli;
+    private String pnfId;
+    private int shelf;
+    private int rack;
+    private List<OLTChassisDTO> olts;
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/dto/OLTChassisDTO.java b/osam-core/web/src/main/java/org/onap/osam/dto/OLTChassisDTO.java
new file mode 100644
index 0000000..1937e35
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/dto/OLTChassisDTO.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.dto;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@JsonRootName("OLT")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class OLTChassisDTO {
+    private String clli;
+    private String oltDriver;
+    private String oltType;
+    private int portNumber;
+    private String ipAddress;
+    private String name;
+    private List<OLTPortDTO> oltPorts;
+    private Long id;
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/dto/OLTPortDTO.java b/osam-core/web/src/main/java/org/onap/osam/dto/OLTPortDTO.java
new file mode 100644
index 0000000..1a376fa
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/dto/OLTPortDTO.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.dto;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.onap.osam.model.dao.ActivityState;
+import org.onap.osam.model.dao.AdminState;
+
+import java.util.List;
+
+/**
+ * Created by cemturker on 03.10.2018.
+ */
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+@JsonRootName("OLTPort")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class OLTPortDTO {
+    private Long id;
+    private Integer portNumber;
+    private ActivityState portAuthState;
+    private AdminState adminState;
+    private List<ONTDTO> ontDevices;
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("OLTPortDTO{");
+        sb.append("id=").append(id);
+        sb.append(", portNumber=").append(portNumber);
+        sb.append(", portAuthState=").append(portAuthState);
+        sb.append(", adminState=").append(adminState);
+        sb.append(", ontDevices=").append(ontDevices);
+        sb.append('}');
+        return sb.toString();
+    }
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/dto/ONTDTO.java b/osam-core/web/src/main/java/org/onap/osam/dto/ONTDTO.java
new file mode 100644
index 0000000..d21d9e3
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/dto/ONTDTO.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.dto;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@JsonRootName("ONTDevice")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class ONTDTO {
+
+    private String clli;
+    private String serialNumber;
+    private int slotNumber;
+    private int portNumber;
+    private Long id;
+}
diff --git a/osam-core/web/src/main/java/org/onap/osam/helper/DTOMapper.java b/osam-core/web/src/main/java/org/onap/osam/helper/DTOMapper.java
new file mode 100644
index 0000000..3a8784f
--- /dev/null
+++ b/osam-core/web/src/main/java/org/onap/osam/helper/DTOMapper.java
@@ -0,0 +1,222 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM Core
+ * ================================================================================
+ * Copyright (C) 2018 Netsia
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+package org.onap.osam.helper;
+
+import com.google.common.collect.Lists;
+import org.onap.osam.dto.AccessPodDTO;
+import org.onap.osam.dto.ChassisDTO;
+import org.onap.osam.dto.OLTChassisDTO;
+import org.onap.osam.dto.OLTPortDTO;
+import org.onap.osam.dto.ONTDTO;
+import org.onap.osam.model.dao.AccessPod;
+import org.onap.osam.model.dao.ActivityState;
+import org.onap.osam.model.dao.Chassis;
+import org.onap.osam.model.dao.OLTPort;
+import org.onap.osam.model.dao.OLTSlot;
+import org.onap.osam.model.dao.ONTDevice;
+import org.onap.osam.model.dao.OltDriver;
+import org.onap.osam.model.dao.OltType;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+
+public final class DTOMapper {
+
+    private DTOMapper () {
+
+    }
+
+    public static Chassis convertToChassis (ChassisDTO chassisDTO) {
+        Chassis chassis = new Chassis();
+        chassis.setClli(chassisDTO.getClli());
+        chassis.setShelf(chassisDTO.getShelf());
+        chassis.setRack(chassisDTO.getRack());
+        chassis.setState(ActivityState.ACTIVE);
+        AccessPod accessPod = new AccessPod();
+        accessPod.setPnfId(chassisDTO.getPnfId());
+        chassis.setAccessPod(accessPod);
+        return chassis;
+    }
+
+
+
+
+    public static OLTSlot convertToOLT (OLTChassisDTO oltChassisDTO) {
+        OLTSlot oltSlot = new OLTSlot();
+        oltSlot.setIpAddress(oltChassisDTO.getIpAddress());
+        oltSlot.setPort(oltChassisDTO.getPortNumber());
+        oltSlot.setName(oltChassisDTO.getName());
+        oltSlot.setOltDriver(OltDriver.valueOf(oltChassisDTO.getOltDriver()));
+        oltSlot.setOltType(OltType.valueOf(oltChassisDTO.getOltType()));
+        return oltSlot;
+    }
+
+    public static ChassisDTO convertChassisToDTO(Chassis chassis) {
+        ChassisDTO chassisDTO = new ChassisDTO();
+        chassisDTO.setId(chassis.getId());
+        chassisDTO.setClli(chassis.getClli());
+        chassisDTO.setRack(chassis.getRack());
+        chassisDTO.setShelf(chassis.getShelf());
+        chassisDTO.setPnfId(chassis.getAccessPod().getPnfId());
+        return chassisDTO;
+    }
+
+    public static List<ChassisDTO> convertChassisToDTO(List<Chassis> chassises) {
+        return chassises.stream().map(x -> convertChassisToDTO(x)).collect(Collectors.toList());
+    }
+
+    public static Map<String, List<OLTChassisDTO>> convertFromOLT(List<OLTSlot> oltSlots){
+        return oltSlots.stream().map(x -> convertFromOLT(x)).collect(Collectors.toList()).stream().collect(Collectors.groupingBy(OLTChassisDTO::getClli));
+    }
+
+    public static OLTChassisDTO convertFromOLT (OLTSlot oltSlot) {
+        OLTChassisDTO oltChassisDTO = new OLTChassisDTO();
+        oltChassisDTO.setClli(oltSlot.getChassis().getClli());
+        oltChassisDTO.setIpAddress(oltSlot.getIpAddress());
+        oltChassisDTO.setName(oltSlot.getName());
+        oltChassisDTO.setOltDriver(oltSlot.getOltDriver().name());
+        oltChassisDTO.setOltType(oltSlot.getOltType().name());
+        oltChassisDTO.setPortNumber(oltSlot.getPort());
+        oltChassisDTO.setId(oltSlot.getId());
+        return oltChassisDTO;
+    }
+
+    public static ONTDTO convertFromONTDevice (ONTDevice ontDevice) {
+        ONTDTO ontdto = new ONTDTO();
+        ontdto.setSerialNumber(ontDevice.getSerialNumber());
+        ontdto.setPortNumber(ontDevice.getOLTPort().getPortNumber());
+        ontdto.setId(ontDevice.getId());
+        ontdto.setSlotNumber(ontDevice.getOLTPort().getOltSlot().getNumber());
+        ontdto.setClli(ontDevice.getOLTPort().getOltSlot().getChassis().getClli());
+        return ontdto;
+    }
+
+    public static Map<String, List<ONTDTO>> convertFromONTDevice(List<ONTDevice> ontDevices){
+        return ontDevices.stream().map(x -> convertFromONTDevice(x)).collect(Collectors.toList()).stream().collect(Collectors.groupingBy(ONTDTO::getClli));
+    }
+
+    public static AccessPod covertDtoToAccessPod(AccessPodDTO dto) {
+        //TODO validate..
+        AccessPod accessPod = new AccessPod();
+        accessPod.setPnfId(dto.getPnfId());
+        accessPod.setId(dto.getId());
+        accessPod.setCoreIp(dto.getCoreIp());
+        accessPod.setCorePort(dto.getCorePort());
+        accessPod.setUsername(dto.getUsername());
+        accessPod.setPassword(dto.getPassword());
+        accessPod.setIp(dto.getIp());
+        accessPod.setPort(dto.getPort());
+        return accessPod;
+    }
+
+    public static AccessPodDTO covertAccessPodToDto(AccessPod accessPod) {
+        //TODO validate..
+        AccessPodDTO dto = new AccessPodDTO();
+        dto.setPnfId(accessPod.getPnfId());
+        dto.setCoreIp(accessPod.getCoreIp());
+        dto.setCorePort(accessPod.getCorePort());
+        dto.setUsername(accessPod.getUsername());
+        dto.setPassword(accessPod.getPassword());
+        dto.setIp(accessPod.getIp());
+        dto.setId(accessPod.getId());
+        dto.setPort(accessPod.getPort());
+        return dto;
+    }
+
+    private static OLTPortDTO convertOLTPortToDTO(OLTPort oltPort) {
+        OLTPortDTO oltPortDTO = new OLTPortDTO();
+        oltPortDTO.setId(oltPort.getId());
+        oltPortDTO.setAdminState(oltPort.getAdminState());
+        oltPortDTO.setPortAuthState(oltPort.getPortAuthState());
+        oltPortDTO.setPortNumber(oltPort.getPortNumber());
+        return oltPortDTO;
+    }
+
+    public static List<AccessPodDTO> covertAccessPodsToDtos(List<AccessPod> accessPodList) {
+        //TODO validate..
+        List<AccessPodDTO> dtos = new ArrayList<>();
+        for (AccessPod accessPod : accessPodList) {
+            dtos.add(covertAccessPodToDto(accessPod));
+        }
+        return dtos;
+    }
+
+    public static AccessPodDTO representTheAccessPod(List<Chassis> chassisList, AccessPod accessPod) {
+        if (accessPod == null) {
+            return null;
+        }
+        AccessPodDTO accessPodDTO = covertAccessPodToDto(accessPod);
+        if (chassisList == null || chassisList.isEmpty()) {
+            return accessPodDTO;
+        }
+        List<ChassisDTO> chassisDTOS = new ArrayList<>();
+        accessPodDTO.setChassises(chassisDTOS);
+        for (Chassis chassis : chassisList) {
+            chassisDTOS.add(representTheChassis(chassis));
+        }
+        return accessPodDTO;
+    }
+
+    public static ChassisDTO representTheChassis(Chassis chassis) {
+        ChassisDTO chassisDTO = convertChassisToDTO(chassis);
+        if (chassis.getOltSlots() == null || chassis.getOltSlots().isEmpty()) {
+            return chassisDTO;
+        }
+        List<OLTChassisDTO> oltChassisDTOS = Lists.newArrayList();
+        chassisDTO.setOlts(oltChassisDTOS);
+        for (OLTSlot oltSlot : chassis.getOltSlots()) {
+            oltChassisDTOS.add(representTheOLTSlot(oltSlot));
+        }
+        return chassisDTO;
+    }
+
+    public static OLTChassisDTO representTheOLTSlot(OLTSlot oltSlot) {
+        OLTChassisDTO oltChassisDTO = convertFromOLT(oltSlot);
+        if (oltSlot.getOltPorts() == null || oltSlot.getOltPorts().isEmpty()) {
+            return oltChassisDTO;
+        }
+        List<OLTPortDTO> oltPortDTOS = Lists.newArrayList();
+        oltChassisDTO.setOltPorts(oltPortDTOS);
+        for (OLTPort oltPort : oltSlot.getOltPorts()) {
+            oltPortDTOS.add(representTheOLTPort(oltPort));
+        }
+        return oltChassisDTO;
+    }
+
+    public static OLTPortDTO representTheOLTPort(OLTPort oltPort) {
+        OLTPortDTO portDTO = convertOLTPortToDTO(oltPort);
+        if (oltPort.getOntDevices() == null || oltPort.getOntDevices().isEmpty()) {
+            return portDTO;
+        }
+        List<ONTDTO> ontdtos = Lists.newArrayList();
+        portDTO.setOntDevices(ontdtos);
+        for (ONTDevice ontDevice : oltPort.getOntDevices()) {
+            ontdtos.add(convertFromONTDevice(ontDevice));
+        }
+        return portDTO;
+    }
+}
