summaryrefslogtreecommitdiffstats
path: root/resmgr/src/main/webapp/sdn-resmgr/ne/neRest.js
diff options
context:
space:
mode:
Diffstat (limited to 'resmgr/src/main/webapp/sdn-resmgr/ne/neRest.js')
-rw-r--r--resmgr/src/main/webapp/sdn-resmgr/ne/neRest.js94
1 files changed, 94 insertions, 0 deletions
diff --git a/resmgr/src/main/webapp/sdn-resmgr/ne/neRest.js b/resmgr/src/main/webapp/sdn-resmgr/ne/neRest.js
new file mode 100644
index 00000000..ba9e8b02
--- /dev/null
+++ b/resmgr/src/main/webapp/sdn-resmgr/ne/neRest.js
@@ -0,0 +1,94 @@
+/* Copyright 2017, Huawei Technologies Co., Ltd.
+ *
+ * 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.
+ */
+
+app.factory("neDataService", function($http, DataService, $log){
+ var uri = 'http://192.168.9.13:18008';
+ uri += "/openoapi/sdnobrs/v1/managed-elements";
+ return {
+ getAllNEData : function() {
+ /*return $http({
+ url: 'http://localhost:3000/meAPI/getAllNEData',
+ method: 'GET',
+ data:null,
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ $log.info("in data service data is :"+response);
+ console.log(response.data);
+ return response.data;
+ });*/
+ return DataService.get(uri)
+ .then(function(response){
+ $log.info("in get data service data is :"+response);
+ console.log(response);
+ return response;
+ });
+ },
+ deleteNEData : function(id) {
+ /*return $http({
+ url: 'http://localhost:3000/meAPI/deleteNEData',
+ method: 'POST',
+ data: {'nameList':nameList},
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ console.log("Successfully Deleted..");
+ $log.info(response);
+ return response.data;
+ });*/
+ return DataService.delete(uri+"/"+id)
+ .then(function(response){
+ $log.info("in delete data service data is :"+response);
+ console.log(response);
+ return response;
+ });
+ },
+ editNEData : function(neData) {
+ /*return $http({
+ url: 'http://localhost:3000/siteAPI/editSiteData',
+ method: 'POST',
+ data: {'siteData':siteData},
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ console.log("Successfully edited.. Data returned in DataService is");
+ console.log(response.data);
+ return response.data;
+ });*/
+
+ return DataService.put(uri, neData)
+ .then(function(response){
+ console.log("Successfully edited.. Data returned in DataService is");
+ console.log(response);
+ return response;
+ });
+ },
+ addNEData : function(neData) {
+ /*return $http({
+ url: 'http://localhost:3000/siteAPI/addSiteData',
+ method: 'POST',
+ data: {'siteData':siteData},
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ console.log("Successfully edited.. Data returned in DataService is");
+ console.log(response.data);
+ return response.data;
+ });*/
+ return DataService.post(uri, neData)
+ .then(function(response){
+ console.log("Successfully added.. Data returned in DataService is");
+ console.log(response);
+ return response;
+ });
+ }
+ }
+}); \ No newline at end of file
lor: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ ============LICENSE_START=======================================================
  ~ ONAP : ccsdk features
  ~ ================================================================================
  ~ Copyright (C) 2018 highstreet technologies GmbH Intellectual Property.
  ~ All rights reserved.
  ~ ================================================================================
  ~ Update Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
  ~ ================================================================================
  ~ 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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.onap.ccsdk.parent</groupId>
        <artifactId>single-feature-parent</artifactId>
        <version>2.2.0</version>
        <relativePath/>
    </parent>

    <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
    <artifactId>sdnr-wt-devicemanager-onap-onf14-feature</artifactId>
    <version>1.2.2-SNAPSHOT</version>
    <packaging>feature</packaging>

    <name>ccsdk-features :: ${project.artifactId}</name>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sdnr-wt-devicemanager-onap-onf14-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>
</project>