Create a Node Group Template.
485477
def create(self, name, plugin_name, plugin_version, flavor_id,
               description=None, volumes_per_node=None, volumes_size=None,
               node_processes=None, node_configs=None, floating_ip_pool=None,
               security_groups=None, auto_security_group=None,
               availability_zone=None, volumes_availability_zone=None,
               volume_type=None, image_id=None, is_proxy_gateway=None,
               volume_local_to_instance=None, use_autoconfig=None,
               shares=None, is_public=None, is_protected=None,
               volume_mount_prefix=None, boot_from_volume=None,
               boot_volume_type=None, boot_volume_availability_zone=None,
               boot_volume_local_to_instance=None):
        """"""

        data = {
            'name': name,
            'plugin_name': plugin_name,
            'plugin_version': plugin_version,
            'flavor_id': flavor_id,
            'node_processes': node_processes
        }

        return self._do_create(data, description, volumes_per_node,
                               volumes_size, node_configs, floating_ip_pool,
                               security_groups, auto_security_group,
                               availability_zone, volumes_availability_zone,
                               volume_type, image_id, is_proxy_gateway,
                               volume_local_to_instance, use_autoconfig,
                               shares, is_public, is_protected,
                               volume_mount_prefix, boot_from_volume,
                               boot_volume_type,
                               boot_volume_availability_zone,
                               boot_volume_local_to_instance)
232861
def _MakeGroupFromRootSection(root_section, undefined_str):
    
    group = {}
    for statement in root_section.Statements():
        if isinstance(statement, six.string_types):
            continue
        func, args = statement
        # here the function acts as ID for the block type
        if func is _DoDef and isinstance(args, _Section):
            section = args
            # Construct a Template instance from a this _Section subtree
            t = Template._FromSection(section, group, undefined_str)
            group[section.section_name] = t
    return group
459098
def create_record_set_group(self, name, g_dict):
        """"""
        rs = route53.RecordSetGroup.from_dict(name, g_dict)
        rs = add_hosted_zone_id_if_missing(rs, self.hosted_zone_id)
        rs = self.add_hosted_zone_id_for_alias_target_if_missing(rs)
        return self.template.add_resource(rs)
862551
def group_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/groups.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
808889
def _create_node(self, name, parent, children, data):
        """"""
        self._db[name] = {"parent": parent, "children": children, "data": data}
848613
def get_network_as_xml_template(network_id,**kwargs):
    
    template_xml = etree.Element("template_definition")

    net_i = db.DBSession.query(Network).filter(Network.id==network_id).one()

    template_name = etree.SubElement(template_xml, "template_name")
    template_name.text = "TemplateType from Network %s"%(net_i.name)
    layout = _get_layout_as_etree(net_i.layout)

    resources = etree.SubElement(template_xml, "resources")
    if net_i.attributes:
        net_resource    = etree.SubElement(resources, "resource")

        resource_type   = etree.SubElement(net_resource, "type")
        resource_type.text   = "NETWORK"

        resource_name   = etree.SubElement(net_resource, "name")
        resource_name.text   = net_i.name

        layout = _get_layout_as_etree(net_i.layout)
        if layout is not None:
            net_resource.append(layout)

        for net_attr in net_i.attributes:
            _make_attr_element_from_resourceattr(net_resource, net_attr)

        resources.append(net_resource)

    existing_types = {'NODE': [], 'LINK': [], 'GROUP': []}
    for node_i in net_i.nodes:
        node_attributes = node_i.attributes
        attr_ids = [res_attr.attr_id for res_attr in node_attributes]
        if len(attr_ids) > 0 and attr_ids not in existing_types['NODE']:

            node_resource    = etree.Element("resource")

            resource_type   = etree.SubElement(node_resource, "type")
            resource_type.text   = "NODE"

            resource_name   = etree.SubElement(node_resource, "name")
            resource_name.text   = node_i.node_name

            layout = _get_layout_as_etree(node_i.layout)

            if layout is not None:
                node_resource.append(layout)

            for node_attr in node_attributes:
                _make_attr_element_from_resourceattr(node_resource, node_attr)

            existing_types['NODE'].append(attr_ids)
            resources.append(node_resource)

    for link_i in net_i.links:
        link_attributes = link_i.attributes
        attr_ids = [link_attr.attr_id for link_attr in link_attributes]
        if len(attr_ids) > 0 and attr_ids not in existing_types['LINK']:
            link_resource    = etree.Element("resource")

            resource_type   = etree.SubElement(link_resource, "type")
            resource_type.text   = "LINK"

            resource_name   = etree.SubElement(link_resource, "name")
            resource_name.text   = link_i.link_name

            layout = _get_layout_as_etree(link_i.layout)

            if layout is not None:
                link_resource.append(layout)

            for link_attr in link_attributes:
                _make_attr_element_from_resourceattr(link_resource, link_attr)

            existing_types['LINK'].append(attr_ids)
            resources.append(link_resource)

    for group_i in net_i.resourcegroups:
        group_attributes = group_i.attributes
        attr_ids = [group_attr.attr_id for group_attr in group_attributes]
        if len(attr_ids) > 0 and attr_ids not in existing_types['GROUP']:
            group_resource    = etree.Element("resource")

            resource_type   = etree.SubElement(group_resource, "type")
            resource_type.text   = "GROUP"

            resource_name   = etree.SubElement(group_resource, "name")
            resource_name.text   = group_i.group_name


            for group_attr in group_attributes:
                _make_attr_element_from_resourceattr(group_resource, group_attr)

            existing_types['GROUP'].append(attr_ids)
            resources.append(group_resource)

    xml_string = etree.tostring(template_xml, encoding="unicode")

    return xml_string
