我在芝加哥和达拉斯有一个 esxi 5.5 主机。两台服务器都由我的 vCenter 服务器控制。我在芝加哥有一台 MySQL 服务器,可通过该主机上的服务器通过内部唯一的 vswitch 进行访问。我现在也需要从达拉斯主机访问它。有没有办法通过 vSwitch 连接两台主机的私有网络?(我不想做任何 GRE 隧道、TE 隧道或 VPN。如果 vmware 内部的某些东西是不可能的,那么这就是我需要知道的全部!)谢谢!
主页
/
user-210966
driz's questions
driz
Asked:
2014-06-07 10:57:42 +0800 CST
思科的许可管理器有一个缺点,它提供的是每个企业而不是每个集群的许可数据。我正在尝试利用 SQL 查询来生成这些数据。目前,我有两个提供一些相关信息的查询。
SELECT name,value FROM TABLE (FUNCTION LicenseTotals()) (pkid,name,value,UserValue,DeviceValue)
产生这个输出
name value
================= ===================
CUWL Standard 0
EnhancedPlus 0
Enhanced 2953
Basic 0
Essential 1349
TelePresence Room 0
TotalUsers 0
TotalDevices 4302
Timestamp 2014-06-06 11:45:21
ElmLastContact 1402044739
Elm XXXXXXXXXELM1
和
select typeproduct.name, typelicensedresource.name from typeproduct, typelicensedresource, typelicensedresourceproductmap where typelicensedresource.enum = typelicensedresourceproductmap.tklicensedresource and typelicensedresourceproductmap.tkproduct = typeproduct.enum
产生这个输出
name name
======================================== ============
Analog Phone Tin
Cisco 6901 Tin
Cisco 6911 Copper
Cisco 6921 Copper
H.323 Client Bronze
Cisco 30 SP+ Bronze
我想做的是以某种方式从设备池表中提取信息,但许可的唯一 ID 与设备池的唯一 ID 不匹配。我的最终目标是
Count Licensetype Site
========================================================
50 Tin Site 1
30 Tin Site 2
75 Copper Site 1
100 Copper Site 2
80 Bronze Site 3
110 Bronze Site 3
一些可以获取每个站点计数的先前代码是
run sql SELECT sum(analog_phones) as analog_phones, sum(ip_phones) as ip_phones, devicepool FROM (SELECT 0 AS analog_phones, count(d.name) AS IP_Phones, dp.name AS DevicePool FROM Device AS d INNER JOIN DevicePool AS dp ON d.fkDevicePool=dp.pkid INNER JOIN typemodel AS tm ON tm.enum=d.tkmodel WHERE (d.tkclass=1 AND dp.name LIKE '%PH%') GROUP BY dp.name UNION ALL SELECT count(d.name) AS Analog_Phones, 0 AS ip_phones, dp.name AS DevicePool FROM Device AS d INNER JOIN DevicePool AS dp ON d.fkDevicePool=dp.pkid INNER JOIN typemodel AS tm ON tm.enum=d.tkmodel WHERE (tm.name = 'Analog Phone') GROUP BY dp.name) a GROUP BY devicepool ORDER BY devicepool
返回此结果
analog_phones ip_phones devicepool
============= ========= ===============
12 0 BRLED-AGW-DP
0 36 BRLED-PHONES-DP
0 46 CRMBT-PHONES-DP
532 0 DRMC-AGW-DP
1 695 DRMC-PHONES-DP
我用来确定正确表格的指南是我的呼叫管理器版本的数据字典
driz
Asked:
2014-03-15 12:37:06 +0800 CST
我有一个返回以下信息的脚本
Analog Phones IP Phones Location
------------- --------- --------
0 883 Site1
413 0 Site1
0 4 Site1
0 258 Site2
9 75 Site2
183 0 Site2
此信息存储在数组 $arrayX 中
我想弄清楚如何让输出显示
Analog Phones IP Phones Location
------------- --------- --------
413 887 Site1
192 333 Site2
馈入数组的数据不是以这种方式呈现的;有没有人对如何完成这样的事情有任何想法?我可以发布整个脚本,但它现在是 java、axl 和 powershell 的混乱。
脚本中有一点数据看起来像这样
Analog Phones IP Phones Location
------------- --------- --------
413 0 Site1-AGW-DP
0 883 Site1-PHONES-DP
0 4 Site1-PHSRST-DP
正在使用的 XML 文件是从 java axl 程序输出的。其中之一的结果如下所示:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<axl:executeSQLQueryResponse xmlns:axl="http://www.cisco.com/AXL/API/6.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" sequence="1394831301468">
<return>
<row>
<analog_phones>0</analog_phones>
<ip_phones>47</ip_phones>
<devicepool>Site20-PHONES-DP</devicepool>
</row>
<row>
<analog_phones>533</analog_phones>
<ip_phones>0</ip_phones>
<devicepool>Site20-AGW-DP</devicepool>
</row>
<row>
<analog_phones>1</analog_phones>
<ip_phones>689</ip_phones>
<devicepool>Site20-PHSRST-DP</devicepool>
</row>
</return>
</axl:executeSQLQueryResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
在 java 位之后启动的 Powershell 脚本
$files = (Get-ChildItem .\*out.xml).name
foreach ($file in $files){
[xml]$xmlfiles = gc $file
$finalxml += $xmlfiles.envelope.body.executeSQLQueryResponse.return.row
Remove-Item $pwd\$file
}
$outarray = @()
$sitelist = import-csv sites.csv
foreach($item in $finalxml){
if(!$item.devicepool){$sed="BLANK"}
else{$sed=($item.devicepool).substring(0,4)}
$location=($sitelist | where-object {$_.prefix -eq $sed}).Facility
if(!$location){$location=$sed}
$outarray+=New-object psobject -property @{
'Analog Phones' = $item.analog_phones
'IP Phones' = $item.ip_phones
'Location' = $location
}
}
$outarray | Sort-Object 'Analog Phones','IP PHones' -unique | sort-object Location | select-object 'Analog Phones','IP Phones',Location |export-csv $csvout
driz
Asked:
2014-03-15 07:36:17 +0800 CST
我需要分别查询每个站点的模拟电话和 IP 电话的电话号码。我可以用这两个查询来做到这一点。
IP电话:
select count(d.name) as IP_Phones, dp.name as DevicePool
from Device as d
inner join DevicePool as dp on d.fkDevicePool=dp.pkid
inner join typemodel as tm on tm.enum=d.tkmodel
where (tm.name != 'Analog Phone' and tm.name != 'Conference Bridge'
and tm.name != 'CTI Route Point' and tm.name != 'CTI Port'
and tm.name != 'MGCP Station' and tm.name != 'Route List'
and tm.name != 'H.323 Gateway'
and tm.name != 'Music On Hold'
and tm.name != 'Media Termination Point'
and tm.name != 'Tone Announcement Player'
and tm.name != 'Cisco IOS Conference Bridge (HDV2)'
and tm.name != 'Cisco IOS Software Media Termination Point (HDV2)'
and tm.name != 'Cisco IOS Media Termination Point (HDV2)'
and tm.name != 'SIP Trunk' and dp.name like '%PH%')
group by dp.name
order by dp.name
这导致
ip_phones devicepool
========= ================
815 Site1-DP
43 Site2-DP
32 Site3-DP
890 Site4-DP
模拟电话:
select count(d.name) as Analog_Phones, dp.name as DevicePool
from Device as d
inner join DevicePool as dp on d.fkDevicePool=dp.pkid
inner join typemodel as tm on tm.enum=d.tkmodel
where (tm.name = 'Analog Phone' and dp.name like '%PH%')
group by dp.name
order by dp.name
这导致
analog_phones devicepool
============= ==============
12 Site1-DP
14 Site2-DP
1 Site3-DP
4 Site4-DP
我正在寻找的是一个单一的查询,结果是这样的:
ip_phones analog_phones devicepool
========= ============= ==========
815 12 Site1-DP
43 14 Site2-DP
32 1 Site3-DP
890 4 Site4-DP