Create security groups as defined in the configs.
505507
def create_awslambda(self):
        """"""
        utils.banner("Creating Lambda Function")
        awslambdaobj = awslambda.LambdaFunction(
            app=self.app, env=self.env, region=self.region, prop_path=self.json_path)
        awslambdaobj.create_lambda_function()

        utils.banner("Creating Lambda Event")
        lambdaeventobj = awslambda.LambdaEvent(app=self.app, env=self.env, region=self.region, prop_path=self.json_path)
        lambdaeventobj.create_lambda_events()
417845
def add_security_group(self, name, isc_id, comment=None):
        
        return SecurityGroup.create(
            name=name,
            isc_id=isc_id,
            vss_container=self,
            comment=comment)
1037487
def cli(env, name, description):
    """"""
    mgr = SoftLayer.NetworkManager(env.client)

    result = mgr.create_securitygroup(name, description)
    table = formatting.KeyValueTable(['name', 'value'])
    table.align['name'] = 'r'
    table.align['value'] = 'l'
    table.add_row(['id', result['id']])
    table.add_row(['name',
                   result.get('name') or formatting.blank()])
    table.add_row(['description',
                   result.get('description') or formatting.blank()])
    table.add_row(['created', result['createDate']])

    env.fout(table)
901204
def cli(env, sortby, limit):
    """"""

    mgr = SoftLayer.NetworkManager(env.client)

    table = formatting.Table(COLUMNS)
    table.sortby = sortby

    sgs = mgr.list_securitygroups(limit=limit)
    for secgroup in sgs:
        table.add_row([
            secgroup['id'],
            secgroup.get('name') or formatting.blank(),
            secgroup.get('description') or formatting.blank(),
        ])

    env.fout(table)
1304042
def create_security_group(self, name, desc=None):
        '''
        
        '''
        body = {'security_group': {'name': name,
                                   'description': desc}}
        return self.network_conn.create_security_group(body=body)
75955
def create(self, name, plugin_name, plugin_version,
               cluster_template_id=None, default_image_id=None,
               is_transient=None, description=None, cluster_configs=None,
               node_groups=None, user_keypair_id=None,
               anti_affinity=None, net_id=None, count=None,
               use_autoconfig=None, shares=None,
               is_public=None, is_protected=None):
        """"""

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

        return self._do_create(data, cluster_template_id, default_image_id,
                               is_transient, description, cluster_configs,
                               node_groups, user_keypair_id, anti_affinity,
                               net_id, count, use_autoconfig, shares,
                               is_public, is_protected, api_ver=2)
1234969
def create_group_dampening(dampening)
      ret = http_post "triggers/groups/#{dampening.trigger_id}/dampenings", dampening.to_h
      Trigger::Dampening.new(ret)
    end
621217
public void setDefaultSecurityGroupNames(java.util.Collection<String> defaultSecurityGroupNames) {
        if (defaultSecurityGroupNames == null) {
            this.defaultSecurityGroupNames = null;
            return;
        }

        this.defaultSecurityGroupNames = new com.amazonaws.internal.SdkInternalList<String>(defaultSecurityGroupNames);
    }
1147325
def security_group_id
      resp = ec2.describe_security_groups(filters: [
        {name: "vpc-id", values: [vpc_id]},
        {name: "group-name", values: ["default"]}
      ])
      resp.security_groups.first.group_id
    end
241945
def sync_auth_groups():
    
    from django.conf import settings
    from django.contrib.auth.models import Group, Permission
    from django.db.models import Q

    for data in settings.AUTH_GROUPS:
        g1 = Group.objects.get_or_create(name=data['name'])[0]
        g1.permissions.clear()
        g1.save()
        args = []
        print('*** Created group %s' % g1.name)
        for perm in data['permissions']:
            print(perm)
            args.append(Q(codename=perm[0], content_type__app_label=perm[1]))
            print('   *** Created permission %s' % perm[0])

        g1.permissions.add(*list(Permission.objects.filter(
            reduce(OR, args)
        )))
758411
public void setInputSecurityGroups(java.util.Collection<InputSecurityGroup> inputSecurityGroups) {
        if (inputSecurityGroups == null) {
            this.inputSecurityGroups = null;
            return;
        }

        this.inputSecurityGroups = new java.util.ArrayList<InputSecurityGroup>(inputSecurityGroups);
    }
981215
def create_usuario_grupo(self):
        """"""
        return UsuarioGrupo(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
809502
protected function createConfigs($groups, $permissions, ContainerBuilder $container)
    {
        $configManager = $container->findDefinition(ConfigManagerInterface::class);

        foreach ($groups as $groupCode => $group)
        {
            $pathPrefix = $container->getParameter('expansion.admin_groups.config.path') . "/$groupCode";

            $id = 'expansion.admin_groups.config.label.' . $groupCode;
            $container->setDefinition($id, new ChildDefinition('expansion.admin_groups.config.label.abstract'))
                ->replaceArgument('$path', "$pathPrefix/label")
                ->replaceArgument('$defaultValue', $group['label']);
            $configManager->addMethodCall('registerConfig', [new Reference($id), $id]);

            $id = 'expansion.admin_groups.config.logins.' . $groupCode;
            $container->setDefinition($id, new ChildDefinition('expansion.admin_groups.config.logins.abstract'))
                ->setArgument('$path', "$pathPrefix/logins")
                ->setArgument('$defaultValue', $group['logins']);
            $configManager->addMethodCall('registerConfig', [new Reference($id), $id]);

            if ($groupCode != "master_admin") {
                foreach ($permissions as $permission) {
                    $id = 'expansion.admin_groups.config.permissions.' . $groupCode . ".$permission";
                    $container->setDefinition($id, new ChildDefinition('expansion.admin_groups.config.permissions.abstract'))
                        ->setArgument('$path', "$pathPrefix/perm_$permission")
                        ->setArgument('$defaultValue', $group['logins'])
                        ->setArgument('$name', "expansion_admingroups.permission.$permission.label")
                        ->setArgument('$description', "expansion_admingroups.permission.$permission.description");
                    $configManager->addMethodCall('registerConfig', [new Reference($id), $id]);
                }
            }
        }
    }
55798
def group_create(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(keep_name=True, **kwargs)
    return cloud.create_group(**kwargs)
1189442
def cli(env, securitygroup_id):
    """"""
    mgr = SoftLayer.NetworkManager(env.client)
    if not mgr.delete_securitygroup(securitygroup_id):
        raise exceptions.CLIAbort("Failed to delete security group")
877045
async def create(gc: GroupControl, name, slaves):
    """"""
    click.echo("Creating group %s with slaves: %s" % (name, slaves))
    click.echo(await gc.create(name, slaves))
619731
def create_cache_security_group(name, description, region=None, key=None,
                                keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    created = conn.create_cache_security_group(name, description)
    if created:
        log.info('Created cache security group %s.', name)
        return True
    else:
        msg = 'Failed to create cache security group {0}.'.format(name)
        log.error(msg)
        return False