首页 > 解决方案 > 用于选择所有接入端口的 Cisco Prime 基础设施 CLI 模板

问题描述

如何创建包含所有端口选择的模板?我尝试了以下操作:添加了字符串

AccessInterface=select u.name from VLANSwitchportSettings u where u.operationalVlanMode = '2' and u.owningEntityId = --?%-- order by u.name

归档

/opt/CSCOlumos/conf/ifm/template/inventoryTagsInTemplate/CLITemplateDbVariablesQuery.properties.

然后,我正在使用代码创建模板:

#set($AccessInterface = $AccessInterface.split("#@#", -1))
#foreach($Interface in $AccessInterface)
    interface $Interface
    description Hi I'm an access interface
#end

此外,我声称变量名称为AccessInterface,类型为DB,显示标签AccessInterface

当我尝试部署它时,Prime 在部署摘要选项卡中显示结果。它只选择 Fa0 (mgmt) 而不是 Gi 端口。我做错了什么?

interface FastEthernet0
description Hi I'm an access interface```

标签: ciscosdn

解决方案


推荐阅读