docs: function getOrCreateService(name, application_uuid, files, extra_opts, cb) {
      var self = this;
      var log = self.log;
  
      assert.string(name, 'name');
      assert.string(application_uuid, 'application_uuid');
      assert.ok(files, 'files');  // string or list of strings
  
      if (arguments.length === 4) {
          cb = extra_opts;
          extra_opts = null;
      }
  
      assert.func(cb, 'cb');
  
      log.info({
          name: name,
          application_uuid: application_uuid
      }, 'getting or creating service');
  
      async.waterfall([
          function (subcb) {
              var search = {};
              search.name = name;
              search.application_uuid = application_uuid;
  
              if (extra_opts && extra_opts.include_master)
                  search.include_master = true;
  
              self.listServices(search, function (err, svcs) {
                  if (err) {
                      log.error(err, 'failed to list services');
                      return (subcb(err));
                  }
  
                  if (svcs.length > 0) {
                      log.debug({ svc: svcs[0] }, 'found service %s', name);
                      return (cb(err, svcs[0]));
                  }
  
                  return (subcb(null));
              });
          },
          function (subcb) {
              readAndMergeFiles(files, function (err, obj) {
                  if (err)
                      return (subcb(err));
  
                  return (subcb(null, mergeOptions(obj, extra_opts)));
              });
          },
          function (opts, subcb) {
              assert.object(opts, 'opts');
              assert.func(subcb, 'subcb');
  
              log.debug({ opts: opts }, 'creating service');
  
              self.createService(name, application_uuid, opts,
                  function (err, svc) {
                  if (err) {
                      log.error(err, 'failed to create service %s', name);
                      return (subcb(err));
                  }
  
                  log.info({ svc: svc },
                      'created service %s', name);
  
                  return (subcb(err, svc));
              });
          }
      ], cb);
  }