docs: function getApplicationObjects(app_uuid, opts, cb) {
      var self = this;
  
      if (arguments.length === 2) {
          cb = opts;
          opts = {};
      }
  
      assert.string(app_uuid, 'app_uuid');
      assert.func(cb, 'cb');
  
      var ret = {};
  
      async.waterfall([
          function (subcb) {
              var search_opts = {};
              search_opts.application_uuid = app_uuid;
  
              if (opts.include_master)
                  search_opts.include_master = true;
  
              self.listServices(search_opts, function (err, svcs) {
                  if (err)
                      return (subcb(err));
  
                  ret.services = {};
                  ret.instances = {};
                  svcs.forEach(function (svc) {
                      ret.services[svc.uuid] = svc;
                      ret.instances[svc.uuid] = [];
                  });
  
                  return (subcb());
              });
          },
          function (subcb) {
              var search_opts = {};
              if (opts.include_master)
                  search_opts.include_master = true;
  
              self.listInstances(search_opts, function (err, insts) {
                  if (err)
                      return (subcb(err));
  
                  /*
                   * The listInstances() call returns all instances, not just
                   * those contained within the application.  To see if an
                   * instance should be included, check its service_uuid to see it
                   * it refers to a service within the given application.
                   */
                  insts.forEach(function (inst) {
                      var svc_uuid = inst.service_uuid;
                      if (!ret.services[svc_uuid])
                          return;
                      ret.instances[svc_uuid].push(inst);
                  });
  
                  return (subcb());
              });
          }
      ], function (err) {
          if (err)
              return (cb(err));
  
          assert.object(ret, 'ret');
          assert.object(ret.services, 'ret.services');
          assert.object(ret.instances, 'ret.instances');
  
          return (cb(null, ret));
      });
  }