Package com.puppetlabs.geppetto.puppetdb

Examples of com.puppetlabs.geppetto.puppetdb.PuppetDBConnectionPreferences


      }
    }
  }

  private void removeClient(PuppetDBConnection client) {
    final PuppetDBConnectionPreferences prefs = client.getPreferences();
    Shell shell = viewer.getControl().getShell();
    if(MessageDialog.openConfirm(
      shell, UIPlugin.getLocalString("_UI_Confirm_Removal"),
      UIPlugin.getLocalString("_UI_Is_remove_of_client_ok", prefs.getIdentifier()))) {
      Util.alterPreferences(shell, puppetDBManager, new Callable<Void>() {
        @Override
        public Void call() throws Exception {
          prefs.remove();
          return null;
        }
      });
      viewer.setInput(getPuppetDBConnections(viewer, puppetDBManager));
    }
View Full Code Here


   * @return The matching instance or <code>null</code>.
   */
  @Override
  public PuppetDBConnectionPreferences get(String hostname, int port) throws BackingStoreException {
    if(hasPuppetDBNode()) {
      PuppetDBConnectionPreferences pa = new PuppetDBConnectionPreferencesImpl(hostname, port);
      if(getPuppetDBNode().nodeExists(pa.getIdentifier()))
        return pa;
    }
    return null;
  }
View Full Code Here

    public boolean performFinish() {
      return Util.alterPreferences(getShell(), puppetDBManager, new Callable<Void>() {
        @Override
        public Void call() throws Exception {
          PuppetDBConnectionPreferences access = puppetDBManager.add(dns.getValue(), Integer.parseInt(port.getValue()));
          access.setCaCert(readAsciiFile(caCert.getValue()));
          access.setHostCert(readAsciiFile(hostCert.getValue()));
          access.setHostPrivateKey(readAsciiFile(hostPrivateKey.getValue()));
          puppetDBManager.flush();
          return null;
        }
      });
    }
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.puppetdb.PuppetDBConnectionPreferences

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.