Retrieve accounts pertaining to named service.
186522
def list_service(ctx, name):
    """"""
    swag = create_swag_from_ctx(ctx)
    accounts = swag.get_service_enabled(name)

    _table = [[result['name'], result.get('id')] for result in accounts]
    click.echo(
        tabulate(_table, headers=["Account Name", "Account Number"])
    )
810530
def GetServiceObj(self,servicename):
        """"""
        for sobj in self.services:
            if sobj.GetName().lower()==servicename.lower():
                return sobj

        return None
77349
def services_by_name(self):
        
        srvs = defaultdict(list)
        for i in self.services:
            srvs[i.__class__.__name__].append(i)
        return srvs
143601
def get_account_service(self):
        """"""
        account_service_url = utils.get_subresource_path_by(self,
                                                            'AccountService')

        return (account_service.
                HPEAccountService(self._conn, account_service_url,
                                  redfish_version=self.redfish_version))
341466
def _get_service_account_info(self):
        """"""
        with open(self.service_account_file, 'r') as f:
            info = json.load(f)

        self.service_account_email = info.get('client_email')
        if not self.service_account_email:
            raise GCECloudException(
                'Service account JSON file is invalid for GCE. '
                'client_email key is expected. See getting started '
                'docs for information on GCE configuration.'
            )

        self.service_account_project = info.get('project_id')
        if not self.service_account_project:
            raise GCECloudException(
                'Service account JSON file is invalid for GCE. '
                'project_id key is expected. See getting started '
                'docs for information on GCE configuration.'
            )
416179
def accounts(self):
        
        from ofxclient.account import Account
        client = self.client()
        query = client.account_list_query()
        resp = client.post(query)
        resp_handle = StringIO(resp)

        if IS_PYTHON_2:
            parsed = OfxParser.parse(resp_handle)
        else:
            parsed = OfxParser.parse(BytesIO(resp_handle.read().encode()))

        return [Account.from_ofxparse(a, institution=self)
                for a in parsed.accounts]
580180
def account(self):
        
        data = self.query(Account.key)
        return Account(self, data)
563348
def _retrieve_info(self, request):
        
        info = _metadata.get_service_account_info(
            request,
            service_account=self._service_account_email)

        self._service_account_email = info['email']
        self._scopes = info['scopes']
256417
def get_transactions(self, account_id, **params):
        """"""
        response = self._get('v2', 'accounts', account_id, 'transactions', params=params)
        return self._make_api_object(response, Transaction)
239249
def service_account_email(self):
        """"""
        if self._service_account_id is None:
            self._service_account_id = app_identity.get_service_account_name()
        return self._service_account_id
50065
def get_deposits(self, account_id, **params):
        """"""
        response = self._get('v2', 'accounts', account_id, 'deposits', params=params)
        return self._make_api_object(response, Deposit)
975527
def QA_fetch_account(message={}, db=DATABASE):
    
    collection = DATABASE.account
    return [res for res in collection.find(message, {"_id": 0})]
378114
def _get_external_accounts(self, locals):
        '''
        
        '''
        users = dict()
        out = __salt__['cmd.run_all']("passwd -S -a")
        if out['retcode']:
            # System does not supports all accounts descriptions, just skipping.
            return users
        status = {'L': 'Locked', 'NP': 'No password', 'P': 'Usable password', 'LK': 'Locked'}
        for data in [elm.strip().split(" ") for elm in out['stdout'].split(os.linesep) if elm.strip()]:
            if len(data) < 2:
                continue
            name, login = data[:2]
            if name not in locals:
                users[name] = {
                    'login': login,
                    'status': status.get(login, 'N/A')
                }

        return users
390097
def GetServices(self,filename):
        """"""
        objlist=[]
        for sobj in self.services:
            if sobj.KnowsFile(filename) :
                objlist.append(sobj)

        if len(objlist)==0:
            return None

        return objlist
928841
def get_services(cls, request=None):
        
        return {service['name']: reverse(service['list_view'], request=request)
                for service in cls._registry.values()}
1011829
def accounts(self):
        
        if self._accounts is None:
            from twilio.rest.accounts import Accounts
            self._accounts = Accounts(self)
        return self._accounts
800367
def get_service_by_name(self, service_name):
		""""""
		content = self._fetch("/service/search?name=%s" % service_name)
		return FastlyService(self, content)