- }
-
- public static String queryEmsDetail(String emsId) throws ExtsysException {
- try {
- return externalSystemproxy.queryEMSDetail(transactionId, fromAppId, authorization, emsId);
- } catch (Exception e) {
- throw new ExtsysException("Query EMS detail from A&AI failed.", e);
+
+ public static String queryEmsDetail(String emsId) throws ExtsysException {
+ if (isTest) {
+ String emsDetailStr = "{\"ems-id\":\"123456\",\"esr-system-info-list\":{\"esr-system-info\":"
+ + "[{\"esr-system-info-id\":\"234567\",\"system-name\":\"EMS_TEST\",\"type\":\"sftp\","
+ + "\"vendor\":\"ZTE\",\"version\":\"V1\",\"user-name\":\"nancy\",\"password\":\"asdf\","
+ + "\"system-type\":\"EMS_RESOUCE\",\"ip-address\":\"ip\",\"port\":\"5000\","
+ + "\"passive\":true,\"remote-path\":\"/home/per\"},{\"esr-system-info-id\":\"345678\","
+ + "\"system-name\":\"EMS_TEST\",\"type\":\"sftp\",\"vendor\":\"ZTE\",\"version\":\"V1\","
+ + "\"user-name\":\"nancy\",\"password\":\"asdf\",\"system-type\":\"EMS_PERFORMANCE\","
+ + "\"ip-address\":\"ip\",\"port\":\"5000\",\"passive\":true,"
+ + "\"remote-path\":\"/home/per\"},{\"esr-system-info-id\":\"456789\","
+ + "\"system-name\":\"EMS_TEST\",\"vendor\":\"ZTE\",\"version\":\"V1\","
+ + "\"user-name\":\"nancy\",\"password\":\"987654\",\"system-type\":\"EMS_ALARM\","
+ + "\"ip-address\":\"ip\",\"port\":\"5000\"}]}}";
+ return emsDetailStr;
+ }
+ try {
+ return externalSystemproxy.queryEMSDetail(transactionId, fromAppId, authorization, emsId);
+ } catch (Exception e) {
+ throw new ExtsysException("Query EMS detail from A&AI failed.", e);
+ }