cisco - 用于选择所有接入端口的 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```
解决方案
推荐阅读
- reactjs - 如何仅加载每个组件所需的 CSS(React js)
- c++ - 如何在不配置新工具链的情况下告诉 Bazel 使用哪个编译器
- javascript - 单击一键登录后,如何删除第二个身份验证屏幕?
- javascript - 在 useEffect 上设置参数并在 React Navigation 5 中的 createStackNav 上获取参数
- angular - 如何从角材料日期选择器中删除填充
- c++ - 如何在 C++ 中对向量数组进行排序?
- ios - 如何从 MPNowPlayingInfoCenter 访问 ViewController
- excel - 如果两个单元格匹配:从第三个单元格返回以对数据进行排序
- r - 创建一个新变量 - 有没有更好的方法?
- angular - Angular Karma Jasmin - 没有 LocaleService 的提供者