Package com.guigarage.vagrant.util

Examples of com.guigarage.vagrant.util.VagrantException


      for (Object box : boxes) {
        ret.add(((RubyObject) box).callMethod("name").toString());
      }
      return ret;
    } catch (RaiseException exception) {
      throw new VagrantException(exception);
    }
  }
View Full Code Here


      for (Object vm : o) {
        vms.add(new VagrantVm((RubyObject) vm));
      }
      return vms;
    } catch (RaiseException exception) {
      throw new VagrantException(exception);
    }
  }
View Full Code Here

    try {
      RubyArray o = (RubyArray) vagrantEnvironment
          .callMethod("vms_ordered");
      return new VagrantVm((RubyObject) o.get(index));
    } catch (RaiseException exception) {
      throw new VagrantException(exception);
    }
  }
View Full Code Here

    try {
      RubyArray o = (RubyArray) vagrantEnvironment
          .callMethod("vms_ordered");
      return o.size();
    } catch (RaiseException exception) {
      throw new VagrantException(exception);
    }
  }
View Full Code Here

  public String getVagrantfileName() {
    try {
      return ((RubyObject) vagrantEnvironment
          .callMethod("vagrantfile_name")).toString();
    } catch (RaiseException exception) {
      throw new VagrantException(exception);
    }
  }
View Full Code Here

  public String getHomePath() {
    try {
      return ((RubyObject) vagrantEnvironment.callMethod("home_path"))
          .toString();
    } catch (RaiseException exception) {
      throw new VagrantException(exception);
    }
  }
View Full Code Here

   */
  public VagrantVm getPrimaryVm() {
    try {
      RubyObject rubyVm = (RubyObject) vagrantEnvironment.callMethod("primary_vm");
      if(rubyVm == null || rubyVm instanceof RubyNil) {
        throw new VagrantException("No primary vm found. Maybe there is no vm defined in your configuration or you are working with a multi vm environment.");
      }
      return new VagrantVm(rubyVm);
    } catch (RaiseException exception) {
      throw new VagrantException(exception);
    }
  }
View Full Code Here

   */
  public void up() {
    try {
      vagrantVm.callMethod("up");
    } catch (RaiseException exception) {
      throw new VagrantException(exception);
    }
  }
View Full Code Here

   */
  public void start() {
    try {
      vagrantVm.callMethod("start");
    } catch (RaiseException exception) {
      throw new VagrantException(exception);
    }
  }
View Full Code Here

   */
  public void halt() {
    try {
      vagrantVm.callMethod("halt");
    } catch (RaiseException exception) {
      throw new VagrantException(exception);
    }
  }
View Full Code Here

TOP

Related Classes of com.guigarage.vagrant.util.VagrantException

Copyright © 2018 www.massapicom. 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.