예제 #1
0
  public VSphereFile(FileURL url) throws IOException {
    super(url);
    VsphereConnHandler connHandler = null;
    try {
      setPath(url.getPath());

      connHandler = getConnHandler();
      guestOperationsManager =
          connHandler.getClient().getServiceContent().getGuestOperationsManager();

      getMor(connHandler);
      fixPathInVmIfNeeded(connHandler);

      checkAttributues(connHandler);
    } catch (RuntimeFaultFaultMsg e) {
      translateandLogException(e);
    } catch (FileFaultFaultMsg e) {
      translateandLogException(e);
    } catch (GuestOperationsFaultFaultMsg e) {
      translateandLogException(e);
    } catch (InvalidStateFaultMsg e) {
      translateandLogException(e);
    } catch (TaskInProgressFaultMsg e) {
      translateandLogException(e);
    } catch (InvalidPropertyFaultMsg e) {
      translateandLogException(e);
    } catch (URISyntaxException e) {
      translateandLogException(e);
    } finally {
      releaseConnHandler(connHandler);
    }
  }
예제 #2
0
  public VSphereFile(FileURL url, VSphereFile parent, GuestFileInfo guestFileInfo)
      throws RuntimeFaultFaultMsg, IOException, FileFaultFaultMsg, GuestOperationsFaultFaultMsg,
          InvalidStateFaultMsg, TaskInProgressFaultMsg, InvalidPropertyFaultMsg,
          URISyntaxException {
    super(url);
    setPath(url.getPath());

    this.parent = parent;
    this.vm = parent.vm;
    this.guestOsId = parent.guestOsId;
    this.guestOperationsManager = parent.guestOperationsManager;

    fixPathInVmIfNeeded(null);

    updateAttributes(guestFileInfo);
  }
예제 #3
0
  public VSphereFile(FileURL url, VSphereFile related)
      throws URISyntaxException, IOException, RuntimeFaultFaultMsg, InvalidPropertyFaultMsg,
          FileFaultFaultMsg, GuestOperationsFaultFaultMsg, InvalidStateFaultMsg,
          TaskInProgressFaultMsg {
    super(url);
    setPath(url.getPath());

    this.vm = related.vm;
    this.guestOsId = related.guestOsId;
    this.guestOperationsManager = related.guestOperationsManager;

    fixPathInVmIfNeeded(null);

    VsphereConnHandler connHandler = null;
    try {
      connHandler = getConnHandler();
      checkAttributues(connHandler);
    } finally {
      releaseConnHandler(connHandler);
    }
  }