do not use this unless you want a list of all roles(vms) in your subscription
557902
def all
      @roles = Array.new
      @connection.deploys.all.each do |deploy|
        deploy.roles.each do |role|
          @roles << role
        end
      end
      @roles
    end
229499
def _bse_cli_list_roles(args):
    ''''''
    all_roles = api.get_roles()

    if args.no_description:
        liststr = all_roles.keys()
    else:
        liststr = format_columns(all_roles.items())

    return '\n'.join(liststr)
713193
def role_search(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.search_roles(**kwargs)
1257094
def remove_group_roles(request, group, domain=None, project=None):
    """"""
    client = keystoneclient(request, admin=True)
    roles = client.roles.list(group=group, domain=domain, project=project)
    for role in roles:
        remove_group_role(request, role=role.id, group=group,
                          domain=domain, project=project)
110155
def list_vm_images_sub(access_token, subscription_id):
    '''
    '''
    endpoint = ''.join([get_rm_endpoint(),
                        '/subscriptions/', subscription_id,
                        '/providers/Microsoft.Compute/images',
                        '?api-version=', COMP_API])
    return do_get_next(endpoint, access_token)
1019196
function sanitize(options, blacklist) {
  const opts = Object.assign({}, options);
  const defaults = ['apiurl', 'token', 'username', 'password', 'placeholders', 'bearer'];
  const keys = union([], defaults, blacklist);
  return omit(opts, keys);
}
1033523
public void removeAll() {
    LOGGER.debug("Removing {} reverse connections from subscription manager", reverse.size());
    Iterator<HomekitClientConnection> i = reverse.keySet().iterator();
    while (i.hasNext()) {
      HomekitClientConnection connection = i.next();
      LOGGER.debug("Removing connection {}", connection.hashCode());
      removeConnection(connection);
    }
    LOGGER.debug("Subscription sizes are {} and {}", reverse.size(), subscriptions.size());
  }
660716
def list_subscriptions(self, service):
        """"""
        data = {
            'service': service,
        }
        return self._perform_post_request(self.list_subscriptions_endpoint, data, self.token_header)
482470
def create_all(self):
        '''
        
        '''
        ret = []

        for vm_name, vm_details in six.iteritems(self.opts['profiles']):
            ret.append(
                {vm_name: self.create(vm_details)}
            )

        return ret
968342
def list_vns(call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The list_vns function must be called with -f or --function.'
        )

    server, user, password = _get_xml_rpc()
    auth = ':'.join([user, password])
    vn_pool = server.one.vnpool.info(auth, -2, -1, -1)[1]

    vns = {}
    for v_network in _get_xml(vn_pool):
        vns[v_network.find('NAME').text] = _xml_to_dict(v_network)

    return vns
708892
function unsubscribe() {
    var _this = this;
    var dataBindings = Reflect.getMetadata(constance_1.STATEX_DATA_BINDINGS_KEY, this);
    if (dataBindings != undefined) {
        var subscriptions = dataBindings.subscriptions || [];
        subscriptions.forEach(function (item) { return item.target === _this && item.subscription != undefined && item.subscription.unsubscribe(); });
        dataBindings.subscriptions = subscriptions.filter(function (item) { return item.target !== _this; });
        Reflect.defineMetadata(constance_1.STATEX_DATA_BINDINGS_KEY, dataBindings, this);
    }
}
1009777
def role_assignment_list(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.list_role_assignments(**kwargs)
1222626
def role_entities(self):
        
        return [self.service.roles[name] for name in self.content.roles]
407764
def network_security_groups_list_all(**kwargs):  # pylint: disable=invalid-name
    '''
    

    '''
    result = {}
    netconn = __utils__['azurearm.get_client']('network', **kwargs)
    try:
        secgroups = __utils__['azurearm.paged_object_to_list'](
            netconn.network_security_groups.list_all()
        )
        for secgroup in secgroups:
            result[secgroup['name']] = secgroup
    except CloudError as exc:
        __utils__['azurearm.log_cloud_error']('network', str(exc), **kwargs)
        result = {'error': str(exc)}

    return result
465201
def role_list(endpoint_id):
    
    client = get_client()
    roles = client.endpoint_role_list(endpoint_id)

    resolved_ids = LazyIdentityMap(
        x["principal"] for x in roles if x["principal_type"] == "identity"
    )

    def principal_str(role):
        principal = role["principal"]
        if role["principal_type"] == "identity":
            username = resolved_ids.get(principal)
            return username or principal
        elif role["principal_type"] == "group":
            return (u"https://app.globus.org/groups/{}").format(principal)
        else:
            return principal

    formatted_print(
        roles,
        fields=[
            ("Principal Type", "principal_type"),
            ("Role ID", "id"),
            ("Principal", principal_str),
            ("Role", "role"),
        ],
    )
293707
def delete_subscriptions(self):
        
        warnings.warn('This could be slow for large numbers of connected devices.'
                      'If possible, explicitly delete subscriptions known to have been created.')
        for device in self.list_connected_devices():
            try:
                self.delete_device_subscriptions(device_id=device.id)
            except CloudApiException as e:
                LOG.warning('failed to remove subscription for %s: %s', device.id, e)
                continue
1039855
def list_container_services_sub(access_token, subscription_id):
    '''
   '''
    endpoint = ''.join([get_rm_endpoint(),
                        '/subscriptions/', subscription_id,
                        '/providers/Microsoft.ContainerService/ContainerServices',
                        '?api-version=', ACS_API])
    return do_get(endpoint, access_token)