Delete an tenant id
163058
def delete(self, id):
        
        resp = self.client.accounts.delete(id)
        self.display(resp)
371420
def delete(identity_id = '', service = '')
      fail BadParametersError, 'identity_id is required' if identity_id.empty?
      fail BadParametersError, 'service is required' if service.empty?

      DataSift.request(:DELETE, "account/identity/#{identity_id}/limit/#{service}", @config)
    end
551118
def remove_identity(cls, sh_db, ident_id):
        
        success = False
        try:
            api.delete_identity(sh_db, ident_id)
            logger.debug("Identity %s deleted", ident_id)
            success = True
        except Exception as e:
            logger.debug("Identity not deleted due to %s", str(e))

        return success
584966
def clear_dcnm_in_part(self, tenant_id, fw_dict, is_fw_virt=False):
        
        res = fw_const.DCNM_IN_PART_UPDDEL_SUCCESS
        tenant_name = fw_dict.get('tenant_name')
        ret = True
        try:
            self._update_partition_in_delete(tenant_name)
        except Exception as exc:
            LOG.error("Clear of In Partition failed for tenant %(tenant)s"
                      " , Exception %(exc)s",
                      {'tenant': tenant_id, 'exc': str(exc)})
            res = fw_const.DCNM_IN_PART_UPDDEL_FAIL
            ret = False
        self.update_fw_db_result(tenant_id, dcnm_status=res)
        LOG.info("In partition cleared off service ip addr")
        return ret
896680
def delete(instance_id, profile=None, **kwargs):
    '''
    

    '''
    conn = _auth(profile, **kwargs)
    return conn.delete(instance_id)
979564
def removeProperty(self, login, property):
    
    self.send_removeProperty(login, property)
    self.recv_removeProperty()
1056947
function (id) {
                var dynamicIds = this._dynamicIds;
                if (dynamicIds) {
                    var index = arrayUtils.indexOf(dynamicIds, id);
                    if (index != -1) {
                        idMgr.releaseId(id);
                        if (dynamicIds.length == 1) {
                            this._dynamicIds = null;
                        } else {
                            arrayUtils.removeAt(dynamicIds, index);
                        }
                    }
                }
            }
408464
def _fw_policy_delete(self, drvr_name, data):
        
        policy_id = data.get('firewall_policy_id')
        tenant_id = self.tenant_db.get_policy_tenant(policy_id)

        if tenant_id not in self.fwid_attr:
            LOG.error("Invalid tenant id for FW delete %s", tenant_id)
            return
        tenant_obj = self.fwid_attr[tenant_id]
        # Guess actual FW need not be deleted since if this is the active
        # policy, Openstack does not allow it to be deleted
        tenant_obj.delete_policy(policy_id)
        self.tenant_db.del_policy_tenant(policy_id)
678362
def delete_fabric_fw_internal(self, tenant_id, fw_dict, is_fw_virt,
                                  result):
        
        if not self.auto_nwk_create:
            LOG.info("Auto network creation disabled")
            return False
        try:
            tenant_name = fw_dict.get('tenant_name')
            fw_name = fw_dict.get('fw_name')
            if tenant_id not in self.service_attr:
                LOG.error("Service obj not created for tenant %s",
                          tenant_name)
                return False
            # A check for is_fabric_create is not needed since a delete
            # may be issued even when create is not completely done.
            # For example, some state such as create stuff in DCNM failed and
            # SM for create is in the process of retrying. A delete can be
            # issue at that time. If we have a check for is_fabric_create
            # then delete operation will not go through.
            if result == fw_const.RESULT_FW_DELETE_DONE:
                LOG.error("Fabric for tenant %s already deleted",
                          tenant_id)
                return True
            ret = self.run_delete_sm(tenant_id, fw_dict, is_fw_virt)
            self.service_attr[tenant_id].set_fabric_create(False)
            if ret:
                LOG.info("Delete SM completed successfully for tenant"
                         "%(tenant)s FW %(fw)s",
                         {'tenant': tenant_name, 'fw': fw_name})
                self.service_attr[tenant_id].destroy_local_fw_db()
                self.delete_serv_obj(tenant_id)
            else:
                LOG.error("Delete SM failed for tenant"
                          "%(tenant)s FW %(fw)s",
                          {'tenant': tenant_name, 'fw': fw_name})
            # TODO(padkrish) Equivalent of create_fw_db for delete.
        except Exception as exc:
            LOG.error("Exception raised in delete fabric int %s",
                      str(exc))
            return False
        return ret
