private String constructAddLUNQuery(String systemId,String targetPortId,String domainId,Map<String,String> deviceLunList,List<Path> pathList,String model) throws Exception {
  Map<String,Object> attributeMap=new HashMap<String,Object>();
  StorageArray array=new StorageArray(systemId);
  Add addOp=new Add(HDSConstants.LUN_TARGET);
  attributeMap.put(HDSConstants.STORAGEARRAY,array);
  attributeMap.put(HDSConstants.ADD,addOp);
  attributeMap.put(HDSConstants.MODEL,model);
  if (null != deviceLunList && !deviceLunList.isEmpty()) {
    for (    String device : deviceLunList.keySet()) {
      String lun=deviceLunList.get(device);
      Path path=new Path(targetPortId,domainId,null,lun,device);
      pathList.add(path);
      log.info("Device :{} lun:{}",device,lun);
    }
  }
  attributeMap.put(HDSConstants.PATH_LIST,pathList);
  String addLunInputXML=InputXMLGenerationClient.getInputXMLString(HDSConstants.ADD_PATH_TO_HSD_OP,attributeMap,HDSConstants.HITACHI_INPUT_XML_CONTEXT_FILE,HDSConstants.HITACHI_SMOOKS_CONFIG_FILE);
  return addLunInputXML;
}

private String constructAddLUNQuery ( String systemId , String targetPortId , String domainId , Map < String , String > deviceLunList , List < Path > pathList , String model ) throws Exception { Map < String , Object > attributeMap = new HashMap < String , Object > ( ) ; StorageArray array = new StorageArray ( systemId ) ; Add addOp = new Add ( HDSConstants . LUN_TARGET ) ; attributeMap . put ( HDSConstants . STORAGEARRAY , array ) ; attributeMap . put ( HDSConstants . ADD , addOp ) ; attributeMap . put ( HDSConstants . MODEL , model ) ; if ( null != deviceLunList && ! deviceLunList . isEmpty ( ) ) { for ( String device : deviceLunList . keySet ( ) ) { String lun = deviceLunList . get ( device ) ; Path path = new Path ( targetPortId , domainId , null , lun , device ) ; pathList . add ( path ) ; log . info ( "Device :{} lun:{}" , device , lun ) ; } } attributeMap . put ( HDSConstants . PATH_LIST , pathList ) ; String addLunInputXML = InputXMLGenerationClient . getInputXMLString ( HDSConstants . ADD_PATH_TO_HSD_OP , attributeMap , HDSConstants . HITACHI_INPUT_XML_CONTEXT_FILE , HDSConstants . HITACHI_SMOOKS_CONFIG_FILE ) ; return addLunInputXML ; }
constructs the addlun query using multiple path elements . each path element defines the path from volume to initiators .
