Append group to a new parent.

        group and parent must be v1Group-instances.
18857
def move_group(self, group = None, parent = None):
        

        if group is None or type(group) is not v1Group:
            raise KPError("A valid group must be given.")
        elif parent is not None and type(parent) is not v1Group:
            raise KPError("parent must be a v1Group.")
        elif group is parent:
            raise KPError("group and parent must not be the same group")
        if parent is None:
            parent = self.root_group
        if group in self.groups:
            self.groups.remove(group)
            group.parent.children.remove(group)
            group.parent = parent
            if parent.children:
                if parent.children[-1] is self.groups[-1]:
                    self.groups.append(group)
                else:
                    new_index = self.groups.index(parent.children[-1]) + 1
                    self.groups.insert(new_index, group)
            else:
                new_index = self.groups.index(parent) + 1
                self.groups.insert(new_index, group)
            parent.children.append(group)
            if parent is self.root_group:
                group.level = 0
            else:
                group.level = parent.level + 1
            if group.children:
                self._move_group_helper(group)
            group.last_mod = datetime.now().replace(microsecond=0)
            return True
        else:
            raise KPError("Didn't find given group.")
1263816
def children_of_group(self, group: Union[str, Group]) -> Set[Host]:
        
        hosts: List[Host] = set()
        for host in self.hosts.values():
            if host.has_parent_group(group):
                hosts.add(host)
        return hosts
585698
def add_parent(self,node):
    
    if not isinstance(node, (CondorDAGNode,CondorDAGManNode) ):
      raise CondorDAGNodeError, "Parent must be a CondorDAGNode or a CondorDAGManNode"
    self.__parents.append( node )
988701
def _append_node(self, child):
        """"""
        # pylint: disable=no-member; depending by the class
        # which uses the current class as a mixin or base class.
        # It's rewritten in 2.0, so it makes no sense for now
        # to spend development time on it.
        self.body.append(child)
        child.parent = self
118560
def _append_to_parent(self):
        

        if self.__appended:
            return

        if self._parent is not None:
            self._parent.append_fresh_table(self)

        self.__appended = True
994697
def _init_groups(self):
        
        for group_id, conf in self.group_conf.items():
            self.parent_input_dict[group_id] = Queue(conf.get('input_max_size', 0))
            self.parent_output_dict[group_id] = Queue(conf.get('output_max_size', 0))
1258864
def add_node_parents(root: ast.AST) -> None:
    
    for node in ast.walk(root):
        for child in ast.iter_child_nodes(node):
            child.parent = node
1189618
def merge(self, parent=None):
        
        # Check parent, append source files
        if parent is None:
            parent = self.parent
        if parent is None:
            return
        self.sources = parent.sources + self.sources
        # Merge child data with parent data
        data = copy.deepcopy(parent.data)
        for key, value in sorted(self.data.items()):
            # Handle attribute adding
            if key.endswith('+'):
                key = key.rstrip('+')
                if key in data:
                    # Use dict.update() for merging dictionaries
                    if type(data[key]) == type(value) == dict:
                        data[key].update(value)
                        continue
                    try:
                        value = data[key] + value
                    except TypeError as error:
                        raise utils.MergeError(
                            "MergeError: Key '{0}' in {1} ({2}).".format(
                                key, self.name, str(error)))
            # And finally update the value
            data[key] = value
        self.data = data
696210
def add(self, node):
        
        self.sons.append(node)
        node.parent = self
441371
def add(self, parent, obj_type, **attributes):
        
        return self.ixnCommand('add', parent.obj_ref(), obj_type, get_args_pairs(attributes))
512771
def append(self, element):
        """"""
        try:
            self.root.append(element.root)
        except AttributeError:
            self.root.append(GroupElement(element).root)
1187161
def add_group(self, name, devices):
        
        device = self.add_device(name, "group")
        device.add_to_group(devices)
        return device
1180656
def append_child(self, child):
        
        child.parent = self
        self.children.append(child)
        self.changed()
613423
def add_to_group(self, group, user):
        
        data = {'group': group, 'user': user}
        return self.post('addUserToGroup', data)
1317126
private void addChild(Session session, GroupImpl parent, GroupImpl child, boolean broadcast) throws Exception
   {
      Node parentNode = utils.getGroupNode(session, parent);
      Node groupNode =
         parentNode.addNode(child.getGroupName(), JCROrganizationServiceImpl.JOS_HIERARCHY_GROUP_NODETYPE);

      String parentId = parent == null ? null : parent.getId();

      child.setParentId(parentId);
      child.setInternalId(groupNode.getUUID());

      if (broadcast)
      {
         preSave(child, true);
      }

      writeGroup(child, groupNode);
      session.save();

      putInCache(child);

      if (broadcast)
      {
         postSave(child, true);
      }
   }
901528
def create_cgroup(self, name):
        
        node = Node(name, parent=self)
        if node in self.children:
            raise RuntimeError('Node {} already exists under {}'.format(name, self.path))

        name = name.encode()
        fp = os.path.join(self.full_path, name)
        os.mkdir(fp)
        self.children.append(node)
        return node
728594
def add_parent(self, id, pid, relation='subClassOf'):
        
        g = self.get_graph()
        g.add_edge(pid, id, pred=relation)