-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmapping.xml
150 lines (129 loc) · 5.85 KB
/
mapping.xml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<meta>
<settings>
<atrium
url="http://10.42.3.69:8008"
user="admin"
password="adm!nd42"
/>
<device42
url="https://10.42.2.241"
user="admin"
password="adm!nd42"/>
</settings>
<tasks>
<task enable="true" description="Copy IPs from Device42 to BMC Atrium">
<api>
<target
target="atrium"
method="POST"
update_method="PATCH"
path="/api/cmdb/v1.0/bulk"
/>
<resource
model="device"
target="device42"
method="POST"
extra-filter=""
path="/services/data/v1.0/query/"
doql="SELECT * FROM view_ipaddress_v1"
/>
</api>
<mapping
callback="from_d42"
source="ips"
class="BMC_IPEndpoint"
dataset="BMC.ASSET"
namespace="BMC.CORE"
>
<field value="" resource="ipaddress_pk" type="string" prefix="IP_addr" target="instance_id" suffix="_d42"/>
<field value="" resource="ipaddress_pk" type="string" prefix="IP_addr" target="Name" suffix="_d42"/>
<field value="" resource="ip_address" type="string" target="Address"/>
<field value="" resource="notes" type="string" target="Notes"/>
</mapping>
</task>
<task enable="true" description="Copy Devices from D42 to BMC Atrium">
<api>
<target
target="atrium"
method="POST"
update_method="PATCH"
path="/api/cmdb/v1.0/bulk"
/>
<resource
model="device"
target="device42"
method="GET"
extra-filter=""
path="/api/1.0/devices/all/"
/>
</api>
<mapping
callback="from_d42"
source="Devices"
class="BMC_ComputerSystem"
dataset="BMC.ASSET"
namespace="BMC.CORE"
>
<field value="" resource="device_id" type="string" prefix="dev_" target="instance_id" suffix="_d42"/>
<field value="" resource="device_id" type="string" prefix="device_" target="Name" suffix="_d42"/>
<field value="" resource="serial_no" type="string" prefix="" target="SerialNumber" suffix=""/>
<field value="" resource="type" type="string" target="Type"/>
<field value="" resource="notes" type="string" target="Notes"/>
<field value="" resource="category" type="string" target="Category"/>
</mapping>
</task>
<task enable="true" description="Link IPs to Devices on BMC using DOQL query">
<api>
<target
target="atrium"
method="POST"
update_method="PATCH"
path="/api/cmdb/v1.0/bulk"
/>
<resource
model="device"
target="device42"
method="POST"
extra-filter=""
path="/services/data/v1.0/query/"
doql="SELECT ipaddress_pk, device_fk, CONCAT(device_fk, '_', ipaddress_pk) as device_rel_ip FROM view_ipaddress_v1 WHERE device_fk IS NOT NULL"
/>
</api>
<mapping
callback="from_d42"
source=""
class="BMC_BaseRelationship"
dataset="BMC.ASSET"
namespace="BMC.CORE"
>
<field value="Destination-Source" resource="" type="string" prefix="" target="ImpactDirection" suffix=""/>
<field value="" resource="device_rel_ip" type="string" prefix="relate_" target="instance_id" suffix="_d42"/>
<field value="Yes" resource="" type="string" prefix="" target="HasImpact" suffix=""/>
<field value="" resource="device_fk" type="string" prefix="" target="Name" suffix="_ip_d42"/>
<field value="BMC.ASSET" resource="" type="string" prefix="" target="Source.DatasetId" suffix=""/>
<field value="BMC_ComputerSystem" resource="" type="string" prefix="" target="Source.ClassId" suffix=""/>
<field value="" resource="device_fk" type="string" prefix="dev_" target="Source.InstanceId" suffix="_d42"/>
<field value="BMC.ASSET" type="string" resource="" prefix="" target="Destination.DatasetId" suffix=""/>
<field value="BMC_IPEndpoint" resource="" type="string" prefix="" target="Destination.ClassId" suffix=""/>
<field value="" resource="ipaddress_pk" type="string" prefix="IP_addr" target="Destination.InstanceId" suffix="_d42"/>
<!-- TO add
http://10.42.3.69:8008/api/cmdb/v1.0/attributes/BMC.CORE/BMC_BaseRelationship
Destination.ClassId
Destination.DatasetId
Destination.InstanceId * required
Source.ClassId
Source.DatasetId
Source.InstanceId * required
ImpactDestinationId
ImpactSourceId
ImpactWeight
InstanceId ? optional
Name * required
ShortDescription ? optional
Submitter * required
AccountID ? optional
-->
</mapping>
</task>
</tasks>
</meta>