summaryrefslogtreecommitdiffstats
path: root/site-manager/src/main/files
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:31:53 -0500
committerPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:32:27 -0500
commita974aa0cfb827476104c140096de676711d2b673 (patch)
treed636dd0cd1473dc5156eb20fd93c27861f2ffb0b /site-manager/src/main/files
parent23bb08a5de4b88ed843970db2e702319585cc2aa (diff)
Initial OpenECOMP policy/common commit
Change-Id: I61cd29d6d8bf8702c1a66915895b519bf3484afa Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'site-manager/src/main/files')
-rw-r--r--site-manager/src/main/files/README26
-rw-r--r--site-manager/src/main/files/siteManager7
-rw-r--r--site-manager/src/main/files/siteManager.properties24
3 files changed, 57 insertions, 0 deletions
diff --git a/site-manager/src/main/files/README b/site-manager/src/main/files/README
new file mode 100644
index 00000000..66cf08eb
--- /dev/null
+++ b/site-manager/src/main/files/README
@@ -0,0 +1,26 @@
+Before using 'siteManager', the file 'siteManager.properties' needs to be
+edited to configure the parameters used to access the database:
+
+ javax.persistence.jdbc.driver - typically 'org.mariadb.jdbc.Driver'
+ javax.persistence.jdbc.url - URL referring to the database,
+ which typically has the form: 'jdbc:mariadb://<host>:<port>/<db>'
+ ('<db>' is probably 'xacml' in this case)
+ javax.persistence.jdbc.user - the user id for accessing the database
+ javax.persistence.jdbc.password - password for accessing the database
+
+Once the properties file has been updated, the 'siteManager' script can be
+invoked as follows:
+
+ siteManager show [ -s <site> | -r <resourceName> ] :
+ display node information
+ siteManager setAdminState { -s <site> | -r <resourceName> } <new-state> :
+ update admin state on selected nodes
+ siteManager lock { -s <site> | -r <resourceName> } :
+ lock selected nodes
+ siteManager unlock { -s <site> | -r <resourceName> } :
+ unlock selected nodes
+
+Note that the 'siteManager' script assumes that the script,
+'site-manager-${project.version}.jar' file and 'siteManager.properties' file
+are all in the same directory. If the files are separated, the 'siteManager'
+script will need to be modified so it can locate the jar and properties files.
diff --git a/site-manager/src/main/files/siteManager b/site-manager/src/main/files/siteManager
new file mode 100644
index 00000000..02e7c33c
--- /dev/null
+++ b/site-manager/src/main/files/siteManager
@@ -0,0 +1,7 @@
+#! /bin/bash
+
+dir="${0%/*}"
+CLASSPATH="${dir}/site-manager-${project.version}.jar" java \
+ -DsiteManager.properties=${dir}/siteManager.properties \
+ org.openecomp.policy.common.sitemanager.Main "$@" | \
+ grep -v "^\[EL Info\]"
diff --git a/site-manager/src/main/files/siteManager.properties b/site-manager/src/main/files/siteManager.properties
new file mode 100644
index 00000000..a2801181
--- /dev/null
+++ b/site-manager/src/main/files/siteManager.properties
@@ -0,0 +1,24 @@
+###
+# ============LICENSE_START=======================================================
+# site-manager
+# ================================================================================
+# 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=========================================================
+###
+
+javax.persistence.jdbc.driver = org.mariadb.jdbc.Driver
+# javax.persistence.jdbc.url = jdbc:mariadb://<host>:3306/xacml
+# javax.persistence.jdbc.user = <userid>
+# javax.persistence.jdbc.password = <password>