Fetch required services: should be called before provisioning operations.
178925
protected void getServices(BundleContext bundleCtx) {
        context = bundleCtx;

        // OSGi 4.3 uses the bundle.adapt() mechanism as a way to get to
        // behavior that is fundamentally a part of the framework
        frameworkStartLevel = bundleCtx.getBundle(Constants.SYSTEM_BUNDLE_LOCATION).adapt(FrameworkStartLevel.class);
        frameworkStartLevel.setInitialBundleStartLevel(KernelStartLevel.ACTIVE.getLevel());

        serviceTracker = new ServiceTracker<LibertyBootRuntime, LibertyBootRuntime>(context, LibertyBootRuntime.class, null);
        serviceTracker.open();
    }
162351
def get_service(self, service_type=None):
        """"""
        for service in self._services:
            if service.type == service_type and service_type:
                return service
        return None
602318
private function prepareService()
    {
        /**
         * If CommodeCommonServiceProvider is not loaded yet, load it
         * and mark as registered in GhostServices
         */
        if (!($bound = $this->app->bound(ServiceShortCuts::CORE_INITIALIZED))) {
            $this->services(['LaravelCommode\Common\CommodeCommonServiceProvider']);
        }

        $withGhostServiceDo = function (GhostServices $appServices) use ($bound) {
            /**
             * If CommodeCommonServiceProvider is not loaded yet, load it
             * and mark as registered in GhostServices
             */
            if (!$bound) {
                $appServices->register('LaravelCommode\Common\CommodeCommonServiceProvider');
            }

            /**
             * Get and register service providers in ServiceManager
             */
            $services = $appServices->differUnique($this->uses(), true);

            /**
             * Register service proviers in laravel app
             * differing from already used ones
             */
            $this->services(array_diff($services, array_keys($this->app->getLoadedProviders())));

            /**
             * Mark current service as registered
             */
            $appServices->register(get_class($this));
        };

        $this->with(ServiceShortCuts::GHOST_SERVICE, $withGhostServiceDo);

        return $this;
    }
180358
def fetch
      requests = instantiate_modules.select(&:fetch?).map(&:requests).flatten

      total, done = requests.size, 0
      update_progress(total, done)

      before_fetch

      backend.new(requests).run do
        update_progress(total, done += 1)
      end

      after_fetch

      true
    rescue => e
      error(e)
      raise e
    end
222443
function _fetch() {
            vm.error = undefined;
            service.get({}, function (todos) {
                vm.todos = todos;
            }, function () {
                vm.todos = [];
                vm.error = 'An error occurred when fetching available todos';
            });
        }
1319848
def service(ctx):
    """"""

    install_service(ctx.obj['instance'], ctx.obj['dbhost'], ctx.obj['dbname'], ctx.obj['port'])
1278157
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return ExecutionInstance(
            self._version,
            payload,
            flow_sid=self._solution['flow_sid'],
            sid=self._solution['sid'],
        )
640545
def ready?
      running_services = launchctl.list.reject { |service| service.pid.to_i == 0 }.map(&:name)
      (required_services_for_ready - running_services).empty?
    end
269973
def get(self, service_name, **kwargs):
        """"""
        return self._send(requests.get, service_name, **kwargs)
916787
def get_missing_services(self, services):
        
        required_services = set(services)
        provided_services = set(self._services.keys())
        missing_services = required_services.difference(provided_services)

        return sorted(missing_services)
372
protected function fetchService()
	{
        $service = $this->getRouteParam('service');
        $service = $this->parseCanonicalName($service, true);
        
        if (preg_match($this->servicePattern, $service)) {
            return $service;
        } else {
            return false;
        }
    }
861684
def get_services(self):
        

        if self.services:
            return self.services

        url = 'http://api.embed.ly/1/services/python'

        http = httplib2.Http(timeout=self.timeout)
        headers = {'User-Agent': self.user_agent,
                   'Connection': 'close'}
        resp, content = http.request(url, headers=headers)

        if resp['status'] == '200':
            resp_data = json.loads(content.decode('utf-8'))
            self.services = resp_data

            # build the regex that we can use later
            _regex = []
            for each in self.services:
                _regex.append('|'.join(each.get('regex', [])))

            self._regex = re.compile('|'.join(_regex))

        return self.services
780410
def get_api_services_by_name(self):
        """"""
        if not self.services_by_name:
            self.services_by_name = dict({s.get('name'): s for s in self.conf
                                          .get("api")
                                          .get("services")})
        return self.services_by_name
649566
def _get_services(self, full_objects=False):
        
        bsc = api.get_tool("bika_setup_catalog")
        brains = bsc(portal_type="AnalysisService")
        if full_objects:
            return map(api.get_object, brains)
        return brains
1217321
def fetch(self, wait=0):
        
        if self.started:
            return fetch(self.id, wait=wait, cached=self.cached)
423521
def get_requires(self, ignored=tuple()):
        

        if self._requires is None:
            self._requires = set(self._get_requires())

        requires = self._requires
        return [req for req in requires if not fnmatches(req, *ignored)]
286160
def request_service(self, type, id=0):
        
        srvs = self.services_by_name.get(type)
        if not srvs:
            return

        ser = srvs[id]

        if not ser.system:
            ser.setup_system(self, id=id)
        return ser