613367
function () {
		
		// Create Layout
		this._el.message = TL.Dom.create("div", "tl-timegroup-message", this._el.container);
		this._el.message.innerHTML = this.data.label;
		
		
	}
263028
function createSwigTemplates() {
   swig.setFilter( 'wrap', ( input, wrapper, condition ) =>
      condition === undefined || condition ? wrapper + input + wrapper : input
   );
   swig.setFilter( 'if', ( input, condition ) => condition ? input : '' );
   swig.setFilter( 'replaceLinks', ( input, condition ) => condition ? input : '' );
   swig.setDefaults( {
      autoescape: false,
      locals: {
         isFunction
      }
   } );

   const templateDir = templateName => path.join( __dirname, `../templates/${templateName}.md.tmpl` );
   return {
      doc: swig.compileFile( templateDir( 'doc_template' ) ),
      toc: swig.compileFile( templateDir( 'toc_template' ) ),
      type: swig.compileFile( templateDir( 'type_template' ) ),
      function: swig.compileFile( templateDir( 'function_template' ) ),
      property: swig.compileFile( templateDir( 'property_template' ) )
   };
}
644275
def xgroup_create(self, name, groupname, id='$', mkstream=False):
        
        pieces = ['XGROUP CREATE', name, groupname, id]
        if mkstream:
            pieces.append(Token.get_token('MKSTREAM'))
        return self.execute_command(*pieces)
489262
private CmsGroupContainerElementPanel createGroupcontainer(
        Element element,
        I_CmsDropContainer dragParent,
        CmsContainerElement elementData) {

        CmsGroupContainerElementPanel groupContainer = new CmsGroupContainerElementPanel(
            element,
            dragParent,
            elementData.getClientId(),
            elementData.getSitePath(),
            elementData.getResourceType(),
            elementData.getNoEditReason(),
            elementData.getTitle(),
            elementData.getSubTitle(),
            elementData.hasSettings(dragParent.getContainerId()),
            elementData.hasViewPermission(),
            elementData.hasWritePermission(),
            elementData.isReleasedAndNotExpired(),
            elementData.getElementView(),
            elementData.getBigIconClasses());
        return groupContainer;
    }
1209789
private Node createTemplateParameterNode(int index, JSType type, boolean isStringLiteral) {
    checkState(index >= 0);
    checkNotNull(type);
    Node n = Node.newNumber(index);
    if (isStringLiteral) {
      n.setToken(TEMPLATE_STRING_LITERAL);
    } else {
      n.setToken(TEMPLATE_TYPE_PARAM);
    }
    n.setJSType(type);
    return n;
  }
