CMDB.Sync.Document TPL

Post Reply
hudatolah
Site Admin
Posts: 143
Joined: Thu Apr 04, 2013 8:10 pm
Are You a Headhunter?: Affirmative
Surfer?: Yes

CMDB.Sync.Document TPL

Post by hudatolah » Thu Oct 03, 2019 8:14 am

tpl 1.12 module CMDB.Host_Document;

from CMDB.Host_ComputerSystem import Host_ComputerSystem 2.2;

syncmapping Host_Document 1.0
"""
Maps Hosted info to be Documented to BMC_Document
"""


overview
tags CMDB, Extension;
end overview;

mapping from Host_ComputerSystem.host as host
document -> BMC_Document;
end mapping;

body

computersystem := Host_ComputerSystem.computersystem;

document_key := "%host.key%//DOC";
document := sync.BMC_Document(
key := document_key,
Name := "%host.name%,
NameFormat := "HostName:DOC",
ShortDescription := "%host.name%",
fileContent := "%host.name%",
DocumentType := "APMAppListJSON",
// Model := package.name,
// LastScanDate := host.last_update_success,
// Description := "%package.name% on %host.name%",
// VersionNumber := version_number,
// BuildNumber := package.revision,
// ManufacturerName := package.vendor,
// MarketVersion := version_number,
// TokenID := "%package.name%:%version_number%",
// Category := "Software",
// Type := "Software Distribution",
// Item := "Package",
// Company := computersystem.Company
);

sync.rel.BMC_Dependency(
Source := computersystem,
Destination := document,
Name := "HOSTDOCUMENT"
);

end body;
end syncmapping;
The Blackholesurfer. My surfboard has teeth.

Post Reply