summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources
diff options
context:
space:
mode:
authorSerge Simard <serge@agilitae.com>2019-08-08 10:55:57 -0400
committerSerge Simard <serge@agilitae.com>2019-08-13 14:57:10 +0000
commit34c424689a52614fb414d65899282497fe25b164 (patch)
tree91fdafc99a280064f0ef19c1576fdcbbae303cfc /ms/blueprintsprocessor/functions/config-snapshots/src/test/resources
parent571c49342a905616298d923a9d29a201ae4ecd11 (diff)
Resource Configuration Snapshots Executor and API
Issue-ID: CCSDK-1604 Signed-off-by: Serge Simard <serge@agilitae.com> Change-Id: I349c649e941431b48a309123489d26fb22e0e50a Signed-off-by: Serge Simard <serge@agilitae.com>
Diffstat (limited to 'ms/blueprintsprocessor/functions/config-snapshots/src/test/resources')
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/application-test.properties32
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/keystore.p12bin0 -> 2588 bytes
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml35
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/config-payload-candidate.json39
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/config-payload-running.json35
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml34
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml32
7 files changed, 207 insertions, 0 deletions
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/application-test.properties b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/application-test.properties
new file mode 100644
index 000000000..ce5b4e39f
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/application-test.properties
@@ -0,0 +1,32 @@
+# Copyright © 2019 Bell Canada.
+#
+# 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.
+
+blueprintsprocessor.db.primary.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1
+blueprintsprocessor.db.primary.username=sa
+blueprintsprocessor.db.primary.password=
+blueprintsprocessor.db.primary.driverClassName=org.h2.Driver
+blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=create-drop
+blueprintsprocessor.db.primary.hibernateDDLAuto=update
+blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy
+blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.H2Dialect
+# Controller Blueprints Core Configuration
+blueprintsprocessor.blueprintDeployPath=./target/blueprints/deploy
+blueprintsprocessor.blueprintArchivePath=./target/blueprints/archive
+
+# Python executor
+blueprints.processor.functions.python.executor.executionPath=./../../../../components/scripts/python/ccsdk_blueprints
+blueprints.processor.functions.python.executor.modulePaths=./../../../../components/scripts/python/ccsdk_blueprints
+
+# Executor Options
+blueprintprocessor.netconfExecutor.enabled=true \ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/keystore.p12 b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/keystore.p12
new file mode 100644
index 000000000..96b0d3ac3
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/keystore.p12
Binary files differ
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml
new file mode 100644
index 000000000..f33adcdb8
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml
@@ -0,0 +1,35 @@
+<!--
+ ~ Copyright © 2019 Bell Canada
+ ~
+ ~ 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.
+ -->
+
+<configuration>
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} %-5level %logger{55} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+
+ <logger name="org.springframework" level="warn"/>
+ <logger name="org.hibernate" level="info"/>
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
+
+ <root level="warn">
+ <appender-ref ref="STDOUT"/>
+ </root>
+
+</configuration>
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/config-payload-candidate.json b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/config-payload-candidate.json
new file mode 100644
index 000000000..ad012878d
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/config-payload-candidate.json
@@ -0,0 +1,39 @@
+{
+ "system-uptime-information" :
+ {
+ "current-time" :
+ {
+ "date-time" : "2018-05-15 13:49:56 PDT"
+ },
+ "time-source" : " DNS CLOCK ",
+ "system-booted-time" :
+ {
+ "date-time" : "2018-05-15 10:57:02 PDT",
+ "time-length" : "14:52:54"
+ },
+ "protocols-started-time" :
+ {
+ "date-time" : "2018-05-15 10:59:33 PDT",
+ "time-length" : "02:50:23"
+ },
+ "last-configured-time" :
+ {
+ "date-time" : "2018-05-15 13:49:40 PDT",
+ "time-length" : "00:00:16",
+ "user" : "admin",
+ "new-child-object" : {
+ "property" : "value"
+ }
+ },
+ "uptime-information" :
+ {
+ "date-time" : "1:49PM",
+ "up-time" : "2:53",
+ "active-user-count" : "1",
+ "load-average-1" : "0.00",
+ "load-average-5" : "0.06",
+ "load-average-10" : "0.05",
+ "load-average-15" : "0.06"
+ }
+ }
+} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/config-payload-running.json b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/config-payload-running.json
new file mode 100644
index 000000000..9857eb978
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/config-payload-running.json
@@ -0,0 +1,35 @@
+{
+ "system-uptime-information" :
+ {
+ "current-time" :
+ {
+ "date-time" : "2018-05-15 13:49:56 PDT"
+ },
+ "time-source" : " NTP CLOCK ",
+ "system-booted-time" :
+ {
+ "date-time" : "2018-05-15 10:57:02 PDT",
+ "time-length" : "02:52:54"
+ },
+ "protocols-started-time" :
+ {
+ "date-time" : "2018-05-15 10:59:33 PDT",
+ "time-length" : "02:50:23"
+ },
+ "last-configured-time" :
+ {
+ "date-time" : "2018-05-15 13:49:40 PDT",
+ "time-length" : "00:00:16",
+ "user" : "admin"
+ },
+ "uptime-information" :
+ {
+ "date-time" : "1:49PM",
+ "up-time" : "2:53",
+ "active-user-count" : "1",
+ "load-average-1" : "0.00",
+ "load-average-5" : "0.06",
+ "load-average-15" : "0.06"
+ }
+ }
+} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml
new file mode 100644
index 000000000..d0673aa4e
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © 2019 Bell Canada.
+ ~
+ ~ 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.
+ -->
+<output xmlns="http://yang.juniper.net/junos-qfx/rpc/interfaces">
+ <interface-information xmlns:junos="http://xml.juniper.net/junos/17.4R1/junos" junos:style="normal">
+ <ifd-specific-config-flags />
+ <if-config-flags />
+ <link-type>Full-Duplex</link-type>
+ <if-media-flags>
+ <ifmf-none />
+ </if-media-flags>
+ <interface-flapped junos:seconds="2343">34</interface-flapped>
+ <traffic-statistics junos:style="brief">
+ <input-packets>09098789</input-packets>
+ <output-packets>2828828</output-packets>
+ </traffic-statistics>
+ <physical-interface>
+ <interface-name>TEGig400-int01</interface-name>
+ </physical-interface>
+ </interface-information>
+</output> \ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml
new file mode 100644
index 000000000..3d875c8fb
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © 2019 Bell Canada.
+ ~
+ ~ 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.
+ -->
+<output xmlns="http://yang.juniper.net/junos-qfx/rpc/interfaces">
+ <interface-information xmlns:junos="http://xml.juniper.net/junos/17.4R1/junos" junos:style="normal">
+ <ifd-specific-config-flags />
+ <if-config-flags />
+ <link-type>Full-Duplex</link-type>
+ <if-media-flags>
+ <ifmf-none />
+ </if-media-flags>
+ <interface-flapped junos:seconds="0">Never</interface-flapped>
+ <traffic-statistics junos:style="brief">
+ <input-packets>0</input-packets>
+ <output-packets>0</output-packets>
+ </traffic-statistics>
+ <physical-interface/>
+ </interface-information>
+</output> \ No newline at end of file