398316
def revoke_lease(self, lease_id):
        
        lease_revoke_request = etcdrpc.LeaseRevokeRequest(ID=lease_id)
        self.leasestub.LeaseRevoke(
            lease_revoke_request,
            self.timeout,
            credentials=self.call_credentials,
            metadata=self.metadata
        )
823049
def remove_tenant_user(request, project=None, user=None, domain=None):
    """"""
    client = keystoneclient(request, admin=True)
    roles = client.roles.roles_for_user(user, project)
    for role in roles:
        remove_tenant_user_role(request, user=user, role=role.id,
                                project=project, domain=domain)
208533
def _fw_delete(self, drvr_name, data):
        
        fw_id = data.get('firewall_id')
        tenant_id = self.tenant_db.get_fw_tenant(fw_id)

        if tenant_id not in self.fwid_attr:
            LOG.error("Invalid tenant id for FW delete %s", tenant_id)
            return

        tenant_obj = self.fwid_attr[tenant_id]
        ret = self._check_delete_fw(tenant_id, drvr_name)
        if ret:
            tenant_obj.delete_fw(fw_id)
            self.tenant_db.del_fw_tenant(fw_id)
477040
def remove_tenant_from_flavor(request, flavor, tenant):
    """"""
    return _nova.novaclient(request).flavor_access.remove_tenant_access(
        flavor=flavor, tenant=tenant)
833738
function( userID, roomID ) {

		var userCount;

		if( roomUsers[ roomID ] === undefined ) {

			return promise.reject( 'No room with the id: ' + roomID );
		} else {

			var userIDX = roomUsers[ roomID ].indexOf( userID );

			if( userIDX != -1 ) {

				roomUsers[ roomID ].splice( userIDX, 1 );

				userCount = roomUsers[ roomID ].length;

				if( userCount == 0 ) {

					delete roomUsers[ roomID ];
				}

				return promise.resolve( userCount );
			} else {

				return promise.reject( 'User ' + userID + ' is not in the room: ' + roomID );
			}
		}
	}
765642
def delete_dcnm_in_nwk(self, tenant_id, fw_dict, is_fw_virt=False):
        
        tenant_name = fw_dict.get('tenant_name')
        ret = self._delete_service_nwk(tenant_id, tenant_name, 'in')
        if ret:
            res = fw_const.DCNM_IN_NETWORK_DEL_SUCCESS
            LOG.info("In Service network deleted for tenant %s",
                     tenant_id)
        else:
            res = fw_const.DCNM_IN_NETWORK_DEL_FAIL
            LOG.info("In Service network deleted failed for tenant %s",
                     tenant_id)
        self.update_fw_db_result(tenant_id, dcnm_status=res)
        return ret
1023408
public void clearTenant(String tenantId) {
        String index = getIndex(tenantId);

        synchronized (knownIndices) {
            IndicesAdminClient indices = client.admin().indices();

            boolean indexExists = indices.prepareExists(index)
                    .execute()
                    .actionGet()
                    .isExists();

            if (indexExists) {
                indices.prepareDelete(index)
                        .execute()
                        .actionGet();
            }

            knownIndices.remove(index);
        }
    }
685105
def scheduled_status_delete(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/scheduled_statuses/{0}'.format(str(id))
        self.__api_request('DELETE', url)