1213414
def create_template(template_document, template_name, opts = {})
      data, _status_code, _headers = create_template_with_http_info(template_document, template_name, opts)
      data
    end
321824
def _create_header(self):
        
        # Retrieve the node to which we will append the group header.
        CstmrDrctDbtInitn_node = self._xml.find('CstmrDrctDbtInitn')

        # Create the header nodes.
        GrpHdr_node = ET.Element("GrpHdr")
        MsgId_node = ET.Element("MsgId")
        CreDtTm_node = ET.Element("CreDtTm")
        NbOfTxs_node = ET.Element("NbOfTxs")
        CtrlSum_node = ET.Element("CtrlSum")
        InitgPty_node = ET.Element("InitgPty")
        Nm_node = ET.Element("Nm")
        SupId_node = ET.Element("Id")
        OrgId_node = ET.Element("OrgId")
        Othr_node = ET.Element("Othr")
        Id_node = ET.Element("Id")

        # Add data to some header nodes.
        MsgId_node.text = self.msg_id
        CreDtTm_node.text = datetime.datetime.now().strftime('%Y-%m-%dT%H:%M:%S')
        Nm_node.text = self._config['name']
        Id_node.text = self._config['creditor_id']

        # Append the nodes
        Othr_node.append(Id_node)
        OrgId_node.append(Othr_node)
        SupId_node.append(OrgId_node)
        InitgPty_node.append(Nm_node)
        InitgPty_node.append(SupId_node)
        GrpHdr_node.append(MsgId_node)
        GrpHdr_node.append(CreDtTm_node)
        GrpHdr_node.append(NbOfTxs_node)
        GrpHdr_node.append(CtrlSum_node)
        GrpHdr_node.append(InitgPty_node)

        # Append the header to its parent
        CstmrDrctDbtInitn_node.append(GrpHdr_node)
492176
def create_node_group(self):
        
        self.create_stack(
            self.node_group_name,
            'amazon-eks-nodegroup.yaml',
            capabilities=['CAPABILITY_IAM'],
            parameters=define_parameters(
                ClusterName=self.cluster_name,
                ClusterControlPlaneSecurityGroup=self.security_groups,
                Subnets=self.subnet_ids,
                VpcId=self.vpc_ids,
                KeyName=self.ssh_key_name,
                NodeAutoScalingGroupMaxSize="1",
                NodeVolumeSize="100",
                NodeImageId="ami-0a54c984b9f908c81",
                NodeGroupName=f"{self.name} OnDemand Nodes"
            )
        )
820492
def _build_block_context(template, context):
    """"""

    # Ensure there's a BlockContext before rendering. This allows blocks in
    # ExtendsNodes to be found by sub-templates (allowing {{ block.super }} and
    # overriding sub-blocks to work).
    if BLOCK_CONTEXT_KEY not in context.render_context:
        context.render_context[BLOCK_CONTEXT_KEY] = BlockContext()
    block_context = context.render_context[BLOCK_CONTEXT_KEY]

    for node in template.nodelist:
        if isinstance(node, ExtendsNode):
            compiled_parent = node.get_parent(context)

            # Add the parent node's blocks to the context. (This ends up being
            # similar logic to ExtendsNode.render(), where we're adding the
            # parent's blocks to the context so a child can find them.)
            block_context.add_blocks(
                {n.name: n for n in compiled_parent.nodelist.get_nodes_by_type(BlockNode)})

            _build_block_context(compiled_parent, context)
            return compiled_parent

        # The ExtendsNode has to be the first non-text node.
        if not isinstance(node, TextNode):
            break
632813
private Node createTemplateNode() {
    // The Node type choice is arbitrary.
    Node templateNode = new Node(Token.SCRIPT);
    templateNode.setStaticSourceFile(sourceFile);
    return templateNode;
  }
787812
function buildContainerGroups() {
            let container = svg
              .append('g')
                .classed('legend-container-group', true)
                .attr('transform', `translate(${margin.left},${margin.top})`);

            container
              .append('g')
                .classed('legend-group', true);
        }