Examples of invokeElem()


Examples of netapp.manage.NaServer.invokeElem()

        _volumeDao.update(volumeId, volume);
      }

      if(snapPolicy)
      {
        s.invokeElem(xi2);
        volume.setSnapshotPolicy(snapshotPolicy);
        _volumeDao.update(volumeId, volume);
     
      txn.commit();
    } catch (NaException nae) {
View Full Code Here

Examples of netapp.manage.NaServer.invokeElem()

    NaElement xi = new NaElement("snapshot-get-schedule");
    xi.addNewChild("volume", vol.getVolumeName());
    NaServer s = null;
    try {
      s = getServer(vol.getIpAddress(), vol.getUsername(), vol.getPassword());
      NaElement xo = s.invokeElem(xi);
      String weeks = xo.getChildContent("weeks");
      String days = xo.getChildContent("days");
      String hours = xo.getChildContent("hours");
      String minutes = xo.getChildContent("minutes");
      String whichHours = xo.getChildContent("which-hours");
View Full Code Here

Examples of netapp.manage.NaServer.invokeElem()

    xi.addNewChild("volume", volName);
    NaServer s = null;
    String volumeState = null;
    try {
      s = getServer(serverIp, userName, password);
      NaElement xo = s.invokeElem(xi);
      List volList = xo.getChildByName("volumes").getChildren();
      Iterator volIter = volList.iterator();
      while(volIter.hasNext()){
        NaElement volInfo=(NaElement)volIter.next();
        availableSize = volInfo.getChildLongValue("size-available", -1);
View Full Code Here

Examples of netapp.manage.NaServer.invokeElem()

        xi = new NaElement("lun-create-by-size");
        xi.addNewChild("ostype","linux");
        xi.addNewChild("path",exportPath.toString());
        xi.addNewChild("size", (lunSizeBytes.toString()));
       
        s.invokeElem(xi)

        try
        {
          //now create an igroup
        xi1 = new NaElement("igroup-create");
View Full Code Here

Examples of netapp.manage.NaServer.invokeElem()

          //now create an igroup
        xi1 = new NaElement("igroup-create");
        xi1.addNewChild("initiator-group-name", lunName .toString());
        xi1.addNewChild("initiator-group-type", "iscsi");
        xi1.addNewChild("os-type", "linux");
        s.invokeElem(xi1);
        }catch(NaAPIFailedException e)
        {
          if(e.getErrno() == 9004)
          {
            //igroup already exists hence no error
View Full Code Here

Examples of netapp.manage.NaServer.invokeElem()

          }
        }

        //get target iqn
      NaElement xi4 = new NaElement("iscsi-node-get-name");
      NaElement xo = s.invokeElem(xi4);
      String iqn = xo.getChildContent("node-name");
     
      lun.setTargetIqn(iqn);
      _lunDao.update(lun.getId(), lun);
     
View Full Code Here

Examples of netapp.manage.NaServer.invokeElem()

      xi3.addNewChild("force", "true");
      xi3.addNewChild("initiator-group", lunName.toString());
      xi3.addNewChild("path", lun.getPath() + lun.getLunName());
     
      xi3.addNewChild("lun-id", lunIdStr);
      s.invokeElem(xi3);
       
        txn.commit();
        //set the result
        result[0] = lunName.toString();//lunname
        result[1] = iqn;//iqn
View Full Code Here

Examples of netapp.manage.NaServer.invokeElem()

      try {
        //Unmap lun
        NaElement xi2 = new NaElement("lun-unmap");
        xi2.addNewChild("initiator-group", lunName);
        xi2.addNewChild("path", lun.getPath()+lun.getLunName());
        s.invokeElem(xi2);
      } catch (NaAPIFailedException naf) {
        if(naf.getErrno()==9016)
          s_logger.warn("no map exists excpn 9016 caught in deletelun, continuing with delete");
      }
View Full Code Here

Examples of netapp.manage.NaServer.invokeElem()

      //destroy lun
      NaElement xi = new NaElement("lun-destroy");
      xi.addNewChild("force","true");
      xi.addNewChild("path", lun.getPath()+lun.getLunName());
      s.invokeElem(xi);
     
      //destroy igroup
      NaElement xi1 = new NaElement("igroup-destroy");
      //xi1.addNewChild("force","true");
      xi1.addNewChild("initiator-group-name",lunName);
View Full Code Here

Examples of netapp.manage.NaServer.invokeElem()

     
      //destroy igroup
      NaElement xi1 = new NaElement("igroup-destroy");
      //xi1.addNewChild("force","true");
      xi1.addNewChild("initiator-group-name",lunName);
      s.invokeElem(xi1);
     
      _lunDao.remove(lun.getId());
      txn.commit();
    } catch(UnknownHostException uhe) {
      txn.rollback();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.