aboutsummaryrefslogtreecommitdiffstats
path: root/packages/policy-xacmlpdp-tarball/src/main/package/tarball/assembly.xml
blob: e08be24d74b7cca8c89dd8a461a2a9b8a167e4e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!--
  ============LICENSE_START=======================================================
   Copyright (C) 2019 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.

  SPDX-License-Identifier: Apache-2.0
  ============LICENSE_END=========================================================
-->

<assembly>
    <id>tarball</id>
    <formats>
        <format>tar.gz</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <dependencySets>
        <dependencySet>
            <useProjectArtifact>true</useProjectArtifact>
            <outputDirectory>/lib</outputDirectory>
            <unpack>false</unpack>
            <scope>runtime</scope>
            <includes>
                <include>*:jar</include>
            </includes>
        </dependencySet>
    </dependencySets>
    <fileSets>
        <fileSet>
            <directory>${project.basedir}/src/main/resources/etc
            </directory>
            <includes>
                <include>*.json</include>
                <include>*.xml</include>
            </includes>
            <outputDirectory>/etc</outputDirectory>
            <lineEnding>unix</lineEnding>
            <excludes>
                <exclude>*.formatted</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>${project.basedir}/src/main/resources/etc/ssl
            </directory>
            <includes>
                <include>policy*</include>
            </includes>
            <outputDirectory>/etc/ssl</outputDirectory>
            <lineEnding>keep</lineEnding>
        </fileSet>
    </fileSets>
</assembly>
result trough input in the hostname mapping file interface-name: Name of the interface to configure unit-number: Unit to configure for the interface { "config-assign-request": { "resolution-key": "config-assign-demo-123", "config-assign-properties": { "hostname": "blah" } } } Output: "config-assign-response": { "dry-run": { "hostname": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration xmlns:junos=\"http://xml.juniper.net/junos/17.4R1/junos\">\n <system xmlns=\"http://yang.juniper.net/junos-qfx/conf/system\">\n <host-name operation=\"delete\" />\n <host-name operation=\"create\">blah</host-name>\n </system>\n</configuration>\n", "vfw-interface": "<configuration>\n <interfaces>\n <interface>\n <name>ge-0/0/7</name>\n <unit operation=\"create\">\n <name>0</name>\n <description>This is the Virtual Firewall entity</description>\n <family>\n <inet>\n <address>\n <name>10.0.101.17/24</name>\n </address>\n </inet>\n </family>\n </unit>\n </interface>\n </interfaces>\n</configuration>" } } config-deploy This action will run a python script that will retrieved the resolved template from previous step using the resolution-key. This action will push these resolved templates into a device (JUNOS) using NETCONF. The python script will make use of utilities classes provided by the platform: resolution helper and netconf client. Information about the device is modelled as a requirement of this action, specifying that username, password and ip of the device should be provided as input. Note: you could resolve those information using the resource resolution framework, if need be. Input: resolution-key: To identify the configlet saved in the DB in previous step username: NETCONF device user password: NETCONF device password ip: NETCONF device ip { "config-deploy-request": { "resolution-key": "config-assign-demo-123", "username": "admin", "password": "passwd", "ip": "10.198.1.35" } } Output: No specific output beside success or failure. rollback This action will rollback the last committed config on the device, using NETCONF and device specific RPC. To do so, a python script will be used, similar as in previous action, to dynamically resolve the rollback template payload, and send the RPC to the device. Information about the NETCONF device is provided in a similar fashion as previous step. Input: username: NETCONF device user password: NETCONF device password ip: NETCONF device ip { "rollback-request": { "username": "admin", "password": "passwd", "ip": "10.198.1.35", "rollback-properties": { } } } Output: No specific output beside success or failure. Postman collection used for this example. 5 requests are provided one per workflow to execute, and 1 to load the CBA in the runtime environment. https://www.getpostman.com/collections/d68b12a60fd6ed336059