Exemple #1
0
  //
  // Actually setup potentially after loading
  // cert and key files async
  //
  function setupClient(err, ssl) {
    if (err) {
      quill.warn('Error reading SSL certificates:')
      quill.warn(key);
      quill.warn(cert);
    }

    var client = composer.createClient({
      host:  quill.config.get('remoteHost'),
      port:  quill.config.get('port'),
      proxy: quill.config.get('proxy'),
      cert:  ssl && ssl.cert,
      key:   ssl && ssl.key,
      auth: {
        get username() { return quill.config.get('username'); },
        get password() { return quill.config.get('password'); }
      }
    });

    Object.keys(client).forEach(function (key) {
      if (key === 'config') {
        quill.remote = client[key];
        return;
      }

      quill[key] = client[key];
    });

    quill.started = true;
    callback();
  }
    topic: function () {
      var api  = nock('http://api.testquill.com'),
          that = this;

      mock.systems.all(api);
      systemJson.dependencies({
        systems: this.context.name,
        client: composer.createClient({
          protocol: 'http',
          host: 'api.testquill.com',
          port: 80,
          auth: {}
        }).systems
      }, function (err, deps) {
        return that.callback(err, err || systemJson.remote.cycles(deps));
      });
    },
    topic: function () {
      var api  = nock('http://api.testquill.com');

      if (options.clusters) {
        Object.keys(options.servers).forEach(function (cluster) {
          mock.config.servers(api, cluster, options.servers[cluster]);
        });
      }
      else {
        mock.config.servers(api, options.servers);
      }

      systemJson.remote.verifyRunlist({
        runlist: options.runlist,
        clusters: options.clusters,
        client: composer.createClient({
          protocol: 'http',
          host: 'api.testquill.com',
          port: 80,
          auth: {}
        }).config
      }, this.callback);
    },
Exemple #4
0
 topic: function () {
   return composerApi.createClient(options);
 }