partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
valid
GCPCache.get
Retrieve key from Cache. :param key: key to look up in cache. :type key: ``object`` :param delete_if_expired: remove value from cache if it is expired. Default is True. :type delete_if_expired: ``bool`` :returns: value from cache or None ...
cloudaux/gcp/gcpcache.py
def get(self, key, delete_if_expired=True): """ Retrieve key from Cache. :param key: key to look up in cache. :type key: ``object`` :param delete_if_expired: remove value from cache if it is expired. Default is True. :type delete_if_exp...
def get(self, key, delete_if_expired=True): """ Retrieve key from Cache. :param key: key to look up in cache. :type key: ``object`` :param delete_if_expired: remove value from cache if it is expired. Default is True. :type delete_if_exp...
[ "Retrieve", "key", "from", "Cache", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/gcpcache.py#L16-L44
[ "def", "get", "(", "self", ",", "key", ",", "delete_if_expired", "=", "True", ")", ":", "self", ".", "_update_cache_stats", "(", "key", ",", "None", ")", "if", "key", "in", "self", ".", "_CACHE", ":", "(", "expiration", ",", "obj", ")", "=", "self", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
GCPCache.insert
Insert item into cache. :param key: key to look up in cache. :type key: ``object`` :param obj: item to store in cache. :type obj: varies :param future_expiration_minutes: number of minutes item is valid :type param: ``int`` :returns: True :rtype: ``boo...
cloudaux/gcp/gcpcache.py
def insert(self, key, obj, future_expiration_minutes=15): """ Insert item into cache. :param key: key to look up in cache. :type key: ``object`` :param obj: item to store in cache. :type obj: varies :param future_expiration_minutes: number of minutes item is va...
def insert(self, key, obj, future_expiration_minutes=15): """ Insert item into cache. :param key: key to look up in cache. :type key: ``object`` :param obj: item to store in cache. :type obj: varies :param future_expiration_minutes: number of minutes item is va...
[ "Insert", "item", "into", "cache", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/gcpcache.py#L46-L64
[ "def", "insert", "(", "self", ",", "key", ",", "obj", ",", "future_expiration_minutes", "=", "15", ")", ":", "expiration_time", "=", "self", ".", "_calculate_expiration", "(", "future_expiration_minutes", ")", "self", ".", "_CACHE", "[", "key", "]", "=", "("...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
GCPCache._update_cache_stats
Update the cache stats. If no cache-result is specified, we iniitialize the key. Otherwise, we increment the correct cache-result. Note the behavior for expired. A client can be expired and the key still exists.
cloudaux/gcp/gcpcache.py
def _update_cache_stats(self, key, result): """ Update the cache stats. If no cache-result is specified, we iniitialize the key. Otherwise, we increment the correct cache-result. Note the behavior for expired. A client can be expired and the key still exists. ...
def _update_cache_stats(self, key, result): """ Update the cache stats. If no cache-result is specified, we iniitialize the key. Otherwise, we increment the correct cache-result. Note the behavior for expired. A client can be expired and the key still exists. ...
[ "Update", "the", "cache", "stats", ".", "If", "no", "cache", "-", "result", "is", "specified", "we", "iniitialize", "the", "key", ".", "Otherwise", "we", "increment", "the", "correct", "cache", "-", "result", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/gcpcache.py#L77-L91
[ "def", "_update_cache_stats", "(", "self", ",", "key", ",", "result", ")", ":", "if", "result", "is", "None", ":", "self", ".", "_CACHE_STATS", "[", "'access_stats'", "]", ".", "setdefault", "(", "key", ",", "{", "'hit'", ":", "0", ",", "'miss'", ":", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
GCPCache.get_access_details
Get access details in cache.
cloudaux/gcp/gcpcache.py
def get_access_details(self, key=None): """Get access details in cache.""" if key in self._CACHE_STATS: return self._CACHE_STATS['access_stats'][key] else: return self._CACHE_STATS['access_stats']
def get_access_details(self, key=None): """Get access details in cache.""" if key in self._CACHE_STATS: return self._CACHE_STATS['access_stats'][key] else: return self._CACHE_STATS['access_stats']
[ "Get", "access", "details", "in", "cache", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/gcpcache.py#L93-L98
[ "def", "get_access_details", "(", "self", ",", "key", "=", "None", ")", ":", "if", "key", "in", "self", ".", "_CACHE_STATS", ":", "return", "self", ".", "_CACHE_STATS", "[", "'access_stats'", "]", "[", "key", "]", "else", ":", "return", "self", ".", "_...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
GCPCache.get_stats
Get general stats for the cache.
cloudaux/gcp/gcpcache.py
def get_stats(self): """Get general stats for the cache.""" expired = sum([x['expired'] for _, x in self._CACHE_STATS['access_stats'].items()]) miss = sum([x['miss'] for _, x in self._CACHE_STATS['access_stats'].items()]) hit = sum([x['hit'] fo...
def get_stats(self): """Get general stats for the cache.""" expired = sum([x['expired'] for _, x in self._CACHE_STATS['access_stats'].items()]) miss = sum([x['miss'] for _, x in self._CACHE_STATS['access_stats'].items()]) hit = sum([x['hit'] fo...
[ "Get", "general", "stats", "for", "the", "cache", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/gcpcache.py#L100-L116
[ "def", "get_stats", "(", "self", ")", ":", "expired", "=", "sum", "(", "[", "x", "[", "'expired'", "]", "for", "_", ",", "x", "in", "self", ".", "_CACHE_STATS", "[", "'access_stats'", "]", ".", "items", "(", ")", "]", ")", "miss", "=", "sum", "("...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_security_group
Orchestrates calls to build a Security Group in the following format: { "Description": ..., "GroupName": ..., "IpPermissions" ..., "OwnerId" ..., "GroupId" ..., "IpPermissionsEgress" ..., "VpcId" ... } Args: sg_obj: name, ARN, or dict of Secur...
cloudaux/orchestration/aws/sg.py
def get_security_group(sg_obj, flags=FLAGS.ALL, **conn): """ Orchestrates calls to build a Security Group in the following format: { "Description": ..., "GroupName": ..., "IpPermissions" ..., "OwnerId" ..., "GroupId" ..., "IpPermissionsEgress" ..., "V...
def get_security_group(sg_obj, flags=FLAGS.ALL, **conn): """ Orchestrates calls to build a Security Group in the following format: { "Description": ..., "GroupName": ..., "IpPermissions" ..., "OwnerId" ..., "GroupId" ..., "IpPermissionsEgress" ..., "V...
[ "Orchestrates", "calls", "to", "build", "a", "Security", "Group", "in", "the", "following", "format", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/sg.py#L23-L50
[ "def", "get_security_group", "(", "sg_obj", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "if", "isinstance", "(", "sg_obj", ",", "string_types", ")", ":", "group_arn", "=", "ARN", "(", "sg_obj", ")", "if", "group_arn", ".", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_user
Orchestrates all the calls required to fully build out an IAM User in the following format: { "Arn": ..., "AccessKeys": ..., "CreateDate": ..., # str "InlinePolicies": ..., "ManagedPolicies": ..., "MFADevices": ..., "Path": ..., "UserId": ..., ...
cloudaux/orchestration/aws/iam/user.py
def get_user(user, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully build out an IAM User in the following format: { "Arn": ..., "AccessKeys": ..., "CreateDate": ..., # str "InlinePolicies": ..., "ManagedPolicies": ..., "MFADevices"...
def get_user(user, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully build out an IAM User in the following format: { "Arn": ..., "AccessKeys": ..., "CreateDate": ..., # str "InlinePolicies": ..., "ManagedPolicies": ..., "MFADevices"...
[ "Orchestrates", "all", "the", "calls", "required", "to", "fully", "build", "out", "an", "IAM", "User", "in", "the", "following", "format", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/user.py#L82-L107
[ "def", "get_user", "(", "user", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "user", "=", "modify", "(", "user", ",", "output", "=", "'camelized'", ")", "_conn_from_args", "(", "user", ",", "conn", ")", "return", "registry...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_all_users
Returns a list of Users represented as dictionary below: { "Arn": ..., "AccessKeys": ..., "CreateDate": ..., # str "InlinePolicies": ..., "ManagedPolicies": ..., "MFADevices": ..., "Path": ..., "UserId": ..., "UserName": ..., "Signing...
cloudaux/orchestration/aws/iam/user.py
def get_all_users(flags=FLAGS.ACCESS_KEYS | FLAGS.MFA_DEVICES | FLAGS.LOGIN_PROFILE | FLAGS.SIGNING_CERTIFICATES, **conn): """ Returns a list of Users represented as dictionary below: { "Arn": ..., "AccessKeys": ..., "CreateDate": ..., # str "InlinePolicie...
def get_all_users(flags=FLAGS.ACCESS_KEYS | FLAGS.MFA_DEVICES | FLAGS.LOGIN_PROFILE | FLAGS.SIGNING_CERTIFICATES, **conn): """ Returns a list of Users represented as dictionary below: { "Arn": ..., "AccessKeys": ..., "CreateDate": ..., # str "InlinePolicie...
[ "Returns", "a", "list", "of", "Users", "represented", "as", "dictionary", "below", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/user.py#L110-L157
[ "def", "get_all_users", "(", "flags", "=", "FLAGS", ".", "ACCESS_KEYS", "|", "FLAGS", ".", "MFA_DEVICES", "|", "FLAGS", ".", "LOGIN_PROFILE", "|", "FLAGS", ".", "SIGNING_CERTIFICATES", ",", "*", "*", "conn", ")", ":", "users", "=", "[", "]", "account_users...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_vpc_flow_logs
Gets the VPC Flow Logs for a VPC
cloudaux/orchestration/aws/vpc.py
def get_vpc_flow_logs(vpc, **conn): """Gets the VPC Flow Logs for a VPC""" fl_result = describe_flow_logs(Filters=[{"Name": "resource-id", "Values": [vpc["id"]]}], **conn) fl_ids = [] for fl in fl_result: fl_ids.append(fl["FlowLogId"]) return fl_ids
def get_vpc_flow_logs(vpc, **conn): """Gets the VPC Flow Logs for a VPC""" fl_result = describe_flow_logs(Filters=[{"Name": "resource-id", "Values": [vpc["id"]]}], **conn) fl_ids = [] for fl in fl_result: fl_ids.append(fl["FlowLogId"]) return fl_ids
[ "Gets", "the", "VPC", "Flow", "Logs", "for", "a", "VPC" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/vpc.py#L24-L32
[ "def", "get_vpc_flow_logs", "(", "vpc", ",", "*", "*", "conn", ")", ":", "fl_result", "=", "describe_flow_logs", "(", "Filters", "=", "[", "{", "\"Name\"", ":", "\"resource-id\"", ",", "\"Values\"", ":", "[", "vpc", "[", "\"id\"", "]", "]", "}", "]", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_classic_link
Gets the Classic Link details about a VPC
cloudaux/orchestration/aws/vpc.py
def get_classic_link(vpc, **conn): """Gets the Classic Link details about a VPC""" result = {} try: cl_result = describe_vpc_classic_link(VpcIds=[vpc["id"]], **conn)[0] result["Enabled"] = cl_result["ClassicLinkEnabled"] # Check for DNS as well: dns_result = describe_vpc_cl...
def get_classic_link(vpc, **conn): """Gets the Classic Link details about a VPC""" result = {} try: cl_result = describe_vpc_classic_link(VpcIds=[vpc["id"]], **conn)[0] result["Enabled"] = cl_result["ClassicLinkEnabled"] # Check for DNS as well: dns_result = describe_vpc_cl...
[ "Gets", "the", "Classic", "Link", "details", "about", "a", "VPC" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/vpc.py#L36-L52
[ "def", "get_classic_link", "(", "vpc", ",", "*", "*", "conn", ")", ":", "result", "=", "{", "}", "try", ":", "cl_result", "=", "describe_vpc_classic_link", "(", "VpcIds", "=", "[", "vpc", "[", "\"id\"", "]", "]", ",", "*", "*", "conn", ")", "[", "0...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_internet_gateway
Gets the Internet Gateway details about a VPC
cloudaux/orchestration/aws/vpc.py
def get_internet_gateway(vpc, **conn): """Gets the Internet Gateway details about a VPC""" result = {} ig_result = describe_internet_gateways(Filters=[{"Name": "attachment.vpc-id", "Values": [vpc["id"]]}], **conn) if ig_result: # Only 1 IG can be attached to a VPC: result.update({ ...
def get_internet_gateway(vpc, **conn): """Gets the Internet Gateway details about a VPC""" result = {} ig_result = describe_internet_gateways(Filters=[{"Name": "attachment.vpc-id", "Values": [vpc["id"]]}], **conn) if ig_result: # Only 1 IG can be attached to a VPC: result.update({ ...
[ "Gets", "the", "Internet", "Gateway", "details", "about", "a", "VPC" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/vpc.py#L56-L69
[ "def", "get_internet_gateway", "(", "vpc", ",", "*", "*", "conn", ")", ":", "result", "=", "{", "}", "ig_result", "=", "describe_internet_gateways", "(", "Filters", "=", "[", "{", "\"Name\"", ":", "\"attachment.vpc-id\"", ",", "\"Values\"", ":", "[", "vpc", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_vpc_peering_connections
Gets the Internet Gateway details about a VPC
cloudaux/orchestration/aws/vpc.py
def get_vpc_peering_connections(vpc, **conn): """Gets the Internet Gateway details about a VPC""" accepter_result = describe_vpc_peering_connections(Filters=[{"Name": "accepter-vpc-info.vpc-id", "Values": [vpc["id"]]}], **conn) requester_resu...
def get_vpc_peering_connections(vpc, **conn): """Gets the Internet Gateway details about a VPC""" accepter_result = describe_vpc_peering_connections(Filters=[{"Name": "accepter-vpc-info.vpc-id", "Values": [vpc["id"]]}], **conn) requester_resu...
[ "Gets", "the", "Internet", "Gateway", "details", "about", "a", "VPC" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/vpc.py#L73-L86
[ "def", "get_vpc_peering_connections", "(", "vpc", ",", "*", "*", "conn", ")", ":", "accepter_result", "=", "describe_vpc_peering_connections", "(", "Filters", "=", "[", "{", "\"Name\"", ":", "\"accepter-vpc-info.vpc-id\"", ",", "\"Values\"", ":", "[", "vpc", "[", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_subnets
Gets the VPC Subnets
cloudaux/orchestration/aws/vpc.py
def get_subnets(vpc, **conn): """Gets the VPC Subnets""" subnets = describe_subnets(Filters=[{"Name": "vpc-id", "Values": [vpc["id"]]}], **conn) s_ids = [] for s in subnets: s_ids.append(s["SubnetId"]) return s_ids
def get_subnets(vpc, **conn): """Gets the VPC Subnets""" subnets = describe_subnets(Filters=[{"Name": "vpc-id", "Values": [vpc["id"]]}], **conn) s_ids = [] for s in subnets: s_ids.append(s["SubnetId"]) return s_ids
[ "Gets", "the", "VPC", "Subnets" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/vpc.py#L90-L98
[ "def", "get_subnets", "(", "vpc", ",", "*", "*", "conn", ")", ":", "subnets", "=", "describe_subnets", "(", "Filters", "=", "[", "{", "\"Name\"", ":", "\"vpc-id\"", ",", "\"Values\"", ":", "[", "vpc", "[", "\"id\"", "]", "]", "}", "]", ",", "*", "*...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_route_tables
Gets the VPC Route Tables
cloudaux/orchestration/aws/vpc.py
def get_route_tables(vpc, **conn): """Gets the VPC Route Tables""" route_tables = describe_route_tables(Filters=[{"Name": "vpc-id", "Values": [vpc["id"]]}], **conn) rt_ids = [] for r in route_tables: rt_ids.append(r["RouteTableId"]) return rt_ids
def get_route_tables(vpc, **conn): """Gets the VPC Route Tables""" route_tables = describe_route_tables(Filters=[{"Name": "vpc-id", "Values": [vpc["id"]]}], **conn) rt_ids = [] for r in route_tables: rt_ids.append(r["RouteTableId"]) return rt_ids
[ "Gets", "the", "VPC", "Route", "Tables" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/vpc.py#L102-L110
[ "def", "get_route_tables", "(", "vpc", ",", "*", "*", "conn", ")", ":", "route_tables", "=", "describe_route_tables", "(", "Filters", "=", "[", "{", "\"Name\"", ":", "\"vpc-id\"", ",", "\"Values\"", ":", "[", "vpc", "[", "\"id\"", "]", "]", "}", "]", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_network_acls
Gets the VPC Network ACLs
cloudaux/orchestration/aws/vpc.py
def get_network_acls(vpc, **conn): """Gets the VPC Network ACLs""" route_tables = describe_network_acls(Filters=[{"Name": "vpc-id", "Values": [vpc["id"]]}], **conn) nacl_ids = [] for r in route_tables: nacl_ids.append(r["NetworkAclId"]) return nacl_ids
def get_network_acls(vpc, **conn): """Gets the VPC Network ACLs""" route_tables = describe_network_acls(Filters=[{"Name": "vpc-id", "Values": [vpc["id"]]}], **conn) nacl_ids = [] for r in route_tables: nacl_ids.append(r["NetworkAclId"]) return nacl_ids
[ "Gets", "the", "VPC", "Network", "ACLs" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/vpc.py#L114-L122
[ "def", "get_network_acls", "(", "vpc", ",", "*", "*", "conn", ")", ":", "route_tables", "=", "describe_network_acls", "(", "Filters", "=", "[", "{", "\"Name\"", ":", "\"vpc-id\"", ",", "\"Values\"", ":", "[", "vpc", "[", "\"id\"", "]", "]", "}", "]", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_base
The base will return: - ARN - Region - Name - Id - Tags - IsDefault - InstanceTenancy - CidrBlock - CidrBlockAssociationSet - Ipv6CidrBlockAssociationSet - DhcpOptionsId - Attributes - _version :param bucket_name: :param conn: :return:
cloudaux/orchestration/aws/vpc.py
def get_base(vpc, **conn): """ The base will return: - ARN - Region - Name - Id - Tags - IsDefault - InstanceTenancy - CidrBlock - CidrBlockAssociationSet - Ipv6CidrBlockAssociationSet - DhcpOptionsId - Attributes - _version :param bucket_name: :param...
def get_base(vpc, **conn): """ The base will return: - ARN - Region - Name - Id - Tags - IsDefault - InstanceTenancy - CidrBlock - CidrBlockAssociationSet - Ipv6CidrBlockAssociationSet - DhcpOptionsId - Attributes - _version :param bucket_name: :param...
[ "The", "base", "will", "return", ":", "-", "ARN", "-", "Region", "-", "Name", "-", "Id", "-", "Tags", "-", "IsDefault", "-", "InstanceTenancy", "-", "CidrBlock", "-", "CidrBlockAssociationSet", "-", "Ipv6CidrBlockAssociationSet", "-", "DhcpOptionsId", "-", "At...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/vpc.py#L126-L184
[ "def", "get_base", "(", "vpc", ",", "*", "*", "conn", ")", ":", "# Get the base:", "base_result", "=", "describe_vpcs", "(", "VpcIds", "=", "[", "vpc", "[", "\"id\"", "]", "]", ",", "*", "*", "conn", ")", "[", "0", "]", "# The name of the VPC is in the t...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_vpc
Orchestrates all the calls required to fully fetch details about a VPC: { "Arn": ..., "Region": ..., "Name": ..., "Id": ..., "Tags: ..., "VpcPeeringConnections": ..., "ClassicLink": ..., "DhcpOptionsId": ..., "InternetGateway": ..., "I...
cloudaux/orchestration/aws/vpc.py
def get_vpc(vpc_id, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully fetch details about a VPC: { "Arn": ..., "Region": ..., "Name": ..., "Id": ..., "Tags: ..., "VpcPeeringConnections": ..., "ClassicLink": ..., "DhcpO...
def get_vpc(vpc_id, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully fetch details about a VPC: { "Arn": ..., "Region": ..., "Name": ..., "Id": ..., "Tags: ..., "VpcPeeringConnections": ..., "ClassicLink": ..., "DhcpO...
[ "Orchestrates", "all", "the", "calls", "required", "to", "fully", "fetch", "details", "about", "a", "VPC", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/vpc.py#L188-L239
[ "def", "get_vpc", "(", "vpc_id", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "# Is the account number that's passed in the same as in the connection dictionary?", "if", "not", "conn", ".", "get", "(", "\"account_number\"", ")", ":", "r...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_client
User function to get the correct client. Based on the GOOGLE_CLIENT_MAP dictionary, the return will be a cloud or general client that can interact with the desired service. :param service: GCP service to connect to. E.g. 'gce', 'iam' :type service: ``str`` :param conn_args: Dictionary of connecti...
cloudaux/gcp/auth.py
def get_client(service, service_type='client', **conn_args): """ User function to get the correct client. Based on the GOOGLE_CLIENT_MAP dictionary, the return will be a cloud or general client that can interact with the desired service. :param service: GCP service to connect to. E.g. 'gce', 'iam'...
def get_client(service, service_type='client', **conn_args): """ User function to get the correct client. Based on the GOOGLE_CLIENT_MAP dictionary, the return will be a cloud or general client that can interact with the desired service. :param service: GCP service to connect to. E.g. 'gce', 'iam'...
[ "User", "function", "to", "get", "the", "correct", "client", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/auth.py#L23-L64
[ "def", "get_client", "(", "service", ",", "service_type", "=", "'client'", ",", "*", "*", "conn_args", ")", ":", "client_details", "=", "choose_client", "(", "service", ")", "user_agent", "=", "get_user_agent", "(", "*", "*", "conn_args", ")", "if", "client_...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_gcp_client
Public GCP client builder.
cloudaux/gcp/auth.py
def get_gcp_client(**kwargs): """Public GCP client builder.""" return _gcp_client(project=kwargs['project'], mod_name=kwargs['mod_name'], pkg_name=kwargs.get('pkg_name', 'google.cloud'), key_file=kwargs.get('key_file', None), http_auth=kwargs....
def get_gcp_client(**kwargs): """Public GCP client builder.""" return _gcp_client(project=kwargs['project'], mod_name=kwargs['mod_name'], pkg_name=kwargs.get('pkg_name', 'google.cloud'), key_file=kwargs.get('key_file', None), http_auth=kwargs....
[ "Public", "GCP", "client", "builder", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/auth.py#L101-L107
[ "def", "get_gcp_client", "(", "*", "*", "kwargs", ")", ":", "return", "_gcp_client", "(", "project", "=", "kwargs", "[", "'project'", "]", ",", "mod_name", "=", "kwargs", "[", "'mod_name'", "]", ",", "pkg_name", "=", "kwargs", ".", "get", "(", "'pkg_name...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_gcp_client
Private GCP client builder. :param project: Google Cloud project string. :type project: ``str`` :param mod_name: Module name to load. Should be found in sys.path. :type mod_name: ``str`` :param pkg_name: package name that mod_name is part of. Default is 'google.cloud' . :type pkg_name: ``st...
cloudaux/gcp/auth.py
def _gcp_client(project, mod_name, pkg_name, key_file=None, http_auth=None, user_agent=None): """ Private GCP client builder. :param project: Google Cloud project string. :type project: ``str`` :param mod_name: Module name to load. Should be found in sys.path. :type mod_name: ...
def _gcp_client(project, mod_name, pkg_name, key_file=None, http_auth=None, user_agent=None): """ Private GCP client builder. :param project: Google Cloud project string. :type project: ``str`` :param mod_name: Module name to load. Should be found in sys.path. :type mod_name: ...
[ "Private", "GCP", "client", "builder", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/auth.py#L110-L153
[ "def", "_gcp_client", "(", "project", ",", "mod_name", ",", "pkg_name", ",", "key_file", "=", "None", ",", "http_auth", "=", "None", ",", "user_agent", "=", "None", ")", ":", "client", "=", "None", "if", "http_auth", "is", "None", ":", "http_auth", "=", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_googleauth
Google http_auth helper. If key_file is not specified, default credentials will be used. If scopes is specified (and key_file), will be used instead of DEFAULT_SCOPES :param key_file: path to key file to use. Default is None :type key_file: ``str`` :param scopes: scopes to set. Default is DEFAU...
cloudaux/gcp/auth.py
def _googleauth(key_file=None, scopes=[], user_agent=None): """ Google http_auth helper. If key_file is not specified, default credentials will be used. If scopes is specified (and key_file), will be used instead of DEFAULT_SCOPES :param key_file: path to key file to use. Default is None :typ...
def _googleauth(key_file=None, scopes=[], user_agent=None): """ Google http_auth helper. If key_file is not specified, default credentials will be used. If scopes is specified (and key_file), will be used instead of DEFAULT_SCOPES :param key_file: path to key file to use. Default is None :typ...
[ "Google", "http_auth", "helper", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/auth.py#L174-L205
[ "def", "_googleauth", "(", "key_file", "=", "None", ",", "scopes", "=", "[", "]", ",", "user_agent", "=", "None", ")", ":", "if", "key_file", ":", "if", "not", "scopes", ":", "scopes", "=", "DEFAULT_SCOPES", "creds", "=", "ServiceAccountCredentials", ".", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_build_google_client
Google build client helper. :param service: service to build client for :type service: ``str`` :param api_version: API version to use. :type api_version: ``str`` :param http_auth: Initialized HTTP client to use. :type http_auth: ``object`` :return: google-python-api client initialized to...
cloudaux/gcp/auth.py
def _build_google_client(service, api_version, http_auth): """ Google build client helper. :param service: service to build client for :type service: ``str`` :param api_version: API version to use. :type api_version: ``str`` :param http_auth: Initialized HTTP client to use. :type http...
def _build_google_client(service, api_version, http_auth): """ Google build client helper. :param service: service to build client for :type service: ``str`` :param api_version: API version to use. :type api_version: ``str`` :param http_auth: Initialized HTTP client to use. :type http...
[ "Google", "build", "client", "helper", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/auth.py#L208-L225
[ "def", "_build_google_client", "(", "service", ",", "api_version", ",", "http_auth", ")", ":", "client", "=", "build", "(", "service", ",", "api_version", ",", "http", "=", "http_auth", ")", "return", "client" ]
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
gcp_conn
service_type: not currently used.
cloudaux/gcp/decorators.py
def gcp_conn(service, service_type='client', future_expiration_minutes=15): """ service_type: not currently used. """ def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): # Import here to avoid circular import issue from cloudaux.gcp.auth import g...
def gcp_conn(service, service_type='client', future_expiration_minutes=15): """ service_type: not currently used. """ def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): # Import here to avoid circular import issue from cloudaux.gcp.auth import g...
[ "service_type", ":", "not", "currently", "used", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/decorators.py#L25-L47
[ "def", "gcp_conn", "(", "service", ",", "service_type", "=", "'client'", ",", "future_expiration_minutes", "=", "15", ")", ":", "def", "decorator", "(", "f", ")", ":", "@", "wraps", "(", "f", ")", "def", "decorated_function", "(", "*", "args", ",", "*", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
gcp_stats
Collect stats Specifically, time function calls :returns: function response :rtype: varies
cloudaux/gcp/decorators.py
def gcp_stats(): """ Collect stats Specifically, time function calls :returns: function response :rtype: varies """ def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): start_time = time.time() result = f(*args, **kwargs) ...
def gcp_stats(): """ Collect stats Specifically, time function calls :returns: function response :rtype: varies """ def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): start_time = time.time() result = f(*args, **kwargs) ...
[ "Collect", "stats" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/decorators.py#L50-L71
[ "def", "gcp_stats", "(", ")", ":", "def", "decorator", "(", "f", ")", ":", "@", "wraps", "(", "f", ")", "def", "decorated_function", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "start_time", "=", "time", ".", "time", "(", ")", "result", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
gcp_cache
Cache function output :param future_expiration_minutes: Number of minutes in the future until item expires. Default is 15. :returns: function response, optionally from the cache :rtype: varies
cloudaux/gcp/decorators.py
def gcp_cache(future_expiration_minutes=15): """ Cache function output :param future_expiration_minutes: Number of minutes in the future until item expires. Default is 15. :returns: function response, optionally from the cache :rtype: varies """ def de...
def gcp_cache(future_expiration_minutes=15): """ Cache function output :param future_expiration_minutes: Number of minutes in the future until item expires. Default is 15. :returns: function response, optionally from the cache :rtype: varies """ def de...
[ "Cache", "function", "output", ":", "param", "future_expiration_minutes", ":", "Number", "of", "minutes", "in", "the", "future", "until", "item", "expires", ".", "Default", "is", "15", ".", ":", "returns", ":", "function", "response", "optionally", "from", "th...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/decorators.py#L74-L97
[ "def", "gcp_cache", "(", "future_expiration_minutes", "=", "15", ")", ":", "def", "decorator", "(", "f", ")", ":", "@", "wraps", "(", "f", ")", "def", "decorated_function", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "strkey", "=", "_build_key...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
iter_project
Call decorated function for each item in project list. Note: the function 'decorated' is expected to return a value plus a dictionary of exceptions. If item in list is a dictionary, we look for a 'project' and 'key_file' entry, respectively. If item in list is of type string_types, we assume it is the pro...
cloudaux/gcp/decorators.py
def iter_project(projects, key_file=None): """ Call decorated function for each item in project list. Note: the function 'decorated' is expected to return a value plus a dictionary of exceptions. If item in list is a dictionary, we look for a 'project' and 'key_file' entry, respectively. If item i...
def iter_project(projects, key_file=None): """ Call decorated function for each item in project list. Note: the function 'decorated' is expected to return a value plus a dictionary of exceptions. If item in list is a dictionary, we look for a 'project' and 'key_file' entry, respectively. If item i...
[ "Call", "decorated", "function", "for", "each", "item", "in", "project", "list", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/decorators.py#L100-L141
[ "def", "iter_project", "(", "projects", ",", "key_file", "=", "None", ")", ":", "def", "decorator", "(", "func", ")", ":", "@", "wraps", "(", "func", ")", "def", "decorated_function", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "item_list", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_creds_from_kwargs
Helper to get creds out of kwargs.
cloudaux/gcp/utils.py
def get_creds_from_kwargs(kwargs): """Helper to get creds out of kwargs.""" creds = { 'key_file': kwargs.pop('key_file', None), 'http_auth': kwargs.pop('http_auth', None), 'project': kwargs.get('project', None), 'user_agent': kwargs.pop('user_agent', None), 'api_version':...
def get_creds_from_kwargs(kwargs): """Helper to get creds out of kwargs.""" creds = { 'key_file': kwargs.pop('key_file', None), 'http_auth': kwargs.pop('http_auth', None), 'project': kwargs.get('project', None), 'user_agent': kwargs.pop('user_agent', None), 'api_version':...
[ "Helper", "to", "get", "creds", "out", "of", "kwargs", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/utils.py#L14-L23
[ "def", "get_creds_from_kwargs", "(", "kwargs", ")", ":", "creds", "=", "{", "'key_file'", ":", "kwargs", ".", "pop", "(", "'key_file'", ",", "None", ")", ",", "'http_auth'", ":", "kwargs", ".", "pop", "(", "'http_auth'", ",", "None", ")", ",", "'project'...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
rewrite_kwargs
Manipulate connection keywords. Modifieds keywords based on connection type. There is an assumption here that the client has already been created and that these keywords are being passed into methods for interacting with various services. Current modifications: - if conn_type is not cloud...
cloudaux/gcp/utils.py
def rewrite_kwargs(conn_type, kwargs, module_name=None): """ Manipulate connection keywords. Modifieds keywords based on connection type. There is an assumption here that the client has already been created and that these keywords are being passed into methods for interacting with various ...
def rewrite_kwargs(conn_type, kwargs, module_name=None): """ Manipulate connection keywords. Modifieds keywords based on connection type. There is an assumption here that the client has already been created and that these keywords are being passed into methods for interacting with various ...
[ "Manipulate", "connection", "keywords", ".", "Modifieds", "keywords", "based", "on", "connection", "type", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/utils.py#L26-L61
[ "def", "rewrite_kwargs", "(", "conn_type", ",", "kwargs", ",", "module_name", "=", "None", ")", ":", "if", "conn_type", "!=", "'cloud'", "and", "module_name", "!=", "'compute'", ":", "if", "'project'", "in", "kwargs", ":", "kwargs", "[", "'name'", "]", "="...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
gce_list_aggregated
General aggregated list function for the GCE service.
cloudaux/gcp/utils.py
def gce_list_aggregated(service=None, key_name='name', **kwargs): """General aggregated list function for the GCE service.""" resp_list = [] req = service.aggregatedList(**kwargs) while req is not None: resp = req.execute() for location, item in resp['items'].items(): if key...
def gce_list_aggregated(service=None, key_name='name', **kwargs): """General aggregated list function for the GCE service.""" resp_list = [] req = service.aggregatedList(**kwargs) while req is not None: resp = req.execute() for location, item in resp['items'].items(): if key...
[ "General", "aggregated", "list", "function", "for", "the", "GCE", "service", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/utils.py#L64-L77
[ "def", "gce_list_aggregated", "(", "service", "=", "None", ",", "key_name", "=", "'name'", ",", "*", "*", "kwargs", ")", ":", "resp_list", "=", "[", "]", "req", "=", "service", ".", "aggregatedList", "(", "*", "*", "kwargs", ")", "while", "req", "is", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
gce_list
General list function for the GCE service.
cloudaux/gcp/utils.py
def gce_list(service=None, **kwargs): """General list function for the GCE service.""" resp_list = [] req = service.list(**kwargs) while req is not None: resp = req.execute() for item in resp.get('items', []): resp_list.append(item) req = service.list_next(previous_r...
def gce_list(service=None, **kwargs): """General list function for the GCE service.""" resp_list = [] req = service.list(**kwargs) while req is not None: resp = req.execute() for item in resp.get('items', []): resp_list.append(item) req = service.list_next(previous_r...
[ "General", "list", "function", "for", "the", "GCE", "service", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/utils.py#L80-L90
[ "def", "gce_list", "(", "service", "=", "None", ",", "*", "*", "kwargs", ")", ":", "resp_list", "=", "[", "]", "req", "=", "service", ".", "list", "(", "*", "*", "kwargs", ")", "while", "req", "is", "not", "None", ":", "resp", "=", "req", ".", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
service_list
General list function for Google APIs.
cloudaux/gcp/utils.py
def service_list(service=None, key_name=None, **kwargs): """General list function for Google APIs.""" resp_list = [] req = service.list(**kwargs) while req is not None: resp = req.execute() if key_name and key_name in resp: resp_list.extend(resp[key_name]) else: ...
def service_list(service=None, key_name=None, **kwargs): """General list function for Google APIs.""" resp_list = [] req = service.list(**kwargs) while req is not None: resp = req.execute() if key_name and key_name in resp: resp_list.extend(resp[key_name]) else: ...
[ "General", "list", "function", "for", "Google", "APIs", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/utils.py#L93-L110
[ "def", "service_list", "(", "service", "=", "None", ",", "key_name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "resp_list", "=", "[", "]", "req", "=", "service", ".", "list", "(", "*", "*", "kwargs", ")", "while", "req", "is", "not", "None", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_cache_access_details
Retrieve detailed cache information.
cloudaux/gcp/utils.py
def get_cache_access_details(key=None): """Retrieve detailed cache information.""" from cloudaux.gcp.decorators import _GCP_CACHE return _GCP_CACHE.get_access_details(key=key)
def get_cache_access_details(key=None): """Retrieve detailed cache information.""" from cloudaux.gcp.decorators import _GCP_CACHE return _GCP_CACHE.get_access_details(key=key)
[ "Retrieve", "detailed", "cache", "information", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/utils.py#L119-L122
[ "def", "get_cache_access_details", "(", "key", "=", "None", ")", ":", "from", "cloudaux", ".", "gcp", ".", "decorators", "import", "_GCP_CACHE", "return", "_GCP_CACHE", ".", "get_access_details", "(", "key", "=", "key", ")" ]
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_user_agent_default
Get default User Agent String. Try to import pkg_name to get an accurate version number. return: string
cloudaux/gcp/utils.py
def get_user_agent_default(pkg_name='cloudaux'): """ Get default User Agent String. Try to import pkg_name to get an accurate version number. return: string """ version = '0.0.1' try: import pkg_resources version = pkg_resources.get_distribution(pkg_name).version e...
def get_user_agent_default(pkg_name='cloudaux'): """ Get default User Agent String. Try to import pkg_name to get an accurate version number. return: string """ version = '0.0.1' try: import pkg_resources version = pkg_resources.get_distribution(pkg_name).version e...
[ "Get", "default", "User", "Agent", "String", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/utils.py#L131-L148
[ "def", "get_user_agent_default", "(", "pkg_name", "=", "'cloudaux'", ")", ":", "version", "=", "'0.0.1'", "try", ":", "import", "pkg_resources", "version", "=", "pkg_resources", ".", "get_distribution", "(", "pkg_name", ")", ".", "version", "except", "pkg_resource...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_elbv2
Fully describes an ALB (ELBv2). :param alb: Could be an ALB Name, ALB ARN, or a dictionary. Likely the return value from a previous call to describe_load_balancers. At a minimum, must contain a key titled 'LoadBalancerArn'. :param flags: Flags describing which sections should be included in the return value. D...
cloudaux/orchestration/aws/elbv2.py
def get_elbv2(alb, flags=FLAGS.ALL, **conn): """ Fully describes an ALB (ELBv2). :param alb: Could be an ALB Name, ALB ARN, or a dictionary. Likely the return value from a previous call to describe_load_balancers. At a minimum, must contain a key titled 'LoadBalancerArn'. :param flags: Flags describing...
def get_elbv2(alb, flags=FLAGS.ALL, **conn): """ Fully describes an ALB (ELBv2). :param alb: Could be an ALB Name, ALB ARN, or a dictionary. Likely the return value from a previous call to describe_load_balancers. At a minimum, must contain a key titled 'LoadBalancerArn'. :param flags: Flags describing...
[ "Fully", "describes", "an", "ALB", "(", "ELBv2", ")", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/elbv2.py#L86-L108
[ "def", "get_elbv2", "(", "alb", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "# Python 2 and 3 support:", "try", ":", "basestring", "except", "NameError", "as", "_", ":", "basestring", "=", "str", "if", "isinstance", "(", "alb...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_event
Orchestrates all the calls required to fully build out a CloudWatch Event Rule in the following format: { "Arn": ..., "Name": ..., "Region": ..., "Description": ..., "State": ..., "Rule": ..., "Targets" ..., "_version": 1 } :param rule: str c...
cloudaux/orchestration/aws/events.py
def get_event(rule, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully build out a CloudWatch Event Rule in the following format: { "Arn": ..., "Name": ..., "Region": ..., "Description": ..., "State": ..., "Rule": ..., "Targets...
def get_event(rule, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully build out a CloudWatch Event Rule in the following format: { "Arn": ..., "Name": ..., "Region": ..., "Description": ..., "State": ..., "Rule": ..., "Targets...
[ "Orchestrates", "all", "the", "calls", "required", "to", "fully", "build", "out", "a", "CloudWatch", "Event", "Rule", "in", "the", "following", "format", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/events.py#L42-L79
[ "def", "get_event", "(", "rule", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "# Python 2 and 3 support:", "try", ":", "basestring", "except", "NameError", "as", "_", ":", "basestring", "=", "str", "# If string is passed in, determi...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
list_rules
NamePrefix='string'
cloudaux/aws/events.py
def list_rules(client=None, **kwargs): """ NamePrefix='string' """ result = client.list_rules(**kwargs) if not result.get("Rules"): result.update({"Rules": []}) return result
def list_rules(client=None, **kwargs): """ NamePrefix='string' """ result = client.list_rules(**kwargs) if not result.get("Rules"): result.update({"Rules": []}) return result
[ "NamePrefix", "=", "string" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/events.py#L9-L17
[ "def", "list_rules", "(", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "result", "=", "client", ".", "list_rules", "(", "*", "*", "kwargs", ")", "if", "not", "result", ".", "get", "(", "\"Rules\"", ")", ":", "result", ".", "update", "(...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
list_targets_by_rule
Rule='string'
cloudaux/aws/events.py
def list_targets_by_rule(client=None, **kwargs): """ Rule='string' """ result = client.list_targets_by_rule(**kwargs) if not result.get("Targets"): result.update({"Targets": []}) return result
def list_targets_by_rule(client=None, **kwargs): """ Rule='string' """ result = client.list_targets_by_rule(**kwargs) if not result.get("Targets"): result.update({"Targets": []}) return result
[ "Rule", "=", "string" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/events.py#L33-L41
[ "def", "list_targets_by_rule", "(", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "result", "=", "client", ".", "list_targets_by_rule", "(", "*", "*", "kwargs", ")", "if", "not", "result", ".", "get", "(", "\"Targets\"", ")", ":", "result", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_image
Orchestrates all the calls required to fully build out an EC2 Image (AMI, AKI, ARI) { "Architecture": "x86_64", "Arn": "arn:aws:ec2:us-east-1::image/ami-11111111", "BlockDeviceMappings": [], "CreationDate": "2013-07-11T16:04:06.000Z", "Description": "...", "Hype...
cloudaux/orchestration/aws/image.py
def get_image(image_id, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully build out an EC2 Image (AMI, AKI, ARI) { "Architecture": "x86_64", "Arn": "arn:aws:ec2:us-east-1::image/ami-11111111", "BlockDeviceMappings": [], "CreationDate": "2013-07-11...
def get_image(image_id, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully build out an EC2 Image (AMI, AKI, ARI) { "Architecture": "x86_64", "Arn": "arn:aws:ec2:us-east-1::image/ami-11111111", "BlockDeviceMappings": [], "CreationDate": "2013-07-11...
[ "Orchestrates", "all", "the", "calls", "required", "to", "fully", "build", "out", "an", "EC2", "Image", "(", "AMI", "AKI", "ARI", ")" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/image.py#L50-L88
[ "def", "get_image", "(", "image_id", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "image", "=", "dict", "(", "ImageId", "=", "image_id", ")", "conn", "[", "'region'", "]", "=", "conn", ".", "get", "(", "'region'", ",", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
CloudAux.call
cloudaux = CloudAux( **{'account_number': '000000000000', 'assume_role': 'role_name', 'session_name': 'testing', 'region': 'us-east-1', 'tech': 'kms', 'service_type': 'client' }) cloudaux.call("list_aliases") ...
cloudaux/__init__.py
def call(self, function_expr, **kwargs): """ cloudaux = CloudAux( **{'account_number': '000000000000', 'assume_role': 'role_name', 'session_name': 'testing', 'region': 'us-east-1', 'tech': 'kms', 'service_type': 'clie...
def call(self, function_expr, **kwargs): """ cloudaux = CloudAux( **{'account_number': '000000000000', 'assume_role': 'role_name', 'session_name': 'testing', 'region': 'us-east-1', 'tech': 'kms', 'service_type': 'clie...
[ "cloudaux", "=", "CloudAux", "(", "**", "{", "account_number", ":", "000000000000", "assume_role", ":", "role_name", "session_name", ":", "testing", "region", ":", "us", "-", "east", "-", "1", "tech", ":", "kms", "service_type", ":", "client", "}", ")" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/__init__.py#L19-L48
[ "def", "call", "(", "self", ",", "function_expr", ",", "*", "*", "kwargs", ")", ":", "if", "'.'", "in", "function_expr", ":", "tech", ",", "service_type", ",", "function_name", "=", "function_expr", ".", "split", "(", "'.'", ")", "else", ":", "tech", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
CloudAux.go
CloudAux.go( 'list_aliases', **{ 'account_number': '000000000000', 'assume_role': 'role_name', 'session_name': 'cloudaux', 'region': 'us-east-1', 'tech': 'kms', 'service_type': 'client' })...
cloudaux/__init__.py
def go(function_expr, **kwargs): """ CloudAux.go( 'list_aliases', **{ 'account_number': '000000000000', 'assume_role': 'role_name', 'session_name': 'cloudaux', 'region': 'us-east-1', 'tech': 'kms', ...
def go(function_expr, **kwargs): """ CloudAux.go( 'list_aliases', **{ 'account_number': '000000000000', 'assume_role': 'role_name', 'session_name': 'cloudaux', 'region': 'us-east-1', 'tech': 'kms', ...
[ "CloudAux", ".", "go", "(", "list_aliases", "**", "{", "account_number", ":", "000000000000", "assume_role", ":", "role_name", "session_name", ":", "cloudaux", "region", ":", "us", "-", "east", "-", "1", "tech", ":", "kms", "service_type", ":", "client", "}"...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/__init__.py#L51-L85
[ "def", "go", "(", "function_expr", ",", "*", "*", "kwargs", ")", ":", "if", "'.'", "in", "function_expr", ":", "tech", ",", "service_type", ",", "function_name", "=", "function_expr", ".", "split", "(", "'.'", ")", "else", ":", "tech", "=", "kwargs", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
list_buckets
List buckets for a project. :param client: client object to use. :type client: Google Cloud Storage client :returns: list of dictionary reprsentation of Bucket :rtype: ``list`` of ``dict``
cloudaux/gcp/gcs.py
def list_buckets(client=None, **kwargs): """ List buckets for a project. :param client: client object to use. :type client: Google Cloud Storage client :returns: list of dictionary reprsentation of Bucket :rtype: ``list`` of ``dict`` """ buckets = client.list_buckets(**kwargs) retu...
def list_buckets(client=None, **kwargs): """ List buckets for a project. :param client: client object to use. :type client: Google Cloud Storage client :returns: list of dictionary reprsentation of Bucket :rtype: ``list`` of ``dict`` """ buckets = client.list_buckets(**kwargs) retu...
[ "List", "buckets", "for", "a", "project", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/gcs.py#L11-L22
[ "def", "list_buckets", "(", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "buckets", "=", "client", ".", "list_buckets", "(", "*", "*", "kwargs", ")", "return", "[", "b", ".", "__dict__", "for", "b", "in", "buckets", "]" ]
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
list_objects_in_bucket
List objects in bucket. :param Bucket: name of bucket :type Bucket: ``str`` :returns list of objects in bucket :rtype: ``list``
cloudaux/gcp/gcs.py
def list_objects_in_bucket(**kwargs): """ List objects in bucket. :param Bucket: name of bucket :type Bucket: ``str`` :returns list of objects in bucket :rtype: ``list`` """ bucket = get_bucket(**kwargs) if bucket: return [o for o in bucket.list_blobs()] else: r...
def list_objects_in_bucket(**kwargs): """ List objects in bucket. :param Bucket: name of bucket :type Bucket: ``str`` :returns list of objects in bucket :rtype: ``list`` """ bucket = get_bucket(**kwargs) if bucket: return [o for o in bucket.list_blobs()] else: r...
[ "List", "objects", "in", "bucket", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/gcs.py#L54-L68
[ "def", "list_objects_in_bucket", "(", "*", "*", "kwargs", ")", ":", "bucket", "=", "get_bucket", "(", "*", "*", "kwargs", ")", "if", "bucket", ":", "return", "[", "o", "for", "o", "in", "bucket", ".", "list_blobs", "(", ")", "]", "else", ":", "return...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_modify
Modifies each item.keys() string based on the func passed in. Often used with inflection's camelize or underscore methods. :param item: dictionary representing item to be modified :param func: function to run on each key string :return: dictionary where each key has been modified by func.
cloudaux/orchestration/__init__.py
def _modify(item, func): """ Modifies each item.keys() string based on the func passed in. Often used with inflection's camelize or underscore methods. :param item: dictionary representing item to be modified :param func: function to run on each key string :return: dictionary where each key has...
def _modify(item, func): """ Modifies each item.keys() string based on the func passed in. Often used with inflection's camelize or underscore methods. :param item: dictionary representing item to be modified :param func: function to run on each key string :return: dictionary where each key has...
[ "Modifies", "each", "item", ".", "keys", "()", "string", "based", "on", "the", "func", "passed", "in", ".", "Often", "used", "with", "inflection", "s", "camelize", "or", "underscore", "methods", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/__init__.py#L4-L16
[ "def", "_modify", "(", "item", ",", "func", ")", ":", "result", "=", "dict", "(", ")", "for", "key", "in", "item", ":", "result", "[", "func", "(", "key", ")", "]", "=", "item", "[", "key", "]", "return", "result" ]
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
modify
Calls _modify and either passes the inflection.camelize method or the inflection.underscore method. :param item: dictionary representing item to be modified :param output: string 'camelized' or 'underscored' :return:
cloudaux/orchestration/__init__.py
def modify(item, output='camelized'): """ Calls _modify and either passes the inflection.camelize method or the inflection.underscore method. :param item: dictionary representing item to be modified :param output: string 'camelized' or 'underscored' :return: """ if output == 'camelized': ...
def modify(item, output='camelized'): """ Calls _modify and either passes the inflection.camelize method or the inflection.underscore method. :param item: dictionary representing item to be modified :param output: string 'camelized' or 'underscored' :return: """ if output == 'camelized': ...
[ "Calls", "_modify", "and", "either", "passes", "the", "inflection", ".", "camelize", "method", "or", "the", "inflection", ".", "underscore", "method", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/__init__.py#L19-L30
[ "def", "modify", "(", "item", ",", "output", "=", "'camelized'", ")", ":", "if", "output", "==", "'camelized'", ":", "return", "_modify", "(", "item", ",", "camelize", ")", "elif", "output", "==", "'underscored'", ":", "return", "_modify", "(", "item", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_role_managed_policy_documents
Retrieve the currently active policy version document for every managed policy that is attached to the role.
cloudaux/aws/iam.py
def get_role_managed_policy_documents(role, client=None, **kwargs): """Retrieve the currently active policy version document for every managed policy that is attached to the role.""" policies = get_role_managed_policies(role, force_client=client) policy_names = (policy['name'] for policy in policies) d...
def get_role_managed_policy_documents(role, client=None, **kwargs): """Retrieve the currently active policy version document for every managed policy that is attached to the role.""" policies = get_role_managed_policies(role, force_client=client) policy_names = (policy['name'] for policy in policies) d...
[ "Retrieve", "the", "currently", "active", "policy", "version", "document", "for", "every", "managed", "policy", "that", "is", "attached", "to", "the", "role", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/iam.py#L195-L204
[ "def", "get_role_managed_policy_documents", "(", "role", ",", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "policies", "=", "get_role_managed_policies", "(", "role", ",", "force_client", "=", "client", ")", "policy_names", "=", "(", "policy", "[",...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_managed_policy_document
Retrieve the currently active (i.e. 'default') policy version document for a policy. :param policy_arn: :param policy_metadata: This is a previously fetch managed policy response from boto/cloudaux. This is used to prevent unnecessary API calls to get the initial policy default vers...
cloudaux/aws/iam.py
def get_managed_policy_document(policy_arn, policy_metadata=None, client=None, **kwargs): """Retrieve the currently active (i.e. 'default') policy version document for a policy. :param policy_arn: :param policy_metadata: This is a previously fetch managed policy response from boto/cloudaux. ...
def get_managed_policy_document(policy_arn, policy_metadata=None, client=None, **kwargs): """Retrieve the currently active (i.e. 'default') policy version document for a policy. :param policy_arn: :param policy_metadata: This is a previously fetch managed policy response from boto/cloudaux. ...
[ "Retrieve", "the", "currently", "active", "(", "i", ".", "e", ".", "default", ")", "policy", "version", "document", "for", "a", "policy", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/iam.py#L209-L224
[ "def", "get_managed_policy_document", "(", "policy_arn", ",", "policy_metadata", "=", "None", ",", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "not", "policy_metadata", ":", "policy_metadata", "=", "client", ".", "get_policy", "(", "PolicyA...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_group
Get's the IAM Group details. :param group_name: :param users: Optional -- will return the IAM users that the group is attached to if desired (paginated). :param client: :param kwargs: :return:
cloudaux/aws/iam.py
def get_group(group_name, users=True, client=None, **kwargs): """Get's the IAM Group details. :param group_name: :param users: Optional -- will return the IAM users that the group is attached to if desired (paginated). :param client: :param kwargs: :return: """ # First, make the initial...
def get_group(group_name, users=True, client=None, **kwargs): """Get's the IAM Group details. :param group_name: :param users: Optional -- will return the IAM users that the group is attached to if desired (paginated). :param client: :param kwargs: :return: """ # First, make the initial...
[ "Get", "s", "the", "IAM", "Group", "details", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/iam.py#L442-L470
[ "def", "get_group", "(", "group_name", ",", "users", "=", "True", ",", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "# First, make the initial call to get the details for the group:", "result", "=", "client", ".", "get_group", "(", "GroupName", "=", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_group_policy_document
Fetches the specific IAM group inline-policy document.
cloudaux/aws/iam.py
def get_group_policy_document(group_name, policy_name, client=None, **kwargs): """Fetches the specific IAM group inline-policy document.""" return client.get_group_policy(GroupName=group_name, PolicyName=policy_name, **kwargs)['PolicyDocument']
def get_group_policy_document(group_name, policy_name, client=None, **kwargs): """Fetches the specific IAM group inline-policy document.""" return client.get_group_policy(GroupName=group_name, PolicyName=policy_name, **kwargs)['PolicyDocument']
[ "Fetches", "the", "specific", "IAM", "group", "inline", "-", "policy", "document", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/iam.py#L483-L485
[ "def", "get_group_policy_document", "(", "group_name", ",", "policy_name", ",", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "return", "client", ".", "get_group_policy", "(", "GroupName", "=", "group_name", ",", "PolicyName", "=", "policy_name", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_get_base
Fetch the base IAM Server Certificate.
cloudaux/orchestration/aws/iam/server_certificate.py
def _get_base(server_certificate, **conn): """Fetch the base IAM Server Certificate.""" server_certificate['_version'] = 1 # Get the initial cert details: cert_details = get_server_certificate_api(server_certificate['ServerCertificateName'], **conn) if cert_details: server_certificate.upda...
def _get_base(server_certificate, **conn): """Fetch the base IAM Server Certificate.""" server_certificate['_version'] = 1 # Get the initial cert details: cert_details = get_server_certificate_api(server_certificate['ServerCertificateName'], **conn) if cert_details: server_certificate.upda...
[ "Fetch", "the", "base", "IAM", "Server", "Certificate", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/server_certificate.py#L22-L38
[ "def", "_get_base", "(", "server_certificate", ",", "*", "*", "conn", ")", ":", "server_certificate", "[", "'_version'", "]", "=", "1", "# Get the initial cert details:", "cert_details", "=", "get_server_certificate_api", "(", "server_certificate", "[", "'ServerCertific...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_server_certificate
Orchestrates all the calls required to fully build out an IAM User in the following format: { "Arn": ..., "ServerCertificateName": ..., "Path": ..., "ServerCertificateId": ..., "UploadDate": ..., # str "Expiration": ..., # str "CertificateBody": ..., ...
cloudaux/orchestration/aws/iam/server_certificate.py
def get_server_certificate(server_certificate, flags=FLAGS.BASE, **conn): """ Orchestrates all the calls required to fully build out an IAM User in the following format: { "Arn": ..., "ServerCertificateName": ..., "Path": ..., "ServerCertificateId": ..., "UploadDate"...
def get_server_certificate(server_certificate, flags=FLAGS.BASE, **conn): """ Orchestrates all the calls required to fully build out an IAM User in the following format: { "Arn": ..., "ServerCertificateName": ..., "Path": ..., "ServerCertificateId": ..., "UploadDate"...
[ "Orchestrates", "all", "the", "calls", "required", "to", "fully", "build", "out", "an", "IAM", "User", "in", "the", "following", "format", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/server_certificate.py#L42-L72
[ "def", "get_server_certificate", "(", "server_certificate", ",", "flags", "=", "FLAGS", ".", "BASE", ",", "*", "*", "conn", ")", ":", "if", "not", "server_certificate", ".", "get", "(", "'ServerCertificateName'", ")", ":", "raise", "MissingFieldException", "(", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_item
API versioning for each OpenStack service is independent. Generically capture the public members (non-routine and non-private) of the OpenStack SDK objects. Note the lack of the modify_output decorator. Preserving the field naming allows us to reconstruct objects and orchestrate from stored items.
cloudaux/orchestration/openstack/utils.py
def get_item(item, **kwargs): """ API versioning for each OpenStack service is independent. Generically capture the public members (non-routine and non-private) of the OpenStack SDK objects. Note the lack of the modify_output decorator. Preserving the field naming allows us to reconstruct o...
def get_item(item, **kwargs): """ API versioning for each OpenStack service is independent. Generically capture the public members (non-routine and non-private) of the OpenStack SDK objects. Note the lack of the modify_output decorator. Preserving the field naming allows us to reconstruct o...
[ "API", "versioning", "for", "each", "OpenStack", "service", "is", "independent", ".", "Generically", "capture", "the", "public", "members", "(", "non", "-", "routine", "and", "non", "-", "private", ")", "of", "the", "OpenStack", "SDK", "objects", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/openstack/utils.py#L17-L30
[ "def", "get_item", "(", "item", ",", "*", "*", "kwargs", ")", ":", "_item", "=", "{", "}", "for", "k", ",", "v", "in", "inspect", ".", "getmembers", "(", "item", ",", "lambda", "a", ":", "not", "(", "inspect", ".", "isroutine", "(", "a", ")", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
sub_list
Recursively walk a data-structure sorting any lists along the way. Any unknown types get mapped to string representation :param l: list :return: sorted list, where any child lists are also sorted.
cloudaux/orchestration/openstack/utils.py
def sub_list(l): """ Recursively walk a data-structure sorting any lists along the way. Any unknown types get mapped to string representation :param l: list :return: sorted list, where any child lists are also sorted. """ r = [] for i in l: if type(i) in prims: r.ap...
def sub_list(l): """ Recursively walk a data-structure sorting any lists along the way. Any unknown types get mapped to string representation :param l: list :return: sorted list, where any child lists are also sorted. """ r = [] for i in l: if type(i) in prims: r.ap...
[ "Recursively", "walk", "a", "data", "-", "structure", "sorting", "any", "lists", "along", "the", "way", ".", "Any", "unknown", "types", "get", "mapped", "to", "string", "representation" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/openstack/utils.py#L38-L58
[ "def", "sub_list", "(", "l", ")", ":", "r", "=", "[", "]", "for", "i", "in", "l", ":", "if", "type", "(", "i", ")", "in", "prims", ":", "r", ".", "append", "(", "i", ")", "elif", "type", "(", "i", ")", "is", "list", ":", "r", ".", "append...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
sub_dict
Recursively walk a data-structure sorting any lists along the way. Any unknown types get mapped to string representation :param d: dict :return: dict where any lists, even those buried deep in the structure, have been sorted.
cloudaux/orchestration/openstack/utils.py
def sub_dict(d): """ Recursively walk a data-structure sorting any lists along the way. Any unknown types get mapped to string representation :param d: dict :return: dict where any lists, even those buried deep in the structure, have been sorted. """ r = {} for k in d: if type(d...
def sub_dict(d): """ Recursively walk a data-structure sorting any lists along the way. Any unknown types get mapped to string representation :param d: dict :return: dict where any lists, even those buried deep in the structure, have been sorted. """ r = {} for k in d: if type(d...
[ "Recursively", "walk", "a", "data", "-", "structure", "sorting", "any", "lists", "along", "the", "way", ".", "Any", "unknown", "types", "get", "mapped", "to", "string", "representation" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/openstack/utils.py#L61-L79
[ "def", "sub_dict", "(", "d", ")", ":", "r", "=", "{", "}", "for", "k", "in", "d", ":", "if", "type", "(", "d", "[", "k", "]", ")", "in", "prims", ":", "r", "[", "k", "]", "=", "d", "[", "k", "]", "elif", "type", "(", "d", "[", "k", "]...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
boto3_cached_conn
Used to obtain a boto3 client or resource connection. For cross account, provide both account_number and assume_role. :usage: # Same Account: client = boto3_cached_conn('iam') resource = boto3_cached_conn('iam', service_type='resource') # Cross Account Client: client = boto3_cached_conn('...
cloudaux/aws/sts.py
def boto3_cached_conn(service, service_type='client', future_expiration_minutes=15, account_number=None, assume_role=None, session_name='cloudaux', region='us-east-1', return_credentials=False, external_id=None, arn_partition='aws'): """ Used to obtain a boto3 client ...
def boto3_cached_conn(service, service_type='client', future_expiration_minutes=15, account_number=None, assume_role=None, session_name='cloudaux', region='us-east-1', return_credentials=False, external_id=None, arn_partition='aws'): """ Used to obtain a boto3 client ...
[ "Used", "to", "obtain", "a", "boto3", "client", "or", "resource", "connection", ".", "For", "cross", "account", "provide", "both", "account_number", "and", "assume_role", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/sts.py#L64-L148
[ "def", "boto3_cached_conn", "(", "service", ",", "service_type", "=", "'client'", ",", "future_expiration_minutes", "=", "15", ",", "account_number", "=", "None", ",", "assume_role", "=", "None", ",", "session_name", "=", "'cloudaux'", ",", "region", "=", "'us-e...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
sts_conn
This will wrap all calls with an STS AssumeRole if the required parameters are sent over. Namely, it requires the following in the kwargs: - Service Type (Required) - Account Number (Required for Assume Role) - IAM Role Name (Required for Assume Role) - Region (Optional, but recommended) - AWS P...
cloudaux/aws/sts.py
def sts_conn(service, service_type='client', future_expiration_minutes=15): """ This will wrap all calls with an STS AssumeRole if the required parameters are sent over. Namely, it requires the following in the kwargs: - Service Type (Required) - Account Number (Required for Assume Role) - IAM R...
def sts_conn(service, service_type='client', future_expiration_minutes=15): """ This will wrap all calls with an STS AssumeRole if the required parameters are sent over. Namely, it requires the following in the kwargs: - Service Type (Required) - Account Number (Required for Assume Role) - IAM R...
[ "This", "will", "wrap", "all", "calls", "with", "an", "STS", "AssumeRole", "if", "the", "required", "parameters", "are", "sent", "over", ".", "Namely", "it", "requires", "the", "following", "in", "the", "kwargs", ":", "-", "Service", "Type", "(", "Required...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/sts.py#L151-L190
[ "def", "sts_conn", "(", "service", ",", "service_type", "=", "'client'", ",", "future_expiration_minutes", "=", "15", ")", ":", "def", "decorator", "(", "f", ")", ":", "@", "wraps", "(", "f", ")", "def", "decorated_function", "(", "*", "args", ",", "*", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
list_bucket_analytics_configurations
Bucket='string'
cloudaux/aws/s3.py
def list_bucket_analytics_configurations(client=None, **kwargs): """ Bucket='string' """ result = client.list_bucket_analytics_configurations(**kwargs) if not result.get("AnalyticsConfigurationList"): result.update({"AnalyticsConfigurationList": []}) return result
def list_bucket_analytics_configurations(client=None, **kwargs): """ Bucket='string' """ result = client.list_bucket_analytics_configurations(**kwargs) if not result.get("AnalyticsConfigurationList"): result.update({"AnalyticsConfigurationList": []}) return result
[ "Bucket", "=", "string" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/s3.py#L135-L143
[ "def", "list_bucket_analytics_configurations", "(", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "result", "=", "client", ".", "list_bucket_analytics_configurations", "(", "*", "*", "kwargs", ")", "if", "not", "result", ".", "get", "(", "\"Analyti...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
list_bucket_metrics_configurations
Bucket='string'
cloudaux/aws/s3.py
def list_bucket_metrics_configurations(client=None, **kwargs): """ Bucket='string' """ result = client.list_bucket_metrics_configurations(**kwargs) if not result.get("MetricsConfigurationList"): result.update({"MetricsConfigurationList": []}) return result
def list_bucket_metrics_configurations(client=None, **kwargs): """ Bucket='string' """ result = client.list_bucket_metrics_configurations(**kwargs) if not result.get("MetricsConfigurationList"): result.update({"MetricsConfigurationList": []}) return result
[ "Bucket", "=", "string" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/s3.py#L150-L158
[ "def", "list_bucket_metrics_configurations", "(", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "result", "=", "client", ".", "list_bucket_metrics_configurations", "(", "*", "*", "kwargs", ")", "if", "not", "result", ".", "get", "(", "\"MetricsConf...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
list_bucket_inventory_configurations
Bucket='string'
cloudaux/aws/s3.py
def list_bucket_inventory_configurations(client=None, **kwargs): """ Bucket='string' """ result = client.list_bucket_inventory_configurations(**kwargs) if not result.get("InventoryConfigurationList"): result.update({"InventoryConfigurationList": []}) return result
def list_bucket_inventory_configurations(client=None, **kwargs): """ Bucket='string' """ result = client.list_bucket_inventory_configurations(**kwargs) if not result.get("InventoryConfigurationList"): result.update({"InventoryConfigurationList": []}) return result
[ "Bucket", "=", "string" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/s3.py#L165-L173
[ "def", "list_bucket_inventory_configurations", "(", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "result", "=", "client", ".", "list_bucket_inventory_configurations", "(", "*", "*", "kwargs", ")", "if", "not", "result", ".", "get", "(", "\"Invento...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_queue
Orchestrates all the calls required to fully fetch details about an SQS Queue: { "Arn": ..., "Region": ..., "Name": ..., "Url": ..., "Attributes": ..., "Tags": ..., "DeadLetterSourceQueues": ..., "_version": 1 } :param queue: Either the q...
cloudaux/orchestration/aws/sqs.py
def get_queue(queue, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully fetch details about an SQS Queue: { "Arn": ..., "Region": ..., "Name": ..., "Url": ..., "Attributes": ..., "Tags": ..., "DeadLetterSourceQueues": ..., ...
def get_queue(queue, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully fetch details about an SQS Queue: { "Arn": ..., "Region": ..., "Name": ..., "Url": ..., "Attributes": ..., "Tags": ..., "DeadLetterSourceQueues": ..., ...
[ "Orchestrates", "all", "the", "calls", "required", "to", "fully", "fetch", "details", "about", "an", "SQS", "Queue", ":", "{", "Arn", ":", "...", "Region", ":", "...", "Name", ":", "...", "Url", ":", "...", "Attributes", ":", "...", "Tags", ":", "...",...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/sqs.py#L43-L72
[ "def", "get_queue", "(", "queue", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "# Check if this is a Queue URL or a queue name:", "if", "queue", ".", "startswith", "(", "\"https://\"", ")", "or", "queue", ".", "startswith", "(", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_bucket
Orchestrates all the calls required to fully build out an S3 bucket in the following format: { "Arn": ..., "Name": ..., "Region": ..., "Owner": ..., "Grants": ..., "GrantReferences": ..., "LifecycleRules": ..., "Logging": ..., "Policy": .....
cloudaux/orchestration/aws/s3.py
def get_bucket(bucket_name, include_created=None, flags=FLAGS.ALL ^ FLAGS.CREATED_DATE, **conn): """ Orchestrates all the calls required to fully build out an S3 bucket in the following format: { "Arn": ..., "Name": ..., "Region": ..., "Owner": ..., "Grants": ......
def get_bucket(bucket_name, include_created=None, flags=FLAGS.ALL ^ FLAGS.CREATED_DATE, **conn): """ Orchestrates all the calls required to fully build out an S3 bucket in the following format: { "Arn": ..., "Name": ..., "Region": ..., "Owner": ..., "Grants": ......
[ "Orchestrates", "all", "the", "calls", "required", "to", "fully", "build", "out", "an", "S3", "bucket", "in", "the", "following", "format", ":", "{", "Arn", ":", "...", "Name", ":", "...", "Region", ":", "...", "Owner", ":", "...", "Grants", ":", "..."...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/s3.py#L283-L333
[ "def", "get_bucket", "(", "bucket_name", ",", "include_created", "=", "None", ",", "flags", "=", "FLAGS", ".", "ALL", "^", "FLAGS", ".", "CREATED_DATE", ",", "*", "*", "conn", ")", ":", "if", "type", "(", "include_created", ")", "is", "bool", ":", "# c...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_get_base
Determine whether the boto get_role call needs to be made or if we already have all that data in the role object. :param role: dict containing (at the very least) role_name and/or arn. :param conn: dict containing enough information to make a connection to the desired account. :return: Camelized dict de...
cloudaux/orchestration/aws/iam/role.py
def _get_base(role, **conn): """ Determine whether the boto get_role call needs to be made or if we already have all that data in the role object. :param role: dict containing (at the very least) role_name and/or arn. :param conn: dict containing enough information to make a connection to the desire...
def _get_base(role, **conn): """ Determine whether the boto get_role call needs to be made or if we already have all that data in the role object. :param role: dict containing (at the very least) role_name and/or arn. :param conn: dict containing enough information to make a connection to the desire...
[ "Determine", "whether", "the", "boto", "get_role", "call", "needs", "to", "be", "made", "or", "if", "we", "already", "have", "all", "that", "data", "in", "the", "role", "object", ".", ":", "param", "role", ":", "dict", "containing", "(", "at", "the", "...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/role.py#L52-L77
[ "def", "_get_base", "(", "role", ",", "*", "*", "conn", ")", ":", "base_fields", "=", "frozenset", "(", "[", "'Arn'", ",", "'AssumeRolePolicyDocument'", ",", "'Path'", ",", "'RoleId'", ",", "'RoleName'", ",", "'CreateDate'", "]", ")", "needs_base", "=", "F...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_role
Orchestrates all the calls required to fully build out an IAM Role in the following format: { "Arn": ..., "AssumeRolePolicyDocument": ..., "CreateDate": ..., # str "InlinePolicies": ..., "InstanceProfiles": ..., "ManagedPolicies": ..., "Path": ..., "...
cloudaux/orchestration/aws/iam/role.py
def get_role(role, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully build out an IAM Role in the following format: { "Arn": ..., "AssumeRolePolicyDocument": ..., "CreateDate": ..., # str "InlinePolicies": ..., "InstanceProfiles": ..., ...
def get_role(role, flags=FLAGS.ALL, **conn): """ Orchestrates all the calls required to fully build out an IAM Role in the following format: { "Arn": ..., "AssumeRolePolicyDocument": ..., "CreateDate": ..., # str "InlinePolicies": ..., "InstanceProfiles": ..., ...
[ "Orchestrates", "all", "the", "calls", "required", "to", "fully", "build", "out", "an", "IAM", "Role", "in", "the", "following", "format", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/role.py#L81-L107
[ "def", "get_role", "(", "role", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "role", "=", "modify", "(", "role", ",", "output", "=", "'camelized'", ")", "_conn_from_args", "(", "role", ",", "conn", ")", "return", "registry...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_all_roles
Returns a List of Roles represented as the dictionary below: { "Arn": ..., "AssumeRolePolicyDocument": ..., "CreateDate": ..., # str "InlinePolicies": ..., "InstanceProfiles": ..., "ManagedPolicies": ..., "Path": ..., "RoleId": ..., "RoleName...
cloudaux/orchestration/aws/iam/role.py
def get_all_roles(**conn): """ Returns a List of Roles represented as the dictionary below: { "Arn": ..., "AssumeRolePolicyDocument": ..., "CreateDate": ..., # str "InlinePolicies": ..., "InstanceProfiles": ..., "ManagedPolicies": ..., "Path": ..., ...
def get_all_roles(**conn): """ Returns a List of Roles represented as the dictionary below: { "Arn": ..., "AssumeRolePolicyDocument": ..., "CreateDate": ..., # str "InlinePolicies": ..., "InstanceProfiles": ..., "ManagedPolicies": ..., "Path": ..., ...
[ "Returns", "a", "List", "of", "Roles", "represented", "as", "the", "dictionary", "below", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/role.py#L110-L159
[ "def", "get_all_roles", "(", "*", "*", "conn", ")", ":", "roles", "=", "[", "]", "account_roles", "=", "get_account_authorization_details", "(", "'Role'", ",", "*", "*", "conn", ")", "for", "role", "in", "account_roles", ":", "roles", ".", "append", "(", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_get_policy
Get LambdaFunction Policies. (there can be many of these!) Lambda Function Policies are overly complicated. They can be attached to a label, a version, and there is also a default policy. This method attempts to gather all three types. AWS returns an exception if the policy requested do...
cloudaux/orchestration/aws/lambda_function.py
def _get_policy(lambda_function, **conn): """Get LambdaFunction Policies. (there can be many of these!) Lambda Function Policies are overly complicated. They can be attached to a label, a version, and there is also a default policy. This method attempts to gather all three types. AW...
def _get_policy(lambda_function, **conn): """Get LambdaFunction Policies. (there can be many of these!) Lambda Function Policies are overly complicated. They can be attached to a label, a version, and there is also a default policy. This method attempts to gather all three types. AW...
[ "Get", "LambdaFunction", "Policies", ".", "(", "there", "can", "be", "many", "of", "these!", ")", "Lambda", "Function", "Policies", "are", "overly", "complicated", ".", "They", "can", "be", "attached", "to", "a", "label", "a", "version", "and", "there", "i...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/lambda_function.py#L13-L45
[ "def", "_get_policy", "(", "lambda_function", ",", "*", "*", "conn", ")", ":", "policies", "=", "dict", "(", "Versions", "=", "dict", "(", ")", ",", "Aliases", "=", "dict", "(", ")", ",", "DEFAULT", "=", "dict", "(", ")", ")", "for", "version", "in...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_lambda_function
Fully describes a lambda function. Args: lambda_function: Name, ARN, or dictionary of lambda function. If dictionary, should likely be the return value from list_functions. At a minimum, must contain a key titled 'FunctionName'. flags: Flags describing which sections should be included in the r...
cloudaux/orchestration/aws/lambda_function.py
def get_lambda_function(lambda_function, flags=FLAGS.ALL, **conn): """Fully describes a lambda function. Args: lambda_function: Name, ARN, or dictionary of lambda function. If dictionary, should likely be the return value from list_functions. At a minimum, must contain a key titled 'FunctionName'. ...
def get_lambda_function(lambda_function, flags=FLAGS.ALL, **conn): """Fully describes a lambda function. Args: lambda_function: Name, ARN, or dictionary of lambda function. If dictionary, should likely be the return value from list_functions. At a minimum, must contain a key titled 'FunctionName'. ...
[ "Fully", "describes", "a", "lambda", "function", ".", "Args", ":", "lambda_function", ":", "Name", "ARN", "or", "dictionary", "of", "lambda", "function", ".", "If", "dictionary", "should", "likely", "be", "the", "return", "value", "from", "list_functions", "."...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/lambda_function.py#L99-L132
[ "def", "get_lambda_function", "(", "lambda_function", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "# Python 2 and 3 support:", "try", ":", "basestring", "except", "NameError", "as", "_", ":", "basestring", "=", "str", "# If STR is ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
list_items
:rtype: ``list``
cloudaux/openstack/utils.py
def list_items(conn=None, **kwargs): """ :rtype: ``list`` """ return [x for x in getattr( getattr( conn, kwargs.pop('service') ), kwargs.pop('generator'))(**kwargs)]
def list_items(conn=None, **kwargs): """ :rtype: ``list`` """ return [x for x in getattr( getattr( conn, kwargs.pop('service') ), kwargs.pop('generator'))(**kwargs)]
[ ":", "rtype", ":", "list" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/openstack/utils.py#L11-L16
[ "def", "list_items", "(", "conn", "=", "None", ",", "*", "*", "kwargs", ")", ":", "return", "[", "x", "for", "x", "in", "getattr", "(", "getattr", "(", "conn", ",", "kwargs", ".", "pop", "(", "'service'", ")", ")", ",", "kwargs", ".", "pop", "(",...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_serviceaccount
service_account='string'
cloudaux/gcp/iam.py
def get_serviceaccount(client=None, **kwargs): """ service_account='string' """ service_account=kwargs.pop('service_account') resp = client.projects().serviceAccounts().get( name=service_account).execute() return resp
def get_serviceaccount(client=None, **kwargs): """ service_account='string' """ service_account=kwargs.pop('service_account') resp = client.projects().serviceAccounts().get( name=service_account).execute() return resp
[ "service_account", "=", "string" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/iam.py#L17-L24
[ "def", "get_serviceaccount", "(", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "service_account", "=", "kwargs", ".", "pop", "(", "'service_account'", ")", "resp", "=", "client", ".", "projects", "(", ")", ".", "serviceAccounts", "(", ")", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_serviceaccount_keys
service_account='string'
cloudaux/gcp/iam.py
def get_serviceaccount_keys(client=None, **kwargs): """ service_account='string' """ service_account=kwargs.pop('service_account') kwargs['name'] = service_account return service_list(client.projects().serviceAccounts().keys(), key_name='keys', **kwargs)
def get_serviceaccount_keys(client=None, **kwargs): """ service_account='string' """ service_account=kwargs.pop('service_account') kwargs['name'] = service_account return service_list(client.projects().serviceAccounts().keys(), key_name='keys', **kwargs)
[ "service_account", "=", "string" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/iam.py#L27-L34
[ "def", "get_serviceaccount_keys", "(", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "service_account", "=", "kwargs", ".", "pop", "(", "'service_account'", ")", "kwargs", "[", "'name'", "]", "=", "service_account", "return", "service_list", "(", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_iam_policy
service_account='string'
cloudaux/gcp/iam.py
def get_iam_policy(client=None, **kwargs): """ service_account='string' """ service_account=kwargs.pop('service_account') resp = client.projects().serviceAccounts().getIamPolicy( resource=service_account).execute() # TODO(supertom): err handling, check if 'bindings' is correct if 'bi...
def get_iam_policy(client=None, **kwargs): """ service_account='string' """ service_account=kwargs.pop('service_account') resp = client.projects().serviceAccounts().getIamPolicy( resource=service_account).execute() # TODO(supertom): err handling, check if 'bindings' is correct if 'bi...
[ "service_account", "=", "string" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/gcp/iam.py#L36-L47
[ "def", "get_iam_policy", "(", "client", "=", "None", ",", "*", "*", "kwargs", ")", ":", "service_account", "=", "kwargs", ".", "pop", "(", "'service_account'", ")", "resp", "=", "client", ".", "projects", "(", ")", ".", "serviceAccounts", "(", ")", ".", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_vault
Orchestrates calls to build a Glacier Vault in the following format: { "VaultARN": ..., "VaultName": ..., "CreationDate" ..., "LastInventoryDate" ..., "NumberOfArchives" ..., "SizeInBytes" ..., "Policy" ..., "Tags" ... } Args: vault_ob...
cloudaux/orchestration/aws/glacier.py
def get_vault(vault_obj, flags=FLAGS.ALL, **conn): """ Orchestrates calls to build a Glacier Vault in the following format: { "VaultARN": ..., "VaultName": ..., "CreationDate" ..., "LastInventoryDate" ..., "NumberOfArchives" ..., "SizeInBytes" ..., "P...
def get_vault(vault_obj, flags=FLAGS.ALL, **conn): """ Orchestrates calls to build a Glacier Vault in the following format: { "VaultARN": ..., "VaultName": ..., "CreationDate" ..., "LastInventoryDate" ..., "NumberOfArchives" ..., "SizeInBytes" ..., "P...
[ "Orchestrates", "calls", "to", "build", "a", "Glacier", "Vault", "in", "the", "following", "format", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/glacier.py#L35-L63
[ "def", "get_vault", "(", "vault_obj", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "if", "isinstance", "(", "vault_obj", ",", "string_types", ")", ":", "vault_arn", "=", "ARN", "(", "vault_obj", ")", "if", "vault_arn", ".", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_rules
format the rule fields to match AWS to support auditor reuse, will need to remap back if we want to orchestrate from our stored items
cloudaux/orchestration/openstack/security_group.py
def get_rules(security_group, **kwargs): """ format the rule fields to match AWS to support auditor reuse, will need to remap back if we want to orchestrate from our stored items """ rules = security_group.pop('security_group_rules',[]) for rule in rules: rule['ip_protocol'] = rule.pop('prot...
def get_rules(security_group, **kwargs): """ format the rule fields to match AWS to support auditor reuse, will need to remap back if we want to orchestrate from our stored items """ rules = security_group.pop('security_group_rules',[]) for rule in rules: rule['ip_protocol'] = rule.pop('prot...
[ "format", "the", "rule", "fields", "to", "match", "AWS", "to", "support", "auditor", "reuse", "will", "need", "to", "remap", "back", "if", "we", "want", "to", "orchestrate", "from", "our", "stored", "items" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/openstack/security_group.py#L44-L55
[ "def", "get_rules", "(", "security_group", ",", "*", "*", "kwargs", ")", ":", "rules", "=", "security_group", ".", "pop", "(", "'security_group_rules'", ",", "[", "]", ")", "for", "rule", "in", "rules", ":", "rule", "[", "'ip_protocol'", "]", "=", "rule"...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_security_group
just store the AWS formatted rules
cloudaux/orchestration/openstack/security_group.py
def get_security_group(security_group, flags=FLAGS.ALL, **kwargs): result = registry.build_out(flags, start_with=security_group, pass_datastructure=True, **kwargs) """ just store the AWS formatted rules """ result.pop('security_group_rules', []) return result
def get_security_group(security_group, flags=FLAGS.ALL, **kwargs): result = registry.build_out(flags, start_with=security_group, pass_datastructure=True, **kwargs) """ just store the AWS formatted rules """ result.pop('security_group_rules', []) return result
[ "just", "store", "the", "AWS", "formatted", "rules" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/openstack/security_group.py#L57-L61
[ "def", "get_security_group", "(", "security_group", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "kwargs", ")", ":", "result", "=", "registry", ".", "build_out", "(", "flags", ",", "start_with", "=", "security_group", ",", "pass_datastructure", "="...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_conn_from_arn
Extracts the account number from an ARN. :param arn: Amazon ARN containing account number. :return: dictionary with a single account_number key that can be merged with an existing connection dictionary containing fields such as assume_role, session_name, region.
cloudaux/orchestration/aws/__init__.py
def _conn_from_arn(arn): """ Extracts the account number from an ARN. :param arn: Amazon ARN containing account number. :return: dictionary with a single account_number key that can be merged with an existing connection dictionary containing fields such as assume_role, session_name, region. """ ...
def _conn_from_arn(arn): """ Extracts the account number from an ARN. :param arn: Amazon ARN containing account number. :return: dictionary with a single account_number key that can be merged with an existing connection dictionary containing fields such as assume_role, session_name, region. """ ...
[ "Extracts", "the", "account", "number", "from", "an", "ARN", ".", ":", "param", "arn", ":", "Amazon", "ARN", "containing", "account", "number", ".", ":", "return", ":", "dictionary", "with", "a", "single", "account_number", "key", "that", "can", "be", "mer...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/__init__.py#L13-L25
[ "def", "_conn_from_arn", "(", "arn", ")", ":", "arn", "=", "ARN", "(", "arn", ")", "if", "arn", ".", "error", ":", "raise", "CloudAuxException", "(", "'Bad ARN: {arn}'", ".", "format", "(", "arn", "=", "arn", ")", ")", "return", "dict", "(", "account_n...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_get_name_from_structure
Given a possibly sparsely populated item dictionary, try to retrieve the item name. First try the default field. If that doesn't exist, try to parse the from the ARN. :param item: dict containing (at the very least) item_name and/or arn :return: item name
cloudaux/orchestration/aws/__init__.py
def _get_name_from_structure(item, default): """ Given a possibly sparsely populated item dictionary, try to retrieve the item name. First try the default field. If that doesn't exist, try to parse the from the ARN. :param item: dict containing (at the very least) item_name and/or arn :return: item...
def _get_name_from_structure(item, default): """ Given a possibly sparsely populated item dictionary, try to retrieve the item name. First try the default field. If that doesn't exist, try to parse the from the ARN. :param item: dict containing (at the very least) item_name and/or arn :return: item...
[ "Given", "a", "possibly", "sparsely", "populated", "item", "dictionary", "try", "to", "retrieve", "the", "item", "name", ".", "First", "try", "the", "default", "field", ".", "If", "that", "doesn", "t", "exist", "try", "to", "parse", "the", "from", "the", ...
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/__init__.py#L28-L45
[ "def", "_get_name_from_structure", "(", "item", ",", "default", ")", ":", "if", "item", ".", "get", "(", "default", ")", ":", "return", "item", ".", "get", "(", "default", ")", "if", "item", ".", "get", "(", "'Arn'", ")", ":", "arn", "=", "item", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
describe_load_balancers
Permission: elasticloadbalancing:DescribeLoadBalancers
cloudaux/aws/elbv2.py
def describe_load_balancers(arns=None, names=None, client=None): """ Permission: elasticloadbalancing:DescribeLoadBalancers """ kwargs = dict() if arns: kwargs.update(dict(LoadBalancerArns=arns)) if names: kwargs.update(dict(Names=names)) return client.describe_load_balancers...
def describe_load_balancers(arns=None, names=None, client=None): """ Permission: elasticloadbalancing:DescribeLoadBalancers """ kwargs = dict() if arns: kwargs.update(dict(LoadBalancerArns=arns)) if names: kwargs.update(dict(Names=names)) return client.describe_load_balancers...
[ "Permission", ":", "elasticloadbalancing", ":", "DescribeLoadBalancers" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/elbv2.py#L9-L18
[ "def", "describe_load_balancers", "(", "arns", "=", "None", ",", "names", "=", "None", ",", "client", "=", "None", ")", ":", "kwargs", "=", "dict", "(", ")", "if", "arns", ":", "kwargs", ".", "update", "(", "dict", "(", "LoadBalancerArns", "=", "arns",...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
describe_listeners
Permission: elasticloadbalancing:DescribeListeners
cloudaux/aws/elbv2.py
def describe_listeners(load_balancer_arn=None, listener_arns=None, client=None): """ Permission: elasticloadbalancing:DescribeListeners """ kwargs = dict() if load_balancer_arn: kwargs.update(dict(LoadBalancerArn=load_balancer_arn)) if listener_arns: kwargs.update(dict(ListenerAr...
def describe_listeners(load_balancer_arn=None, listener_arns=None, client=None): """ Permission: elasticloadbalancing:DescribeListeners """ kwargs = dict() if load_balancer_arn: kwargs.update(dict(LoadBalancerArn=load_balancer_arn)) if listener_arns: kwargs.update(dict(ListenerAr...
[ "Permission", ":", "elasticloadbalancing", ":", "DescribeListeners" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/elbv2.py#L24-L33
[ "def", "describe_listeners", "(", "load_balancer_arn", "=", "None", ",", "listener_arns", "=", "None", ",", "client", "=", "None", ")", ":", "kwargs", "=", "dict", "(", ")", "if", "load_balancer_arn", ":", "kwargs", ".", "update", "(", "dict", "(", "LoadBa...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
describe_rules
Permission: elasticloadbalancing:DescribeRules
cloudaux/aws/elbv2.py
def describe_rules(listener_arn=None, rule_arns=None, client=None): """ Permission: elasticloadbalancing:DescribeRules """ kwargs = dict() if listener_arn: kwargs.update(dict(ListenerArn=listener_arn)) if rule_arns: kwargs.update(dict(RuleArns=rule_arns)) return client.descri...
def describe_rules(listener_arn=None, rule_arns=None, client=None): """ Permission: elasticloadbalancing:DescribeRules """ kwargs = dict() if listener_arn: kwargs.update(dict(ListenerArn=listener_arn)) if rule_arns: kwargs.update(dict(RuleArns=rule_arns)) return client.descri...
[ "Permission", ":", "elasticloadbalancing", ":", "DescribeRules" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/elbv2.py#L48-L57
[ "def", "describe_rules", "(", "listener_arn", "=", "None", ",", "rule_arns", "=", "None", ",", "client", "=", "None", ")", ":", "kwargs", "=", "dict", "(", ")", "if", "listener_arn", ":", "kwargs", ".", "update", "(", "dict", "(", "ListenerArn", "=", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
describe_target_groups
Permission: elasticloadbalancing:DescribeTargetGroups
cloudaux/aws/elbv2.py
def describe_target_groups(load_balancer_arn=None, target_group_arns=None, names=None, client=None): """ Permission: elasticloadbalancing:DescribeTargetGroups """ kwargs = dict() if load_balancer_arn: kwargs.update(LoadBalancerArn=load_balancer_arn) if target_group_arns: kwargs.u...
def describe_target_groups(load_balancer_arn=None, target_group_arns=None, names=None, client=None): """ Permission: elasticloadbalancing:DescribeTargetGroups """ kwargs = dict() if load_balancer_arn: kwargs.update(LoadBalancerArn=load_balancer_arn) if target_group_arns: kwargs.u...
[ "Permission", ":", "elasticloadbalancing", ":", "DescribeTargetGroups" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/elbv2.py#L88-L99
[ "def", "describe_target_groups", "(", "load_balancer_arn", "=", "None", ",", "target_group_arns", "=", "None", ",", "names", "=", "None", ",", "client", "=", "None", ")", ":", "kwargs", "=", "dict", "(", ")", "if", "load_balancer_arn", ":", "kwargs", ".", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
describe_target_health
Permission: elasticloadbalancing:DescribeTargetHealth
cloudaux/aws/elbv2.py
def describe_target_health(target_group_arn, targets=None, client=None): """ Permission: elasticloadbalancing:DescribeTargetHealth """ kwargs = dict(TargetGroupArn=target_group_arn) if targets: kwargs.update(Targets=targets) return client.describe_target_health(**kwargs)['TargetHealthDes...
def describe_target_health(target_group_arn, targets=None, client=None): """ Permission: elasticloadbalancing:DescribeTargetHealth """ kwargs = dict(TargetGroupArn=target_group_arn) if targets: kwargs.update(Targets=targets) return client.describe_target_health(**kwargs)['TargetHealthDes...
[ "Permission", ":", "elasticloadbalancing", ":", "DescribeTargetHealth" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/aws/elbv2.py#L104-L111
[ "def", "describe_target_health", "(", "target_group_arn", ",", "targets", "=", "None", ",", "client", "=", "None", ")", ":", "kwargs", "=", "dict", "(", "TargetGroupArn", "=", "target_group_arn", ")", "if", "targets", ":", "kwargs", ".", "update", "(", "Targ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_inline_policies
Get the inline policies for the group.
cloudaux/orchestration/aws/iam/group.py
def get_inline_policies(group, **conn): """Get the inline policies for the group.""" policy_list = list_group_policies(group['GroupName']) policy_documents = {} for policy in policy_list: policy_documents[policy] = get_group_policy_document(group['GroupName'], policy, **conn) return polic...
def get_inline_policies(group, **conn): """Get the inline policies for the group.""" policy_list = list_group_policies(group['GroupName']) policy_documents = {} for policy in policy_list: policy_documents[policy] = get_group_policy_document(group['GroupName'], policy, **conn) return polic...
[ "Get", "the", "inline", "policies", "for", "the", "group", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/group.py#L23-L32
[ "def", "get_inline_policies", "(", "group", ",", "*", "*", "conn", ")", ":", "policy_list", "=", "list_group_policies", "(", "group", "[", "'GroupName'", "]", ")", "policy_documents", "=", "{", "}", "for", "policy", "in", "policy_list", ":", "policy_documents"...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_managed_policies
Get a list of the managed policy names that are attached to the group.
cloudaux/orchestration/aws/iam/group.py
def get_managed_policies(group, **conn): """Get a list of the managed policy names that are attached to the group.""" managed_policies = list_attached_group_managed_policies(group['GroupName'], **conn) managed_policy_names = [] for policy in managed_policies: managed_policy_names.append(policy...
def get_managed_policies(group, **conn): """Get a list of the managed policy names that are attached to the group.""" managed_policies = list_attached_group_managed_policies(group['GroupName'], **conn) managed_policy_names = [] for policy in managed_policies: managed_policy_names.append(policy...
[ "Get", "a", "list", "of", "the", "managed", "policy", "names", "that", "are", "attached", "to", "the", "group", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/group.py#L36-L45
[ "def", "get_managed_policies", "(", "group", ",", "*", "*", "conn", ")", ":", "managed_policies", "=", "list_attached_group_managed_policies", "(", "group", "[", "'GroupName'", "]", ",", "*", "*", "conn", ")", "managed_policy_names", "=", "[", "]", "for", "pol...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_users
Gets a list of the usernames that are a part of this group.
cloudaux/orchestration/aws/iam/group.py
def get_users(group, **conn): """Gets a list of the usernames that are a part of this group.""" group_details = get_group_api(group['GroupName'], **conn) user_list = [] for user in group_details.get('Users', []): user_list.append(user['UserName']) return user_list
def get_users(group, **conn): """Gets a list of the usernames that are a part of this group.""" group_details = get_group_api(group['GroupName'], **conn) user_list = [] for user in group_details.get('Users', []): user_list.append(user['UserName']) return user_list
[ "Gets", "a", "list", "of", "the", "usernames", "that", "are", "a", "part", "of", "this", "group", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/group.py#L49-L57
[ "def", "get_users", "(", "group", ",", "*", "*", "conn", ")", ":", "group_details", "=", "get_group_api", "(", "group", "[", "'GroupName'", "]", ",", "*", "*", "conn", ")", "user_list", "=", "[", "]", "for", "user", "in", "group_details", ".", "get", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_get_base
Fetch the base IAM Group.
cloudaux/orchestration/aws/iam/group.py
def _get_base(group, **conn): """Fetch the base IAM Group.""" group['_version'] = 1 # Get the initial group details (only needed if we didn't grab the users): group.update(get_group_api(group['GroupName'], users=False, **conn)['Group']) # Cast CreateDate from a datetime to something JSON serializa...
def _get_base(group, **conn): """Fetch the base IAM Group.""" group['_version'] = 1 # Get the initial group details (only needed if we didn't grab the users): group.update(get_group_api(group['GroupName'], users=False, **conn)['Group']) # Cast CreateDate from a datetime to something JSON serializa...
[ "Fetch", "the", "base", "IAM", "Group", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/group.py#L61-L70
[ "def", "_get_base", "(", "group", ",", "*", "*", "conn", ")", ":", "group", "[", "'_version'", "]", "=", "1", "# Get the initial group details (only needed if we didn't grab the users):", "group", ".", "update", "(", "get_group_api", "(", "group", "[", "'GroupName'"...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_group
Orchestrates all the calls required to fully build out an IAM Group in the following format: { "Arn": ..., "GroupName": ..., "Path": ..., "GroupId": ..., "CreateDate": ..., # str "InlinePolicies": ..., "ManagedPolicies": ..., # These are just the names of t...
cloudaux/orchestration/aws/iam/group.py
def get_group(group, flags=FLAGS.BASE | FLAGS.INLINE_POLICIES | FLAGS.MANAGED_POLICIES, **conn): """ Orchestrates all the calls required to fully build out an IAM Group in the following format: { "Arn": ..., "GroupName": ..., "Path": ..., "GroupId": ..., "CreateDate"...
def get_group(group, flags=FLAGS.BASE | FLAGS.INLINE_POLICIES | FLAGS.MANAGED_POLICIES, **conn): """ Orchestrates all the calls required to fully build out an IAM Group in the following format: { "Arn": ..., "GroupName": ..., "Path": ..., "GroupId": ..., "CreateDate"...
[ "Orchestrates", "all", "the", "calls", "required", "to", "fully", "build", "out", "an", "IAM", "Group", "in", "the", "following", "format", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/group.py#L74-L103
[ "def", "get_group", "(", "group", ",", "flags", "=", "FLAGS", ".", "BASE", "|", "FLAGS", ".", "INLINE_POLICIES", "|", "FLAGS", ".", "MANAGED_POLICIES", ",", "*", "*", "conn", ")", ":", "if", "not", "group", ".", "get", "(", "'GroupName'", ")", ":", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_base
Fetch the base Managed Policy. This includes the base policy and the latest version document. :param managed_policy: :param conn: :return:
cloudaux/orchestration/aws/iam/managed_policy.py
def get_base(managed_policy, **conn): """Fetch the base Managed Policy. This includes the base policy and the latest version document. :param managed_policy: :param conn: :return: """ managed_policy['_version'] = 1 arn = _get_name_from_structure(managed_policy, 'Arn') policy = get...
def get_base(managed_policy, **conn): """Fetch the base Managed Policy. This includes the base policy and the latest version document. :param managed_policy: :param conn: :return: """ managed_policy['_version'] = 1 arn = _get_name_from_structure(managed_policy, 'Arn') policy = get...
[ "Fetch", "the", "base", "Managed", "Policy", "." ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/managed_policy.py#L21-L43
[ "def", "get_base", "(", "managed_policy", ",", "*", "*", "conn", ")", ":", "managed_policy", "[", "'_version'", "]", "=", "1", "arn", "=", "_get_name_from_structure", "(", "managed_policy", ",", "'Arn'", ")", "policy", "=", "get_policy", "(", "arn", ",", "...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
get_managed_policy
Orchestrates all of the calls required to fully build out an IAM Managed Policy in the following format: { "Arn": "...", "PolicyName": "...", "PolicyId": "...", "Path": "...", "DefaultVersionId": "...", "AttachmentCount": 123, "PermissionsBoundaryUsageCount":...
cloudaux/orchestration/aws/iam/managed_policy.py
def get_managed_policy(managed_policy, flags=FLAGS.ALL, **conn): """ Orchestrates all of the calls required to fully build out an IAM Managed Policy in the following format: { "Arn": "...", "PolicyName": "...", "PolicyId": "...", "Path": "...", "DefaultVersionId": "....
def get_managed_policy(managed_policy, flags=FLAGS.ALL, **conn): """ Orchestrates all of the calls required to fully build out an IAM Managed Policy in the following format: { "Arn": "...", "PolicyName": "...", "PolicyId": "...", "Path": "...", "DefaultVersionId": "....
[ "Orchestrates", "all", "of", "the", "calls", "required", "to", "fully", "build", "out", "an", "IAM", "Managed", "Policy", "in", "the", "following", "format", ":" ]
Netflix-Skunkworks/cloudaux
python
https://github.com/Netflix-Skunkworks/cloudaux/blob/c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea/cloudaux/orchestration/aws/iam/managed_policy.py#L47-L73
[ "def", "get_managed_policy", "(", "managed_policy", ",", "flags", "=", "FLAGS", ".", "ALL", ",", "*", "*", "conn", ")", ":", "_conn_from_args", "(", "managed_policy", ",", "conn", ")", "return", "registry", ".", "build_out", "(", "flags", ",", "start_with", ...
c4b0870c3ac68b1c69e71d33cf78b6a8bdf437ea
valid
_name
Get the name out of an object. This varies based on the type of the input: * the "name" of a string is itself * the "name" of None is itself * the "name" of an object with a property named name is that property - as long as it's a string * otherwise, we raise a ValueError
src/geoserver/catalog.py
def _name(named): """Get the name out of an object. This varies based on the type of the input: * the "name" of a string is itself * the "name" of None is itself * the "name" of an object with a property named name is that property - as long as it's a string * otherwise, we rai...
def _name(named): """Get the name out of an object. This varies based on the type of the input: * the "name" of a string is itself * the "name" of None is itself * the "name" of an object with a property named name is that property - as long as it's a string * otherwise, we rai...
[ "Get", "the", "name", "out", "of", "an", "object", ".", "This", "varies", "based", "on", "the", "type", "of", "the", "input", ":", "*", "the", "name", "of", "a", "string", "is", "itself", "*", "the", "name", "of", "None", "is", "itself", "*", "the"...
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L72-L85
[ "def", "_name", "(", "named", ")", ":", "if", "isinstance", "(", "named", ",", "basestring", ")", "or", "named", "is", "None", ":", "return", "named", "elif", "hasattr", "(", "named", ",", "'name'", ")", "and", "isinstance", "(", "named", ".", "name", ...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.get_version
obtain the version or just 2.2.x if < 2.3.x Raises: FailedRequestError: If the request fails.
src/geoserver/catalog.py
def get_version(self): '''obtain the version or just 2.2.x if < 2.3.x Raises: FailedRequestError: If the request fails. ''' if self._version: return self._version url = "{}/about/version.xml".format(self.service_url) resp = self.http_request(url) ...
def get_version(self): '''obtain the version or just 2.2.x if < 2.3.x Raises: FailedRequestError: If the request fails. ''' if self._version: return self._version url = "{}/about/version.xml".format(self.service_url) resp = self.http_request(url) ...
[ "obtain", "the", "version", "or", "just", "2", ".", "2", ".", "x", "if", "<", "2", ".", "3", ".", "x", "Raises", ":", "FailedRequestError", ":", "If", "the", "request", "fails", "." ]
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L157-L185
[ "def", "get_version", "(", "self", ")", ":", "if", "self", ".", "_version", ":", "return", "self", ".", "_version", "url", "=", "\"{}/about/version.xml\"", ".", "format", "(", "self", ".", "service_url", ")", "resp", "=", "self", ".", "http_request", "(", ...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.get_short_version
obtain the shory geoserver version
src/geoserver/catalog.py
def get_short_version(self): '''obtain the shory geoserver version ''' gs_version = self.get_version() match = re.compile(r'[^\d.]+') return match.sub('', gs_version).strip('.')
def get_short_version(self): '''obtain the shory geoserver version ''' gs_version = self.get_version() match = re.compile(r'[^\d.]+') return match.sub('', gs_version).strip('.')
[ "obtain", "the", "shory", "geoserver", "version" ]
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L187-L192
[ "def", "get_short_version", "(", "self", ")", ":", "gs_version", "=", "self", ".", "get_version", "(", ")", "match", "=", "re", ".", "compile", "(", "r'[^\\d.]+'", ")", "return", "match", ".", "sub", "(", "''", ",", "gs_version", ")", ".", "strip", "("...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.delete
send a delete request XXX [more here]
src/geoserver/catalog.py
def delete(self, config_object, purge=None, recurse=False): """ send a delete request XXX [more here] """ rest_url = config_object.href params = [] # purge deletes the SLD from disk when a style is deleted if purge: params.append("purge=" + st...
def delete(self, config_object, purge=None, recurse=False): """ send a delete request XXX [more here] """ rest_url = config_object.href params = [] # purge deletes the SLD from disk when a style is deleted if purge: params.append("purge=" + st...
[ "send", "a", "delete", "request", "XXX", "[", "more", "here", "]" ]
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L194-L225
[ "def", "delete", "(", "self", ",", "config_object", ",", "purge", "=", "None", ",", "recurse", "=", "False", ")", ":", "rest_url", "=", "config_object", ".", "href", "params", "=", "[", "]", "# purge deletes the SLD from disk when a style is deleted", "if", "pur...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.save
saves an object to the REST service gets the object's REST location and the data from the object, then POSTS the request.
src/geoserver/catalog.py
def save(self, obj, content_type="application/xml"): """ saves an object to the REST service gets the object's REST location and the data from the object, then POSTS the request. """ rest_url = obj.href data = obj.message() headers = { "Conten...
def save(self, obj, content_type="application/xml"): """ saves an object to the REST service gets the object's REST location and the data from the object, then POSTS the request. """ rest_url = obj.href data = obj.message() headers = { "Conten...
[ "saves", "an", "object", "to", "the", "REST", "service", "gets", "the", "object", "s", "REST", "location", "and", "the", "data", "from", "the", "object", "then", "POSTS", "the", "request", "." ]
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L264-L285
[ "def", "save", "(", "self", ",", "obj", ",", "content_type", "=", "\"application/xml\"", ")", ":", "rest_url", "=", "obj", ".", "href", "data", "=", "obj", ".", "message", "(", ")", "headers", "=", "{", "\"Content-type\"", ":", "content_type", ",", "\"Ac...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.get_stores
Returns a list of stores in the catalog. If workspaces is specified will only return stores in those workspaces. If names is specified, will only return stores that match. names can either be a comma delimited string or an array. Will return an empty list if no stores are found.
src/geoserver/catalog.py
def get_stores(self, names=None, workspaces=None): ''' Returns a list of stores in the catalog. If workspaces is specified will only return stores in those workspaces. If names is specified, will only return stores that match. names can either be a comma delimited string or an arra...
def get_stores(self, names=None, workspaces=None): ''' Returns a list of stores in the catalog. If workspaces is specified will only return stores in those workspaces. If names is specified, will only return stores that match. names can either be a comma delimited string or an arra...
[ "Returns", "a", "list", "of", "stores", "in", "the", "catalog", ".", "If", "workspaces", "is", "specified", "will", "only", "return", "stores", "in", "those", "workspaces", ".", "If", "names", "is", "specified", "will", "only", "return", "stores", "that", ...
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L295-L328
[ "def", "get_stores", "(", "self", ",", "names", "=", "None", ",", "workspaces", "=", "None", ")", ":", "if", "isinstance", "(", "workspaces", ",", "Workspace", ")", ":", "workspaces", "=", "[", "workspaces", "]", "elif", "isinstance", "(", "workspaces", ...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.get_store
Returns a single store object. Will return None if no store is found. Will raise an error if more than one store with the same name is found.
src/geoserver/catalog.py
def get_store(self, name, workspace=None): ''' Returns a single store object. Will return None if no store is found. Will raise an error if more than one store with the same name is found. ''' stores = self.get_stores(workspaces=workspace, names=name) retur...
def get_store(self, name, workspace=None): ''' Returns a single store object. Will return None if no store is found. Will raise an error if more than one store with the same name is found. ''' stores = self.get_stores(workspaces=workspace, names=name) retur...
[ "Returns", "a", "single", "store", "object", ".", "Will", "return", "None", "if", "no", "store", "is", "found", ".", "Will", "raise", "an", "error", "if", "more", "than", "one", "store", "with", "the", "same", "name", "is", "found", "." ]
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L330-L338
[ "def", "get_store", "(", "self", ",", "name", ",", "workspace", "=", "None", ")", ":", "stores", "=", "self", ".", "get_stores", "(", "workspaces", "=", "workspace", ",", "names", "=", "name", ")", "return", "self", ".", "_return_first_item", "(", "store...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.create_coveragestore
Create a coveragestore for locally hosted rasters. If create_layer is set to true, will create a coverage/layer. layer_name and source_name are only used if create_layer ia enabled. If not specified, the raster name will be used for both.
src/geoserver/catalog.py
def create_coveragestore(self, name, workspace=None, path=None, type='GeoTIFF', create_layer=True, layer_name=None, source_name=None, upload_data=False, contet_type="image/tiff"): """ Create a coveragestore for locally hosted rasters. If create_layer is set to true, ...
def create_coveragestore(self, name, workspace=None, path=None, type='GeoTIFF', create_layer=True, layer_name=None, source_name=None, upload_data=False, contet_type="image/tiff"): """ Create a coveragestore for locally hosted rasters. If create_layer is set to true, ...
[ "Create", "a", "coveragestore", "for", "locally", "hosted", "rasters", ".", "If", "create_layer", "is", "set", "to", "true", "will", "create", "a", "coverage", "/", "layer", ".", "layer_name", "and", "source_name", "are", "only", "used", "if", "create_layer", ...
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L530-L616
[ "def", "create_coveragestore", "(", "self", ",", "name", ",", "workspace", "=", "None", ",", "path", "=", "None", ",", "type", "=", "'GeoTIFF'", ",", "create_layer", "=", "True", ",", "layer_name", "=", "None", ",", "source_name", "=", "None", ",", "uplo...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.add_granule
Harvest/add a granule into an existing imagemosaic
src/geoserver/catalog.py
def add_granule(self, data, store, workspace=None): '''Harvest/add a granule into an existing imagemosaic''' ext = os.path.splitext(data)[-1] if ext == ".zip": type = "file.imagemosaic" upload_data = open(data, 'rb') headers = { "Content-type":...
def add_granule(self, data, store, workspace=None): '''Harvest/add a granule into an existing imagemosaic''' ext = os.path.splitext(data)[-1] if ext == ".zip": type = "file.imagemosaic" upload_data = open(data, 'rb') headers = { "Content-type":...
[ "Harvest", "/", "add", "a", "granule", "into", "an", "existing", "imagemosaic" ]
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L618-L669
[ "def", "add_granule", "(", "self", ",", "data", ",", "store", ",", "workspace", "=", "None", ")", ":", "ext", "=", "os", ".", "path", ".", "splitext", "(", "data", ")", "[", "-", "1", "]", "if", "ext", "==", "\".zip\"", ":", "type", "=", "\"file....
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.delete_granule
Deletes a granule of an existing imagemosaic
src/geoserver/catalog.py
def delete_granule(self, coverage, store, granule_id, workspace=None): '''Deletes a granule of an existing imagemosaic''' params = dict() workspace_name = workspace if isinstance(store, basestring): store_name = store else: store_name = store.name ...
def delete_granule(self, coverage, store, granule_id, workspace=None): '''Deletes a granule of an existing imagemosaic''' params = dict() workspace_name = workspace if isinstance(store, basestring): store_name = store else: store_name = store.name ...
[ "Deletes", "a", "granule", "of", "an", "existing", "imagemosaic" ]
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L671-L713
[ "def", "delete_granule", "(", "self", ",", "coverage", ",", "store", ",", "granule_id", ",", "workspace", "=", "None", ")", ":", "params", "=", "dict", "(", ")", "workspace_name", "=", "workspace", "if", "isinstance", "(", "store", ",", "basestring", ")", ...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.list_granules
List granules of an imagemosaic
src/geoserver/catalog.py
def list_granules(self, coverage, store, workspace=None, filter=None, limit=None, offset=None): '''List granules of an imagemosaic''' params = dict() if filter is not None: params['filter'] = filter if limit is not None: params['limit'] = limit if offset ...
def list_granules(self, coverage, store, workspace=None, filter=None, limit=None, offset=None): '''List granules of an imagemosaic''' params = dict() if filter is not None: params['filter'] = filter if limit is not None: params['limit'] = limit if offset ...
[ "List", "granules", "of", "an", "imagemosaic" ]
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L715-L761
[ "def", "list_granules", "(", "self", ",", "coverage", ",", "store", ",", "workspace", "=", "None", ",", "filter", "=", "None", ",", "limit", "=", "None", ",", "offset", "=", "None", ")", ":", "params", "=", "dict", "(", ")", "if", "filter", "is", "...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.mosaic_coverages
Returns all coverages in a coverage store
src/geoserver/catalog.py
def mosaic_coverages(self, store): '''Returns all coverages in a coverage store''' params = dict() url = build_url( self.service_url, [ "workspaces", store.workspace.name, "coveragestores", store.name, ...
def mosaic_coverages(self, store): '''Returns all coverages in a coverage store''' params = dict() url = build_url( self.service_url, [ "workspaces", store.workspace.name, "coveragestores", store.name, ...
[ "Returns", "all", "coverages", "in", "a", "coverage", "store" ]
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L763-L788
[ "def", "mosaic_coverages", "(", "self", ",", "store", ")", ":", "params", "=", "dict", "(", ")", "url", "=", "build_url", "(", "self", ".", "service_url", ",", "[", "\"workspaces\"", ",", "store", ".", "workspace", ".", "name", ",", "\"coveragestores\"", ...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.publish_featuretype
Publish a featuretype from data in an existing store
src/geoserver/catalog.py
def publish_featuretype(self, name, store, native_crs, srs=None, jdbc_virtual_table=None, native_name=None): '''Publish a featuretype from data in an existing store''' # @todo native_srs doesn't seem to get detected, even when in the DB # metadata (at least for postgis in geometry_columns) and t...
def publish_featuretype(self, name, store, native_crs, srs=None, jdbc_virtual_table=None, native_name=None): '''Publish a featuretype from data in an existing store''' # @todo native_srs doesn't seem to get detected, even when in the DB # metadata (at least for postgis in geometry_columns) and t...
[ "Publish", "a", "featuretype", "from", "data", "in", "an", "existing", "store" ]
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L820-L868
[ "def", "publish_featuretype", "(", "self", ",", "name", ",", "store", ",", "native_crs", ",", "srs", "=", "None", ",", "jdbc_virtual_table", "=", "None", ",", "native_name", "=", "None", ")", ":", "# @todo native_srs doesn't seem to get detected, even when in the DB",...
532f561f32b91ea8debea0573c503dd20988bf40
valid
Catalog.get_resources
Resources include feature stores, coverage stores and WMS stores, however does not include layer groups. names, stores and workspaces can be provided as a comma delimited strings or as arrays, and are used for filtering. Will always return an array.
src/geoserver/catalog.py
def get_resources(self, names=None, stores=None, workspaces=None): ''' Resources include feature stores, coverage stores and WMS stores, however does not include layer groups. names, stores and workspaces can be provided as a comma delimited strings or as arrays, and are used for filtering. ...
def get_resources(self, names=None, stores=None, workspaces=None): ''' Resources include feature stores, coverage stores and WMS stores, however does not include layer groups. names, stores and workspaces can be provided as a comma delimited strings or as arrays, and are used for filtering. ...
[ "Resources", "include", "feature", "stores", "coverage", "stores", "and", "WMS", "stores", "however", "does", "not", "include", "layer", "groups", ".", "names", "stores", "and", "workspaces", "can", "be", "provided", "as", "a", "comma", "delimited", "strings", ...
boundlessgeo/gsconfig
python
https://github.com/boundlessgeo/gsconfig/blob/532f561f32b91ea8debea0573c503dd20988bf40/src/geoserver/catalog.py#L870-L897
[ "def", "get_resources", "(", "self", ",", "names", "=", "None", ",", "stores", "=", "None", ",", "workspaces", "=", "None", ")", ":", "stores", "=", "self", ".", "get_stores", "(", "names", "=", "stores", ",", "workspaces", "=", "workspaces", ")", "res...
532f561f32b91ea8debea0573c503dd20988bf40