summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Shatov <alexs@att.com>2017-09-20 17:27:25 -0400
committerAlex Shatov <alexs@att.com>2017-09-20 17:27:25 -0400
commit8b28e65a1d692b524717749523d9cf8270c12d94 (patch)
treed0e8acfa42130e3e08921f25b8fdf31626f75202
parentc3a485a0a2805519a217575fd8c984b0312e9b43 (diff)
renamed package to onap_dcae_dcaepolicy_lib
Change-Id: I692c45488fc84270ab02eca5730a3dd9b6f100ca Issue-Id: DCAEGEN2-62 Signed-off-by: Alex Shatov <alexs@att.com>
-rw-r--r--onap-dcae-dcaepolicy-lib/LICENSE.txt (renamed from python-dcae-policy/LICENSE.txt)0
-rw-r--r--onap-dcae-dcaepolicy-lib/MANIFEST.in (renamed from python-dcae-policy/MANIFEST.in)0
-rw-r--r--onap-dcae-dcaepolicy-lib/README.md (renamed from python-dcae-policy/README.md)12
-rw-r--r--onap-dcae-dcaepolicy-lib/onap_dcae_dcaepolicy_lib/__init__.py (renamed from python-dcae-policy/dcaepolicy/__init__.py)0
-rw-r--r--onap-dcae-dcaepolicy-lib/onap_dcae_dcaepolicy_lib/dcae_policy.py (renamed from python-dcae-policy/dcaepolicy/dcae_policy.py)0
-rw-r--r--onap-dcae-dcaepolicy-lib/pom.xml (renamed from python-dcae-policy/pom.xml)8
-rw-r--r--onap-dcae-dcaepolicy-lib/requirements.txt (renamed from python-dcae-policy/requirements.txt)0
-rw-r--r--onap-dcae-dcaepolicy-lib/setup.py (renamed from python-dcae-policy/setup.py)4
-rw-r--r--onap-dcae-dcaepolicy-lib/tox.ini (renamed from python-dcae-policy/tox.ini)0
-rw-r--r--pom.xml2
-rw-r--r--python-dcae-policy/dev_run.sh47
-rw-r--r--python-dcae-policy/nexus_pypi.md26
12 files changed, 13 insertions, 86 deletions
diff --git a/python-dcae-policy/LICENSE.txt b/onap-dcae-dcaepolicy-lib/LICENSE.txt
index 45ec201..45ec201 100644
--- a/python-dcae-policy/LICENSE.txt
+++ b/onap-dcae-dcaepolicy-lib/LICENSE.txt
diff --git a/python-dcae-policy/MANIFEST.in b/onap-dcae-dcaepolicy-lib/MANIFEST.in
index f9bd145..f9bd145 100644
--- a/python-dcae-policy/MANIFEST.in
+++ b/onap-dcae-dcaepolicy-lib/MANIFEST.in
diff --git a/python-dcae-policy/README.md b/onap-dcae-dcaepolicy-lib/README.md
index 78047a5..71fdc6a 100644
--- a/python-dcae-policy/README.md
+++ b/onap-dcae-dcaepolicy-lib/README.md
@@ -1,4 +1,4 @@
-# dcaepolicy - policy in dcae controller
+# onap_dcae_dcaepolicy_lib - policy in dcae controller
- python-package to be used in cloudify plugins to maintain the policies lifecycle
## [setup pypi connection](./nexus_pypi.md) to **nexus** repo server
@@ -21,14 +21,14 @@
**requirements.txt**
```python
--extra-index-url https://YOUR_NEXUS_PYPI_SERVER/simple
-dcaepolicy
+onap-dcae-dcaepolicy-lib
```
**tasks.py**
- import
```python
-from dcaepolicy import Policies
+from onap_dcae_dcaepolicy_lib import Policies
```
# examples of **@operation** with **@Policies.<>** decorator
@@ -61,11 +61,11 @@ Then the dcaepolicyplugin will bring the latest policy to the dcae.nodes.policy
```yaml
cloudify.interfaces.lifecycle:
configure:
- implementation: dcae_policy_plugin.dcaepolicy.node_configure
+ implementation: dcae_policy_plugin.onap_dcae_dcaepolicy_lib.node_configure
```
```python
-from dcaepolicy import Policies, POLICIES
+from onap_dcae_dcaepolicy_lib import Policies, POLICIES
from .discovery import DiscoveryClient
from .demo_app import DemoApp
@@ -119,7 +119,7 @@ def node_configure(**kwargs):
```yaml
dcae.interfaces.policy:
policy_update:
- implementation: dcae_policy_plugin.dcaepolicy.policy_update
+ implementation: dcae_policy_plugin.onap_dcae_dcaepolicy_lib.policy_update
```
execute-operation **policy-update** that gets a list of changed policy-configs
diff --git a/python-dcae-policy/dcaepolicy/__init__.py b/onap-dcae-dcaepolicy-lib/onap_dcae_dcaepolicy_lib/__init__.py
index b3658b1..b3658b1 100644
--- a/python-dcae-policy/dcaepolicy/__init__.py
+++ b/onap-dcae-dcaepolicy-lib/onap_dcae_dcaepolicy_lib/__init__.py
diff --git a/python-dcae-policy/dcaepolicy/dcae_policy.py b/onap-dcae-dcaepolicy-lib/onap_dcae_dcaepolicy_lib/dcae_policy.py
index d64d50f..d64d50f 100644
--- a/python-dcae-policy/dcaepolicy/dcae_policy.py
+++ b/onap-dcae-dcaepolicy-lib/onap_dcae_dcaepolicy_lib/dcae_policy.py
diff --git a/python-dcae-policy/pom.xml b/onap-dcae-dcaepolicy-lib/pom.xml
index 4cf3c48..642ed5d 100644
--- a/python-dcae-policy/pom.xml
+++ b/onap-dcae-dcaepolicy-lib/pom.xml
@@ -26,8 +26,8 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.utils</groupId>
- <artifactId>python-dcae-policy</artifactId>
- <name>dcaegen2-utils-python-dcae-policy</name>
+ <artifactId>onap-dcae-dcaepolicy-lib</artifactId>
+ <name>dcaegen2-utils-onap-dcae-dcaepolicy-lib</name>
<version>1.0.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
@@ -71,7 +71,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
</configuration>
</plugin>
<!-- first disable the default Java plugins at various stages -->
- <!-- maven-resources-plugin is called during "*resource" phases by default behavior. it prepares
+ <!-- maven-resources-plugin is called during "*resource" phases by default behavior. it prepares
the resources dir. we do not need it -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -102,7 +102,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
</execution>
</executions>
</plugin>
- <!-- maven-install-plugin is called during "install" phase by default behavior. it tries to copy stuff under
+ <!-- maven-install-plugin is called during "install" phase by default behavior. it tries to copy stuff under
target dir to ~/.m2. we do not need it -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/python-dcae-policy/requirements.txt b/onap-dcae-dcaepolicy-lib/requirements.txt
index 2f98303..2f98303 100644
--- a/python-dcae-policy/requirements.txt
+++ b/onap-dcae-dcaepolicy-lib/requirements.txt
diff --git a/python-dcae-policy/setup.py b/onap-dcae-dcaepolicy-lib/setup.py
index 5f0c765..b149729 100644
--- a/python-dcae-policy/setup.py
+++ b/onap-dcae-dcaepolicy-lib/setup.py
@@ -22,12 +22,12 @@
from setuptools import setup
setup(
- name='dcaepolicy',
+ name='onap_dcae_dcaepolicy_lib',
description='lib of policy decorators to be used by cloudify plugins of dcae controller',
version="1.0.0",
author='Alex Shatov',
email="dcae@lists.openecomp.org",
- packages=['dcaepolicy'],
+ packages=['onap_dcae_dcaepolicy_lib'],
install_requires=[
],
keywords='policy dcae controller cloudify plugin',
diff --git a/python-dcae-policy/tox.ini b/onap-dcae-dcaepolicy-lib/tox.ini
index 987b009..987b009 100644
--- a/python-dcae-policy/tox.ini
+++ b/onap-dcae-dcaepolicy-lib/tox.ini
diff --git a/pom.xml b/pom.xml
index 304e891..432016f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<packaging>pom</packaging>
<modules>
<module>onap-dcae-cbs-docker-client</module>
- <module>python-dcae-policy</module>
+ <module>onap-dcae-dcaepolicy-lib</module>
<module>python-discovery-client</module>
<module>python-dockering</module>
<module>check-blueprint-vs-input</module>
diff --git a/python-dcae-policy/dev_run.sh b/python-dcae-policy/dev_run.sh
deleted file mode 100644
index f7cadcc..0000000
--- a/python-dcae-policy/dev_run.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-# org.onap.dcae
-# ================================================================================
-# Copyright (c) 2017 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=========================================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-
-
-# nexus has to be listed in ~/.pypirc as repository and contain the url like this
-# [nexus]
-# repository: https://YOUR_NEXUS_PYPI_SERVER/
-
-case "$1" in
- register)
- echo "python setup.py register -r nexus --show-response"
- python setup.py register -r nexus --show-response
- ;;
- upload)
- echo "python setup.py sdist upload -r nexus --show-response"
- python setup.py sdist upload -r nexus --show-response
- ;;
- build)
- echo "python setup.py sdist register -r nexus --show-response upload -r nexus --show-response"
- python setup.py sdist register -r nexus --show-response upload -r nexus --show-response
- ;;
- *)
- SELF=$(basename "$0")
- echo "Usage:"
- echo "./${SELF} register"
- echo "./${SELF} upload"
- echo "./${SELF} build"
- ;;
-esac \ No newline at end of file
diff --git a/python-dcae-policy/nexus_pypi.md b/python-dcae-policy/nexus_pypi.md
deleted file mode 100644
index 7c27679..0000000
--- a/python-dcae-policy/nexus_pypi.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# setting up connection to nexus server with pypi
-
-1. request account in nexus repo server with update privilege to pypi repo.
-
-result: **url + username + password**
-
-2. create/update `~/.pypirc` with proper nexus **url + username + password**
-```bash
-[distutils]
-index-servers =
- pypi
- nexus
-
-[pypi]
-username:
-password:
-
-[nexus]
-repository:https://YOUR_NEXUS_PYPI_SERVER/
-username:<username>
-password:<password>
-```
-
-3. run `./dev_run.sh register` command to register your python package into nexus pypi repo
-
-4. run `./dev_run.sh upload` command to upload your python package into nexus pypi repo \ No newline at end of file