Detach the zone of a given <organization>.
356138
def detach_zone(organization_id_or_slug):
    ''''''
    organization = Organization.objects.get_by_id_or_slug(
        organization_id_or_slug)
    if not organization:
        exit_with_error(
            'No organization found for {0}'.format(organization_id_or_slug)
        )
    log.info('Detaching {organization} from {organization.zone}'.format(
             organization=organization))
    organization.zone = None
    organization.save()
    log.info('Done')
1339841
def move(zone, zonepath):
    '''
    
    '''
    ret = {'status': True}

    ## verify zone
    res = __salt__['cmd.run_all']('zoneadm {zone} move {path}'.format(
        zone='-u {0}'.format(zone) if _is_uuid(zone) else '-z {0}'.format(zone),
        path=zonepath,
    ))
    ret['status'] = res['retcode'] == 0
    ret['message'] = res['stdout'] if ret['status'] else res['stderr']
    ret['message'] = ret['message'].replace('zoneadm: ', '')
    if ret['message'] == '':
        del ret['message']

    return ret
946206
def remove_group_role(request, role, group, domain=None, project=None):
    """"""
    manager = keystoneclient(request, admin=True).roles
    return manager.revoke(role=role, group=group, project=project,
                          domain=domain)
676785
def delete_zone(args):
    
    if args.__dict__.get('domain'):
        domain = args.domain

    password = get_password(args)
    token = connect.get_token(args.username, password, args.server)
    processing.delete_zone(args.server, token, domain)
644169
private void cleanup() {
		if (zoomToRectangleGroup != null) {
			container.remove(zoomToRectangleGroup);
			zoomToRectangleGroup = null;
		}
		if (escapeHandler != null) {
			escapeHandler.removeHandler();
			escapeHandler = null;
		}
		mapPresenter.getContainerManager().removeVectorContainer(container);
	}
224136
def Detach(self):
    """"""
    for plugin in self.plugins:
      plugin.position = None
    self.inferior.Reinit(None)
1134981
async def remove(gc: GroupControl, slaves):
    """"""
    click.echo("Removing from existing group: %s" % slaves)
    click.echo(await gc.remove(slaves))
813503
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
    public static void detach(Activity activity, ViewTreeObserver.OnGlobalLayoutListener l) {
        ViewGroup contentView = activity.findViewById(android.R.id.content);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            contentView.getViewTreeObserver().removeOnGlobalLayoutListener(l);
        } else {
            //noinspection deprecation
            contentView.getViewTreeObserver().removeGlobalOnLayoutListener(l);
        }
    }
1063251
def detach(self):
        
        if self.parent is not None:
            if self in self.parent.children:
                self.parent.children.remove(self)
            self.parent = None
        return self
515193
def _detach_process(self):
        """"""
        # First fork to return control to the shell
        pid = os.fork()
        if pid > 0:
            # Wait for the first child, because it's going to wait and
            # check to make sure the second child is actually running
            # before exiting
            os.waitpid(pid, 0)
            sys.exit(0)

        # Become a process group and session group leader
        os.setsid()

        # Fork again so the session group leader can exit and to ensure
        # we can never regain a controlling terminal
        pid = os.fork()
        if pid > 0:
            time.sleep(1)
            # After waiting one second, check to make sure the second
            # child hasn't become a zombie already
            status = os.waitpid(pid, os.WNOHANG)
            if status[0] == pid:
                # The child is already gone for some reason
                exitcode = status[1] % 255
                self._emit_failed()
                self._emit_error('Child exited immediately with exit '
                                 'code {code}'.format(code=exitcode))
                sys.exit(exitcode)
            else:
                self._emit_ok()
                sys.exit(0)

        self._reset_file_descriptors()
1355776
public function removeProcessed()
    {
        if ( $this->hasAttribute( 'action' ) )
        {
            unset( $this->attributes['action'] );
        }

        if ( $this->getZoneCount() > 0 )
        {
            foreach ( $this->attributes['zones'] as $index => $zone )
            {
                if ( $zone->toBeRemoved() )
                    $this->removeZone($index);
                else
                    $zone->removeProcessed();
            }
        }
    }
564402
def remove(parent, idx):
  """"""
  if isinstance(parent, dict):
    del parent[idx]
  elif isinstance(parent, list):
    del parent[int(idx)]
  else:
    raise JSONPathError("Invalid path for operation")
1200127
def _detach_children(self):
        """"""
        children = [val[0] for val in self._children.values()]
        for child in children:
            child()._parent = list(self)
        self._children.clear()
771297
@Override
	public void removeProperty(Object key) {
	    if(key.equals(APIKey.ZONE))    
	    	return;
	    getZone().removeProperty(key);
	}
176331
def detach_events(self, *events):
        """"""
        reg = self.registry
        delete = defaultdict(list)

        # remove from self.events
        all_events = reg.events
        for e in events:
            regexp = getattr(e.regexp, 're', e.regexp)
            iotype = e.iotype
            if e in all_events[iotype].get(regexp, []):
                all_events[iotype][regexp].remove(e)
                if not all_events[iotype][regexp]:
                    del all_events[iotype][regexp]
                    # need to delete from self.events_re
                    delete[iotype].append(regexp)

        # delete from events_re
        for iotype, regexps in delete.items():
            reg.events_re[iotype] = [r for r in reg.events_re[iotype]
                                     if r[0] not in regexps]
55541
@Override
  void detach() {
    if (mode == Mode.ATTACHED) {
      byte[] bytes = new byte[binaryValue.remaining()];
      binaryValue.get(bytes);
      binaryValue = ByteBuffer.wrap(bytes);
      mode = Mode.DETACHED;
    } else {
      throw new IllegalStateException("OffHeapValueHolder in mode " + mode + " cannot be prepared for delayed deserialization");
    }
  }
371989
def _detach(self, fcp, assigner_id, target_wwpn, target_lun,
                multipath, os_version, mount_point):
        """"""
        LOG.info('Start to detach device from %s' % assigner_id)
        connections = self.fcp_mgr.decrease_fcp_usage(fcp, assigner_id)

        try:
            self._remove_disk(fcp, assigner_id, target_wwpn, target_lun,
                              multipath, os_version, mount_point)
            if not connections:
                self._undedicate_fcp(fcp, assigner_id)
        except (exception.SDKBaseException,
                exception.SDKSMTRequestFailed) as err:
            errmsg = 'rollback detach because error:' + err.format_message()
            LOG.error(errmsg)
            self.fcp_mgr.increase_fcp_usage(fcp, assigner_id)
            with zvmutils.ignore_errors():
                self._add_disk(fcp, assigner_id, target_wwpn, target_lun,
                               multipath, os_version, mount_point)
            raise exception.SDKBaseException(msg=errmsg)

        LOG.info('Detaching device to %s is done.' % assigner_id)