summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/README.md1
-rw-r--r--res/assembly.xml2
-rwxr-xr-xres/assembly/bin/initDB.sh3
-rw-r--r--res/assembly/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql3
-rw-r--r--res/assembly/dbscripts/mysql/onap-gvnfm-vnfres-createobj.sql2
-rw-r--r--res/docker/LICENSE2
-rwxr-xr-xres/docker/instance_run.sh2
-rwxr-xr-xres/initialize.sh2
-rw-r--r--res/manage.py1
-rw-r--r--res/pom.xml2
-rw-r--r--res/res/pub/config/config.py2
-rw-r--r--res/res/pub/database/models.py7
-rw-r--r--res/res/resources/tests.py4
-rw-r--r--res/res/resources/urls.py1
-rw-r--r--res/res/resources/views.py5
-rw-r--r--res/res/settings.py1
-rw-r--r--res/res/urls.py1
-rwxr-xr-xres/run.sh2
-rwxr-xr-xres/stop.sh2
19 files changed, 31 insertions, 14 deletions
diff --git a/res/README.md b/res/README.md
index 28f16fe..ec4a35a 100644
--- a/res/README.md
+++ b/res/README.md
@@ -12,4 +12,5 @@ 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.
+
Micro service of vnf resource management.
diff --git a/res/assembly.xml b/res/assembly.xml
index b85e1d5..1e87a78 100644
--- a/res/assembly.xml
+++ b/res/assembly.xml
@@ -13,6 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
+
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
diff --git a/res/assembly/bin/initDB.sh b/res/assembly/bin/initDB.sh
index 1ed4863..5ad52f5 100755
--- a/res/assembly/bin/initDB.sh
+++ b/res/assembly/bin/initDB.sh
@@ -13,7 +13,7 @@
# 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.
-#
+
DIRNAME=`dirname $0`
HOME=`cd $DIRNAME/; pwd`
@@ -47,4 +47,3 @@ do
done
echo "init resource management database success!"
exit 0
-
diff --git a/res/assembly/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql b/res/assembly/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql
index 32d2450..941ad16 100644
--- a/res/assembly/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql
+++ b/res/assembly/dbscripts/mysql/onap-gvnfm-vnfres-createdb.sql
@@ -12,7 +12,6 @@
-- 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.
---
/******************drop old database and user***************************/
@@ -29,4 +28,4 @@ GRANT ALL PRIVILEGES ON mysql.* TO 'gvnfm'@'%' IDENTIFIED BY 'gvnfm' WITH GRANT
GRANT ALL PRIVILEGES ON gvnfm.* TO 'gvnfm'@'localhost' IDENTIFIED BY 'gvnfm' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON mysql.* TO 'gvnfm'@'localhost' IDENTIFIED BY 'gvnfm' WITH GRANT OPTION;
-FLUSH PRIVILEGES; \ No newline at end of file
+FLUSH PRIVILEGES;
diff --git a/res/assembly/dbscripts/mysql/onap-gvnfm-vnfres-createobj.sql b/res/assembly/dbscripts/mysql/onap-gvnfm-vnfres-createobj.sql
index 86a2010..1facf38 100644
--- a/res/assembly/dbscripts/mysql/onap-gvnfm-vnfres-createobj.sql
+++ b/res/assembly/dbscripts/mysql/onap-gvnfm-vnfres-createobj.sql
@@ -12,7 +12,7 @@
-- 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.
---
+
use gvnfm;
diff --git a/res/docker/LICENSE b/res/docker/LICENSE
index 5c767c3..dd08487 100644
--- a/res/docker/LICENSE
+++ b/res/docker/LICENSE
@@ -470,4 +470,4 @@ understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
-Creative Commons may be contacted at creativecommons.org. \ No newline at end of file
+Creative Commons may be contacted at creativecommons.org.
diff --git a/res/docker/instance_run.sh b/res/docker/instance_run.sh
index 196edfd..8aac538 100755
--- a/res/docker/instance_run.sh
+++ b/res/docker/instance_run.sh
@@ -7,4 +7,4 @@ chmod +x run.sh
while [ ! -f logs/runtime_res.log ]; do
sleep 1
done
-tail -F logs/runtime_res.log \ No newline at end of file
+tail -F logs/runtime_res.log
diff --git a/res/initialize.sh b/res/initialize.sh
index 7ace382..1bde84f 100755
--- a/res/initialize.sh
+++ b/res/initialize.sh
@@ -12,4 +12,6 @@
# 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.
+
+
pip install -r requirements.txt
diff --git a/res/manage.py b/res/manage.py
index 790d22b..a9dc4bf 100644
--- a/res/manage.py
+++ b/res/manage.py
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+
import os
import sys
diff --git a/res/pom.xml b/res/pom.xml
index 5ce8ae5..03b99d4 100644
--- a/res/pom.xml
+++ b/res/pom.xml
@@ -14,6 +14,8 @@
See the License for the specific language governing permissions and
limitations under the License.11
-->
+
+
<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>
<groupId>org.onap.vfc.gvnfm.vnfres</groupId>
diff --git a/res/res/pub/config/config.py b/res/res/pub/config/config.py
index 86701be..6c06553 100644
--- a/res/res/pub/config/config.py
+++ b/res/res/pub/config/config.py
@@ -11,6 +11,8 @@
# 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.
+
+
import os
# [MSB]
diff --git a/res/res/pub/database/models.py b/res/res/pub/database/models.py
index c701e20..af794b7 100644
--- a/res/res/pub/database/models.py
+++ b/res/res/pub/database/models.py
@@ -11,6 +11,8 @@
# 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.
+
+
from django.db import models
@@ -311,8 +313,3 @@ class FlavourInstModel(models.Model):
def __unicode__(self):
return '%s' % self.name
-
-
-
-
-
diff --git a/res/res/resources/tests.py b/res/res/resources/tests.py
index 4bddc71..7211b81 100644
--- a/res/res/resources/tests.py
+++ b/res/res/resources/tests.py
@@ -11,6 +11,8 @@
# 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.
+
+
from django.test import TestCase, Client
from rest_framework import status
@@ -212,4 +214,4 @@ class ResourceTest(TestCase):
def test_swagger_ok(self):
resp = self.client.get("/api/vnfres/v1/swagger.json", format='json')
- self.assertEqual(resp.status_code, status.HTTP_200_OK, resp.content) \ No newline at end of file
+ self.assertEqual(resp.status_code, status.HTTP_200_OK, resp.content)
diff --git a/res/res/resources/urls.py b/res/res/resources/urls.py
index b855a60..5920115 100644
--- a/res/res/resources/urls.py
+++ b/res/res/resources/urls.py
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+
from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
diff --git a/res/res/resources/views.py b/res/res/resources/views.py
index 38de8e1..8171c5c 100644
--- a/res/res/resources/views.py
+++ b/res/res/resources/views.py
@@ -11,6 +11,8 @@
# 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.
+
+
import json
import logging
import os
@@ -340,6 +342,7 @@ def fill_cps_data(cp):
}
return cps_data
+
@api_view(http_method_names=['GET'])
def get_volumes(request, *args, **kwargs):
logger.debug("Query all the volumes by vnfInstanceId[%s]", fun_name())
@@ -376,4 +379,4 @@ class SwaggerJsonView(APIView):
f = open(json_file)
json_data = json.JSONDecoder().decode(f.read())
f.close()
- return Response(json_data) \ No newline at end of file
+ return Response(json_data)
diff --git a/res/res/settings.py b/res/res/settings.py
index 6b19ab5..e7de314 100644
--- a/res/res/settings.py
+++ b/res/res/settings.py
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+
import os
import sys
diff --git a/res/res/urls.py b/res/res/urls.py
index 9db7895..29cdac7 100644
--- a/res/res/urls.py
+++ b/res/res/urls.py
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+
from django.conf.urls import include, url
from res.pub.config.config import REG_TO_MSB_WHEN_START, REG_TO_MSB_REG_URL, REG_TO_MSB_REG_PARAM
diff --git a/res/run.sh b/res/run.sh
index d2ebe3c..14c51d3 100755
--- a/res/run.sh
+++ b/res/run.sh
@@ -12,4 +12,6 @@
# 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.
+
+
nohup python manage.py runserver 127.0.0.1:8802 > /dev/null &
diff --git a/res/stop.sh b/res/stop.sh
index af83565..2b65ea8 100755
--- a/res/stop.sh
+++ b/res/stop.sh
@@ -12,4 +12,6 @@
# 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.
+
+
ps auxww | grep 'manage.py runserver 127.0.0.1:8802' | awk '{print $2}' | xargs kill -9