repo stringlengths 7 55 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 19 28.4k | docstring stringlengths 1 46.9k | docstring_tokens listlengths 1 1.97k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiIPv6.py | ApiIPv6.delete | def delete(self, ids):
"""
Method to delete ipv6's by their ids
:param ids: Identifiers of ipv6's
:return: None
"""
url = build_uri_with_ids('api/v3/ipv6/%s/', ids)
return super(ApiIPv6, self).delete(url) | python | def delete(self, ids):
"""
Method to delete ipv6's by their ids
:param ids: Identifiers of ipv6's
:return: None
"""
url = build_uri_with_ids('api/v3/ipv6/%s/', ids)
return super(ApiIPv6, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/ipv6/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiIPv6",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete ipv6's by their ids
:param ids: Identifiers of ipv6's
:return: None | [
"Method",
"to",
"delete",
"ipv6",
"s",
"by",
"their",
"ids"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv6.py#L65-L73 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiIPv6.py | ApiIPv6.update | def update(self, ipv6s):
"""
Method to update ipv6's
:param ipv6s: List containing ipv6's desired to updated
:return: None
"""
data = {'ips': ipv6s}
ipv6s_ids = [str(ipv6.get('id')) for ipv6 in ipv6s]
return super(ApiIPv6, self).put('api/v3/ipv6/%s/' %
... | python | def update(self, ipv6s):
"""
Method to update ipv6's
:param ipv6s: List containing ipv6's desired to updated
:return: None
"""
data = {'ips': ipv6s}
ipv6s_ids = [str(ipv6.get('id')) for ipv6 in ipv6s]
return super(ApiIPv6, self).put('api/v3/ipv6/%s/' %
... | [
"def",
"update",
"(",
"self",
",",
"ipv6s",
")",
":",
"data",
"=",
"{",
"'ips'",
":",
"ipv6s",
"}",
"ipv6s_ids",
"=",
"[",
"str",
"(",
"ipv6",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"ipv6",
"in",
"ipv6s",
"]",
"return",
"super",
"(",
"ApiIPv6"... | Method to update ipv6's
:param ipv6s: List containing ipv6's desired to updated
:return: None | [
"Method",
"to",
"update",
"ipv6",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv6.py#L75-L87 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiIPv6.py | ApiIPv6.create | def create(self, ipv6s):
"""
Method to create ipv6's
:param ipv6s: List containing vrf desired to be created on database
:return: None
"""
data = {'ips': ipv6s}
return super(ApiIPv6, self).post('api/v3/ipv6/', data) | python | def create(self, ipv6s):
"""
Method to create ipv6's
:param ipv6s: List containing vrf desired to be created on database
:return: None
"""
data = {'ips': ipv6s}
return super(ApiIPv6, self).post('api/v3/ipv6/', data) | [
"def",
"create",
"(",
"self",
",",
"ipv6s",
")",
":",
"data",
"=",
"{",
"'ips'",
":",
"ipv6s",
"}",
"return",
"super",
"(",
"ApiIPv6",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/ipv6/'",
",",
"data",
")"
] | Method to create ipv6's
:param ipv6s: List containing vrf desired to be created on database
:return: None | [
"Method",
"to",
"create",
"ipv6",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv6.py#L89-L98 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiIPv4.py | ApiIPv4.search | def search(self, **kwargs):
"""
Method to search ipv4's based on extends search.
:param search: Dict containing QuerySets to find ipv4's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | python | def search(self, **kwargs):
"""
Method to search ipv4's based on extends search.
:param search: Dict containing QuerySets to find ipv4's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiIPv4",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/ipv4/'",
",",
"kwargs",
")",
")"
] | Method to search ipv4's based on extends search.
:param search: Dict containing QuerySets to find ipv4's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override d... | [
"Method",
"to",
"search",
"ipv4",
"s",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv4.py#L36-L49 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiIPv4.py | ApiIPv4.delete | def delete(self, ids):
"""
Method to delete ipv4's by their ids
:param ids: Identifiers of ipv4's
:return: None
"""
url = build_uri_with_ids('api/v3/ipv4/%s/', ids)
return super(ApiIPv4, self).delete(url) | python | def delete(self, ids):
"""
Method to delete ipv4's by their ids
:param ids: Identifiers of ipv4's
:return: None
"""
url = build_uri_with_ids('api/v3/ipv4/%s/', ids)
return super(ApiIPv4, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/ipv4/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiIPv4",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete ipv4's by their ids
:param ids: Identifiers of ipv4's
:return: None | [
"Method",
"to",
"delete",
"ipv4",
"s",
"by",
"their",
"ids"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv4.py#L66-L75 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiIPv4.py | ApiIPv4.update | def update(self, ipv4s):
"""
Method to update ipv4's
:param ipv4s: List containing ipv4's desired to updated
:return: None
"""
data = {'ips': ipv4s}
ipv4s_ids = [str(ipv4.get('id')) for ipv4 in ipv4s]
return super(ApiIPv4, self).put('api/v3/ipv4/%s/' %
... | python | def update(self, ipv4s):
"""
Method to update ipv4's
:param ipv4s: List containing ipv4's desired to updated
:return: None
"""
data = {'ips': ipv4s}
ipv4s_ids = [str(ipv4.get('id')) for ipv4 in ipv4s]
return super(ApiIPv4, self).put('api/v3/ipv4/%s/' %
... | [
"def",
"update",
"(",
"self",
",",
"ipv4s",
")",
":",
"data",
"=",
"{",
"'ips'",
":",
"ipv4s",
"}",
"ipv4s_ids",
"=",
"[",
"str",
"(",
"ipv4",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"ipv4",
"in",
"ipv4s",
"]",
"return",
"super",
"(",
"ApiIPv4"... | Method to update ipv4's
:param ipv4s: List containing ipv4's desired to updated
:return: None | [
"Method",
"to",
"update",
"ipv4",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv4.py#L77-L89 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiIPv4.py | ApiIPv4.create | def create(self, ipv4s):
"""
Method to create ipv4's
:param ipv4s: List containing ipv4's desired to be created on database
:return: None
"""
data = {'ips': ipv4s}
return super(ApiIPv4, self).post('api/v3/ipv4/', data) | python | def create(self, ipv4s):
"""
Method to create ipv4's
:param ipv4s: List containing ipv4's desired to be created on database
:return: None
"""
data = {'ips': ipv4s}
return super(ApiIPv4, self).post('api/v3/ipv4/', data) | [
"def",
"create",
"(",
"self",
",",
"ipv4s",
")",
":",
"data",
"=",
"{",
"'ips'",
":",
"ipv4s",
"}",
"return",
"super",
"(",
"ApiIPv4",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/ipv4/'",
",",
"data",
")"
] | Method to create ipv4's
:param ipv4s: List containing ipv4's desired to be created on database
:return: None | [
"Method",
"to",
"create",
"ipv4",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv4.py#L91-L100 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiObjectGroupPermissionGeneral.py | ApiObjectGroupPermissionGeneral.search | def search(self, **kwargs):
"""
Method to search object group permissions general based on extends search.
:param search: Dict containing QuerySets to find object group permissions general.
:param include: Array containing fields to include on response.
:param exclude: Array con... | python | def search(self, **kwargs):
"""
Method to search object group permissions general based on extends search.
:param search: Dict containing QuerySets to find object group permissions general.
:param include: Array containing fields to include on response.
:param exclude: Array con... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiObjectGroupPermissionGeneral",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/object-group-perm-general/'",
",",
"kwargs",
")",
")"
] | Method to search object group permissions general based on extends search.
:param search: Dict containing QuerySets to find object group permissions general.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:... | [
"Method",
"to",
"search",
"object",
"group",
"permissions",
"general",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermissionGeneral.py#L36-L49 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiObjectGroupPermissionGeneral.py | ApiObjectGroupPermissionGeneral.delete | def delete(self, ids):
"""
Method to delete object group permissions general by their ids
:param ids: Identifiers of object group permissions general
:return: None
"""
url = build_uri_with_ids('api/v3/object-group-perm-general/%s/', ids)
return super(ApiObjectGro... | python | def delete(self, ids):
"""
Method to delete object group permissions general by their ids
:param ids: Identifiers of object group permissions general
:return: None
"""
url = build_uri_with_ids('api/v3/object-group-perm-general/%s/', ids)
return super(ApiObjectGro... | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/object-group-perm-general/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiObjectGroupPermissionGeneral",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete object group permissions general by their ids
:param ids: Identifiers of object group permissions general
:return: None | [
"Method",
"to",
"delete",
"object",
"group",
"permissions",
"general",
"by",
"their",
"ids"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermissionGeneral.py#L65-L73 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiObjectGroupPermissionGeneral.py | ApiObjectGroupPermissionGeneral.update | def update(self, ogpgs):
"""
Method to update object group permissions general
:param ogpgs: List containing object group permissions general desired to updated
:return: None
"""
data = {'ogpgs': ogpgs}
ogpgs_ids = [str(ogpg.get('id')) for ogpg in ogpgs]
... | python | def update(self, ogpgs):
"""
Method to update object group permissions general
:param ogpgs: List containing object group permissions general desired to updated
:return: None
"""
data = {'ogpgs': ogpgs}
ogpgs_ids = [str(ogpg.get('id')) for ogpg in ogpgs]
... | [
"def",
"update",
"(",
"self",
",",
"ogpgs",
")",
":",
"data",
"=",
"{",
"'ogpgs'",
":",
"ogpgs",
"}",
"ogpgs_ids",
"=",
"[",
"str",
"(",
"ogpg",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"ogpg",
"in",
"ogpgs",
"]",
"return",
"super",
"(",
"ApiObj... | Method to update object group permissions general
:param ogpgs: List containing object group permissions general desired to updated
:return: None | [
"Method",
"to",
"update",
"object",
"group",
"permissions",
"general"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermissionGeneral.py#L75-L87 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiObjectGroupPermissionGeneral.py | ApiObjectGroupPermissionGeneral.create | def create(self, ogpgs):
"""
Method to create object group permissions general
:param ogpgs: List containing vrf desired to be created on database
:return: None
"""
data = {'ogpgs': ogpgs}
return super(ApiObjectGroupPermissionGeneral, self).post('api/v3/object-g... | python | def create(self, ogpgs):
"""
Method to create object group permissions general
:param ogpgs: List containing vrf desired to be created on database
:return: None
"""
data = {'ogpgs': ogpgs}
return super(ApiObjectGroupPermissionGeneral, self).post('api/v3/object-g... | [
"def",
"create",
"(",
"self",
",",
"ogpgs",
")",
":",
"data",
"=",
"{",
"'ogpgs'",
":",
"ogpgs",
"}",
"return",
"super",
"(",
"ApiObjectGroupPermissionGeneral",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/object-group-perm-general/'",
",",
"data",
")"
] | Method to create object group permissions general
:param ogpgs: List containing vrf desired to be created on database
:return: None | [
"Method",
"to",
"create",
"object",
"group",
"permissions",
"general"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermissionGeneral.py#L89-L98 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4IPv6.py | ApiV4IPv6.search | def search(self, **kwargs):
"""
Method to search ipv6's based on extends search.
:param search: Dict containing QuerySets to find ipv6's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | python | def search(self, **kwargs):
"""
Method to search ipv6's based on extends search.
:param search: Dict containing QuerySets to find ipv6's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiV4IPv6",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v4/ipv6/'",
",",
"kwargs",
")",
")"
] | Method to search ipv6's based on extends search.
:param search: Dict containing QuerySets to find ipv6's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override d... | [
"Method",
"to",
"search",
"ipv6",
"s",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv6.py#L36-L49 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4IPv6.py | ApiV4IPv6.delete | def delete(self, ids):
"""
Method to delete ipv6's by their ids
:param ids: Identifiers of ipv6's
:return: None
"""
url = build_uri_with_ids('api/v4/ipv6/%s/', ids)
return super(ApiV4IPv6, self).delete(url) | python | def delete(self, ids):
"""
Method to delete ipv6's by their ids
:param ids: Identifiers of ipv6's
:return: None
"""
url = build_uri_with_ids('api/v4/ipv6/%s/', ids)
return super(ApiV4IPv6, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v4/ipv6/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiV4IPv6",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete ipv6's by their ids
:param ids: Identifiers of ipv6's
:return: None | [
"Method",
"to",
"delete",
"ipv6",
"s",
"by",
"their",
"ids"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv6.py#L65-L73 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4IPv6.py | ApiV4IPv6.create | def create(self, ipv6s):
"""
Method to create ipv6's
:param ipv6s: List containing vrf desired to be created on database
:return: None
"""
data = {'ips': ipv6s}
return super(ApiV4IPv6, self).post('api/v4/ipv6/', data) | python | def create(self, ipv6s):
"""
Method to create ipv6's
:param ipv6s: List containing vrf desired to be created on database
:return: None
"""
data = {'ips': ipv6s}
return super(ApiV4IPv6, self).post('api/v4/ipv6/', data) | [
"def",
"create",
"(",
"self",
",",
"ipv6s",
")",
":",
"data",
"=",
"{",
"'ips'",
":",
"ipv6s",
"}",
"return",
"super",
"(",
"ApiV4IPv6",
",",
"self",
")",
".",
"post",
"(",
"'api/v4/ipv6/'",
",",
"data",
")"
] | Method to create ipv6's
:param ipv6s: List containing vrf desired to be created on database
:return: None | [
"Method",
"to",
"create",
"ipv6",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv6.py#L89-L98 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionVIP.py | OptionVIP.add | def add(self, tipo_opcao, nome_opcao_txt):
"""Inserts a new Option VIP and returns its identifier.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-]
... | python | def add(self, tipo_opcao, nome_opcao_txt):
"""Inserts a new Option VIP and returns its identifier.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-]
... | [
"def",
"add",
"(",
"self",
",",
"tipo_opcao",
",",
"nome_opcao_txt",
")",
":",
"optionvip_map",
"=",
"dict",
"(",
")",
"optionvip_map",
"[",
"'tipo_opcao'",
"]",
"=",
"tipo_opcao",
"optionvip_map",
"[",
"'nome_opcao_txt'",
"]",
"=",
"nome_opcao_txt",
"code",
"... | Inserts a new Option VIP and returns its identifier.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: Following dictionary:
::
... | [
"Inserts",
"a",
"new",
"Option",
"VIP",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L38-L61 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionVIP.py | OptionVIP.alter | def alter(self, id_option_vip, tipo_opcao, nome_opcao_txt):
"""Change Option VIP from by the identifier.
:param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:para... | python | def alter(self, id_option_vip, tipo_opcao, nome_opcao_txt):
"""Change Option VIP from by the identifier.
:param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:para... | [
"def",
"alter",
"(",
"self",
",",
"id_option_vip",
",",
"tipo_opcao",
",",
"nome_opcao_txt",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_option_vip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Option VIP is invalid or was not informed.... | Change Option VIP from by the identifier.
:param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param nome_opcao_txt: Name Option. String with a maximum of 50 characters a... | [
"Change",
"Option",
"VIP",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L63-L91 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionVIP.py | OptionVIP.remove | def remove(self, id_option_vip):
"""Remove Option VIP from by the identifier.
:param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Option VIP identifier is null and invalid.
:raise OptionVipNotFoun... | python | def remove(self, id_option_vip):
"""Remove Option VIP from by the identifier.
:param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Option VIP identifier is null and invalid.
:raise OptionVipNotFoun... | [
"def",
"remove",
"(",
"self",
",",
"id_option_vip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_option_vip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Option VIP is invalid or was not informed.'",
")",
"url",
"=",
"'optionvip/'",
"+... | Remove Option VIP from by the identifier.
:param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Option VIP identifier is null and invalid.
:raise OptionVipNotFoundError: Option VIP not registered.
:... | [
"Remove",
"Option",
"VIP",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L93-L115 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionVIP.py | OptionVIP.get_option_vip | def get_option_vip(self, id_environment_vip):
"""Get all Option VIP by Environment Vip.
:return: Dictionary with the following structure:
::
{‘option_vip’: [{‘id’: < id >,
‘tipo_opcao’: < tipo_opcao >,
‘nome_opcao_txt’: < nome_opcao_txt >}, ... too option v... | python | def get_option_vip(self, id_environment_vip):
"""Get all Option VIP by Environment Vip.
:return: Dictionary with the following structure:
::
{‘option_vip’: [{‘id’: < id >,
‘tipo_opcao’: < tipo_opcao >,
‘nome_opcao_txt’: < nome_opcao_txt >}, ... too option v... | [
"def",
"get_option_vip",
"(",
"self",
",",
"id_environment_vip",
")",
":",
"url",
"=",
"'optionvip/environmentvip/'",
"+",
"str",
"(",
"id_environment_vip",
")",
"+",
"'/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"u... | Get all Option VIP by Environment Vip.
:return: Dictionary with the following structure:
::
{‘option_vip’: [{‘id’: < id >,
‘tipo_opcao’: < tipo_opcao >,
‘nome_opcao_txt’: < nome_opcao_txt >}, ... too option vips ...] }
:raise EnvironmentVipNotFoundError: E... | [
"Get",
"all",
"Option",
"VIP",
"by",
"Environment",
"Vip",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L168-L188 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionVIP.py | OptionVIP.associate | def associate(self, id_option_vip, id_environment_vip):
"""Create a relationship of OptionVip with EnvironmentVip.
:param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater tha... | python | def associate(self, id_option_vip, id_environment_vip):
"""Create a relationship of OptionVip with EnvironmentVip.
:param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater tha... | [
"def",
"associate",
"(",
"self",
",",
"id_option_vip",
",",
"id_environment_vip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_option_vip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Option VIP is invalid or was not informed.'",
")",
"i... | Create a relationship of OptionVip with EnvironmentVip.
:param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero.
:return: Following dictionary
::
... | [
"Create",
"a",
"relationship",
"of",
"OptionVip",
"with",
"EnvironmentVip",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L190-L224 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionVIP.py | OptionVIP.buscar_timeout_opcvip | def buscar_timeout_opcvip(self, id_ambiente_vip):
"""Buscar nome_opcao_txt das Opcoes VIp quando tipo_opcao = 'Timeout' pelo environmentvip_id
:return: Dictionary with the following structure:
::
{‘timeout_opt’: ‘timeout_opt’: <'nome_opcao_txt'>}
:raise InvalidParameterErr... | python | def buscar_timeout_opcvip(self, id_ambiente_vip):
"""Buscar nome_opcao_txt das Opcoes VIp quando tipo_opcao = 'Timeout' pelo environmentvip_id
:return: Dictionary with the following structure:
::
{‘timeout_opt’: ‘timeout_opt’: <'nome_opcao_txt'>}
:raise InvalidParameterErr... | [
"def",
"buscar_timeout_opcvip",
"(",
"self",
",",
"id_ambiente_vip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_ambiente_vip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of environment-vip is invalid or was not informed.'",
")",
"url",
"="... | Buscar nome_opcao_txt das Opcoes VIp quando tipo_opcao = 'Timeout' pelo environmentvip_id
:return: Dictionary with the following structure:
::
{‘timeout_opt’: ‘timeout_opt’: <'nome_opcao_txt'>}
:raise InvalidParameterError: Environment VIP identifier is null and invalid.
:... | [
"Buscar",
"nome_opcao_txt",
"das",
"Opcoes",
"VIp",
"quando",
"tipo_opcao",
"=",
"Timeout",
"pelo",
"environmentvip_id"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L258-L281 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionVIP.py | OptionVIP.buscar_rules | def buscar_rules(self, id_ambiente_vip, id_vip=''):
"""Search rules by environmentvip_id
:return: Dictionary with the following structure:
::
{'name_rule_opt': [{'name_rule_opt': <name>, 'id': <id>}, ...]}
:raise InvalidParameterError: Environment VIP identifier is null ... | python | def buscar_rules(self, id_ambiente_vip, id_vip=''):
"""Search rules by environmentvip_id
:return: Dictionary with the following structure:
::
{'name_rule_opt': [{'name_rule_opt': <name>, 'id': <id>}, ...]}
:raise InvalidParameterError: Environment VIP identifier is null ... | [
"def",
"buscar_rules",
"(",
"self",
",",
"id_ambiente_vip",
",",
"id_vip",
"=",
"''",
")",
":",
"url",
"=",
"'environment-vip/get/rules/'",
"+",
"str",
"(",
"id_ambiente_vip",
")",
"+",
"'/'",
"+",
"str",
"(",
"id_vip",
")",
"code",
",",
"xml",
"=",
"sel... | Search rules by environmentvip_id
:return: Dictionary with the following structure:
::
{'name_rule_opt': [{'name_rule_opt': <name>, 'id': <id>}, ...]}
:raise InvalidParameterError: Environment VIP identifier is null and invalid.
:raise EnvironmentVipNotFoundError: Enviro... | [
"Search",
"rules",
"by",
"environmentvip_id"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L364-L385 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionVIP.py | OptionVIP.buscar_healthchecks | def buscar_healthchecks(self, id_ambiente_vip):
"""Search healthcheck by environmentvip_id
:return: Dictionary with the following structure:
::
{'healthcheck_opt': [{'name': <name>, 'id': <id>},...]}
:raise InvalidParameterError: Environment VIP identifier is null and in... | python | def buscar_healthchecks(self, id_ambiente_vip):
"""Search healthcheck by environmentvip_id
:return: Dictionary with the following structure:
::
{'healthcheck_opt': [{'name': <name>, 'id': <id>},...]}
:raise InvalidParameterError: Environment VIP identifier is null and in... | [
"def",
"buscar_healthchecks",
"(",
"self",
",",
"id_ambiente_vip",
")",
":",
"url",
"=",
"'environment-vip/get/healthcheck/'",
"+",
"str",
"(",
"id_ambiente_vip",
")",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")"... | Search healthcheck by environmentvip_id
:return: Dictionary with the following structure:
::
{'healthcheck_opt': [{'name': <name>, 'id': <id>},...]}
:raise InvalidParameterError: Environment VIP identifier is null and invalid.
:raise EnvironmentVipNotFoundError: Environm... | [
"Search",
"healthcheck",
"by",
"environmentvip_id"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L387-L407 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionVIP.py | OptionVIP.buscar_idtrafficreturn_opcvip | def buscar_idtrafficreturn_opcvip(self, nome_opcao_txt):
"""Search id of Option VIP when tipo_opcao = 'Retorno de trafego'
:return: Dictionary with the following structure:
::
{‘trafficreturn_opt’: ‘trafficreturn_opt’: <'id'>}
:raise InvalidParameterError: Environment ... | python | def buscar_idtrafficreturn_opcvip(self, nome_opcao_txt):
"""Search id of Option VIP when tipo_opcao = 'Retorno de trafego'
:return: Dictionary with the following structure:
::
{‘trafficreturn_opt’: ‘trafficreturn_opt’: <'id'>}
:raise InvalidParameterError: Environment ... | [
"def",
"buscar_idtrafficreturn_opcvip",
"(",
"self",
",",
"nome_opcao_txt",
")",
":",
"trafficreturn_map",
"=",
"dict",
"(",
")",
"trafficreturn_map",
"[",
"'trafficreturn'",
"]",
"=",
"nome_opcao_txt",
"url",
"=",
"'optionvip/trafficreturn/search/'",
"code",
",",
"xm... | Search id of Option VIP when tipo_opcao = 'Retorno de trafego'
:return: Dictionary with the following structure:
::
{‘trafficreturn_opt’: ‘trafficreturn_opt’: <'id'>}
:raise InvalidParameterError: Environment VIP identifier is null and invalid.
:raise EnvironmentVipNot... | [
"Search",
"id",
"of",
"Option",
"VIP",
"when",
"tipo_opcao",
"=",
"Retorno",
"de",
"trafego",
""
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L436-L459 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Modelo.py | Modelo.listar_por_marca | def listar_por_marca(self, id_brand):
"""List all Model by Brand.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{‘model’: [{‘id’: < id >,
‘nome’: < nome >,
‘id_ma... | python | def listar_por_marca(self, id_brand):
"""List all Model by Brand.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{‘model’: [{‘id’: < id >,
‘nome’: < nome >,
‘id_ma... | [
"def",
"listar_por_marca",
"(",
"self",
",",
"id_brand",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_brand",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Brand is invalid or was not informed.'",
")",
"url",
"=",
"'model/brand/'",
"+",
... | List all Model by Brand.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{‘model’: [{‘id’: < id >,
‘nome’: < nome >,
‘id_marca’: < id_marca >}, ... too Model ...]}
... | [
"List",
"all",
"Model",
"by",
"Brand",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Modelo.py#L32-L60 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Modelo.py | Modelo.inserir | def inserir(self, id_brand, name):
"""Inserts a new Model and returns its identifier
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:param name: Model name. String with a minimum 3 and maximum of 100 characters
:return: Dictionary with the following stru... | python | def inserir(self, id_brand, name):
"""Inserts a new Model and returns its identifier
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:param name: Model name. String with a minimum 3 and maximum of 100 characters
:return: Dictionary with the following stru... | [
"def",
"inserir",
"(",
"self",
",",
"id_brand",
",",
"name",
")",
":",
"model_map",
"=",
"dict",
"(",
")",
"model_map",
"[",
"'name'",
"]",
"=",
"name",
"model_map",
"[",
"'id_brand'",
"]",
"=",
"id_brand",
"code",
",",
"xml",
"=",
"self",
".",
"subm... | Inserts a new Model and returns its identifier
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:param name: Model name. String with a minimum 3 and maximum of 100 characters
:return: Dictionary with the following structure:
::
{'model': {'id... | [
"Inserts",
"a",
"new",
"Model",
"and",
"returns",
"its",
"identifier"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Modelo.py#L95-L119 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Modelo.py | Modelo.alterar | def alterar(self, id_model, id_brand, name):
"""Change Model from by the identifier.
:param id_model: Identifier of the Model. Integer value and greater than zero.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:param name: Model name. String with a minim... | python | def alterar(self, id_model, id_brand, name):
"""Change Model from by the identifier.
:param id_model: Identifier of the Model. Integer value and greater than zero.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:param name: Model name. String with a minim... | [
"def",
"alterar",
"(",
"self",
",",
"id_model",
",",
"id_brand",
",",
"name",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_model",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Model is invalid or was not informed.'",
")",
"model_map",... | Change Model from by the identifier.
:param id_model: Identifier of the Model. Integer value and greater than zero.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:param name: Model name. String with a minimum 3 and maximum of 100 characters
:return: Non... | [
"Change",
"Model",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Modelo.py#L121-L150 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Modelo.py | Modelo.remover | def remover(self, id_model):
"""Remove Model from by the identifier.
:param id_model: Identifier of the Model. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Model is null and invalid.
:raise ModeloEquipamentoNaoExisteError: ... | python | def remover(self, id_model):
"""Remove Model from by the identifier.
:param id_model: Identifier of the Model. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Model is null and invalid.
:raise ModeloEquipamentoNaoExisteError: ... | [
"def",
"remover",
"(",
"self",
",",
"id_model",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_model",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Model is invalid or was not informed.'",
")",
"url",
"=",
"'model/'",
"+",
"str",
"(",... | Remove Model from by the identifier.
:param id_model: Identifier of the Model. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Model is null and invalid.
:raise ModeloEquipamentoNaoExisteError: Model not registered.
:raise Mod... | [
"Remove",
"Model",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Modelo.py#L152-L174 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Interface.py | Interface.listar_por_equipamento | def listar_por_equipamento(self, id_equipamento):
"""List all interfaces of an equipment.
:param id_equipamento: Equipment identifier.
:return: Dictionary with the following:
::
{'interface':
[{'protegida': < protegida >,
'nome': < nome >,
... | python | def listar_por_equipamento(self, id_equipamento):
"""List all interfaces of an equipment.
:param id_equipamento: Equipment identifier.
:return: Dictionary with the following:
::
{'interface':
[{'protegida': < protegida >,
'nome': < nome >,
... | [
"def",
"listar_por_equipamento",
"(",
"self",
",",
"id_equipamento",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_equipamento",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Equipment id is invalid or was not informed.'",
")",
"url",
"=",
"'interface/equipa... | List all interfaces of an equipment.
:param id_equipamento: Equipment identifier.
:return: Dictionary with the following:
::
{'interface':
[{'protegida': < protegida >,
'nome': < nome >,
'id_ligacao_front': < id_ligacao_front >,
'id... | [
"List",
"all",
"interfaces",
"of",
"an",
"equipment",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L41-L72 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Interface.py | Interface.get_by_id | def get_by_id(self, id_interface):
"""Get an interface by id.
:param id_interface: Interface identifier.
:return: Following dictionary:
::
{'interface': {'id': < id >,
'interface': < interface >,
'descricao': < descricao >,
'protegida':... | python | def get_by_id(self, id_interface):
"""Get an interface by id.
:param id_interface: Interface identifier.
:return: Following dictionary:
::
{'interface': {'id': < id >,
'interface': < interface >,
'descricao': < descricao >,
'protegida':... | [
"def",
"get_by_id",
"(",
"self",
",",
"id_interface",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_interface",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Interface id is invalid or was not informed.'",
")",
"url",
"=",
"'interface/'",
"+",
"str",
"... | Get an interface by id.
:param id_interface: Interface identifier.
:return: Following dictionary:
::
{'interface': {'id': < id >,
'interface': < interface >,
'descricao': < descricao >,
'protegida': < protegida >,
'tipo_equip': < id... | [
"Get",
"an",
"interface",
"by",
"id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L112-L147 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Interface.py | Interface.inserir | def inserir(
self,
nome,
protegida,
descricao,
id_ligacao_front,
id_ligacao_back,
id_equipamento,
tipo=None,
vlan=None):
"""Insert new interface for an equipment.
:param nome: Interface name.
... | python | def inserir(
self,
nome,
protegida,
descricao,
id_ligacao_front,
id_ligacao_back,
id_equipamento,
tipo=None,
vlan=None):
"""Insert new interface for an equipment.
:param nome: Interface name.
... | [
"def",
"inserir",
"(",
"self",
",",
"nome",
",",
"protegida",
",",
"descricao",
",",
"id_ligacao_front",
",",
"id_ligacao_back",
",",
"id_equipamento",
",",
"tipo",
"=",
"None",
",",
"vlan",
"=",
"None",
")",
":",
"interface_map",
"=",
"dict",
"(",
")",
... | Insert new interface for an equipment.
:param nome: Interface name.
:param protegida: Indication of protected ('0' or '1').
:param descricao: Interface description.
:param id_ligacao_front: Front end link interface identifier.
:param id_ligacao_back: Back end link interface iden... | [
"Insert",
"new",
"interface",
"for",
"an",
"equipment",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L149-L189 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Interface.py | Interface.alterar | def alterar(
self,
id_interface,
nome,
protegida,
descricao,
id_ligacao_front,
id_ligacao_back,
tipo=None,
vlan=None):
"""Edit an interface by its identifier.
Equipment identifier is not changed.... | python | def alterar(
self,
id_interface,
nome,
protegida,
descricao,
id_ligacao_front,
id_ligacao_back,
tipo=None,
vlan=None):
"""Edit an interface by its identifier.
Equipment identifier is not changed.... | [
"def",
"alterar",
"(",
"self",
",",
"id_interface",
",",
"nome",
",",
"protegida",
",",
"descricao",
",",
"id_ligacao_front",
",",
"id_ligacao_back",
",",
"tipo",
"=",
"None",
",",
"vlan",
"=",
"None",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_... | Edit an interface by its identifier.
Equipment identifier is not changed.
:param nome: Interface name.
:param protegida: Indication of protected ('0' or '1').
:param descricao: Interface description.
:param id_ligacao_front: Front end link interface identifier.
:param i... | [
"Edit",
"an",
"interface",
"by",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L191-L237 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Interface.py | Interface.remover | def remover(self, id_interface):
"""Remove an interface by its identifier.
:param id_interface: Interface identifier.
:return: None
:raise InterfaceNaoExisteError: Interface doesn't exist.
:raise InterfaceError: Interface is linked to another interface.
:raise InvalidP... | python | def remover(self, id_interface):
"""Remove an interface by its identifier.
:param id_interface: Interface identifier.
:return: None
:raise InterfaceNaoExisteError: Interface doesn't exist.
:raise InterfaceError: Interface is linked to another interface.
:raise InvalidP... | [
"def",
"remover",
"(",
"self",
",",
"id_interface",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_interface",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Interface id is invalid or was not informed.'",
")",
"url",
"=",
"'interface/'",
"+",
"str",
"("... | Remove an interface by its identifier.
:param id_interface: Interface identifier.
:return: None
:raise InterfaceNaoExisteError: Interface doesn't exist.
:raise InterfaceError: Interface is linked to another interface.
:raise InvalidParameterError: The interface identifier is i... | [
"Remove",
"an",
"interface",
"by",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L239-L260 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Interface.py | Interface.remove_connection | def remove_connection(self, id_interface, back_or_front):
"""
Remove a connection between two interfaces
:param id_interface: One side of relation
:param back_or_front: This side of relation is back(0) or front(1)
:return: None
:raise InterfaceInvalidBackFrontError: Fr... | python | def remove_connection(self, id_interface, back_or_front):
"""
Remove a connection between two interfaces
:param id_interface: One side of relation
:param back_or_front: This side of relation is back(0) or front(1)
:return: None
:raise InterfaceInvalidBackFrontError: Fr... | [
"def",
"remove_connection",
"(",
"self",
",",
"id_interface",
",",
"back_or_front",
")",
":",
"msg_err",
"=",
"u'Parameter %s is invalid. Value: %s.'",
"if",
"not",
"is_valid_0_1",
"(",
"back_or_front",
")",
":",
"raise",
"InvalidParameterError",
"(",
"msg_err",
"%",
... | Remove a connection between two interfaces
:param id_interface: One side of relation
:param back_or_front: This side of relation is back(0) or front(1)
:return: None
:raise InterfaceInvalidBackFrontError: Front or Back of interfaces not match to remove connection
:raise Invali... | [
"Remove",
"a",
"connection",
"between",
"two",
"interfaces"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L262-L293 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Interface.py | Interface.list_connections | def list_connections(self, nome_interface, id_equipamento):
"""List interfaces linked to back and front of specified interface.
:param nome_interface: Interface name.
:param id_equipamento: Equipment identifier.
:return: Dictionary with the following:
::
{'interfa... | python | def list_connections(self, nome_interface, id_equipamento):
"""List interfaces linked to back and front of specified interface.
:param nome_interface: Interface name.
:param id_equipamento: Equipment identifier.
:return: Dictionary with the following:
::
{'interfa... | [
"def",
"list_connections",
"(",
"self",
",",
"nome_interface",
",",
"id_equipamento",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_equipamento",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Equipment identifier is none or was not informed.'",
")",
"if",
... | List interfaces linked to back and front of specified interface.
:param nome_interface: Interface name.
:param id_equipamento: Equipment identifier.
:return: Dictionary with the following:
::
{'interfaces':[ {'id': < id >,
'interface': < nome >,
'd... | [
"List",
"interfaces",
"linked",
"to",
"back",
"and",
"front",
"of",
"specified",
"interface",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L335-L381 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Permission.py | Permission.list_all | def list_all(self):
"""List all Permission.
:return: Dictionary with the following structure:
::
{'perms': [{ 'function' < function >, 'id': < id > }, ... more permissions ...]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Netwo... | python | def list_all(self):
"""List all Permission.
:return: Dictionary with the following structure:
::
{'perms': [{ 'function' < function >, 'id': < id > }, ... more permissions ...]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Netwo... | [
"def",
"list_all",
"(",
"self",
")",
":",
"code",
",",
"map",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"'perms/all/'",
")",
"key",
"=",
"'perms'",
"return",
"get_list_map",
"(",
"self",
".",
"response",
"(",
"code",
",",
"map",
","... | List all Permission.
:return: Dictionary with the following structure:
::
{'perms': [{ 'function' < function >, 'id': < id > }, ... more permissions ...]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XM... | [
"List",
"all",
"Permission",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Permission.py#L37-L52 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4IPv4.py | ApiV4IPv4.search | def search(self, **kwargs):
"""
Method to search ipv4's based on extends search.
:param search: Dict containing QuerySets to find ipv4's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | python | def search(self, **kwargs):
"""
Method to search ipv4's based on extends search.
:param search: Dict containing QuerySets to find ipv4's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiV4IPv4",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v4/ipv4/'",
",",
"kwargs",
")",
")"
] | Method to search ipv4's based on extends search.
:param search: Dict containing QuerySets to find ipv4's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override d... | [
"Method",
"to",
"search",
"ipv4",
"s",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv4.py#L36-L49 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4IPv4.py | ApiV4IPv4.delete | def delete(self, ids):
"""
Method to delete ipv4's by their ids
:param ids: Identifiers of ipv4's
:return: None
"""
url = build_uri_with_ids('api/v4/ipv4/%s/', ids)
return super(ApiV4IPv4, self).delete(url) | python | def delete(self, ids):
"""
Method to delete ipv4's by their ids
:param ids: Identifiers of ipv4's
:return: None
"""
url = build_uri_with_ids('api/v4/ipv4/%s/', ids)
return super(ApiV4IPv4, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v4/ipv4/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiV4IPv4",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete ipv4's by their ids
:param ids: Identifiers of ipv4's
:return: None | [
"Method",
"to",
"delete",
"ipv4",
"s",
"by",
"their",
"ids"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv4.py#L66-L75 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4IPv4.py | ApiV4IPv4.create | def create(self, ipv4s):
"""
Method to create ipv4's
:param ipv4s: List containing ipv4's desired to be created on database
:return: None
"""
data = {'ips': ipv4s}
return super(ApiV4IPv4, self).post('api/v4/ipv4/', data) | python | def create(self, ipv4s):
"""
Method to create ipv4's
:param ipv4s: List containing ipv4's desired to be created on database
:return: None
"""
data = {'ips': ipv4s}
return super(ApiV4IPv4, self).post('api/v4/ipv4/', data) | [
"def",
"create",
"(",
"self",
",",
"ipv4s",
")",
":",
"data",
"=",
"{",
"'ips'",
":",
"ipv4s",
"}",
"return",
"super",
"(",
"ApiV4IPv4",
",",
"self",
")",
".",
"post",
"(",
"'api/v4/ipv4/'",
",",
"data",
")"
] | Method to create ipv4's
:param ipv4s: List containing ipv4's desired to be created on database
:return: None | [
"Method",
"to",
"create",
"ipv4",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv4.py#L91-L100 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoVirtual.py | GrupoVirtual.provisionar | def provisionar(self, equipamentos, vips):
"""Realiza a inserção ou alteração de um grupo virtual para o sistema de Orquestração de VM.
:param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento" da
classe "EspecificacaoGrupoVirtual".
:param vips: Lista de VIPs ger... | python | def provisionar(self, equipamentos, vips):
"""Realiza a inserção ou alteração de um grupo virtual para o sistema de Orquestração de VM.
:param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento" da
classe "EspecificacaoGrupoVirtual".
:param vips: Lista de VIPs ger... | [
"def",
"provisionar",
"(",
"self",
",",
"equipamentos",
",",
"vips",
")",
":",
"code",
",",
"map",
"=",
"self",
".",
"submit",
"(",
"{",
"'equipamentos'",
":",
"{",
"'equipamento'",
":",
"equipamentos",
"}",
",",
"'vips'",
":",
"{",
"'vip'",
":",
"vips... | Realiza a inserção ou alteração de um grupo virtual para o sistema de Orquestração de VM.
:param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento" da
classe "EspecificacaoGrupoVirtual".
:param vips: Lista de VIPs gerada pelo método "add_vip" da classe "EspecificacaoGrup... | [
"Realiza",
"a",
"inserção",
"ou",
"alteração",
"de",
"um",
"grupo",
"virtual",
"para",
"o",
"sistema",
"de",
"Orquestração",
"de",
"VM",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoVirtual.py#L29-L109 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoVirtual.py | GrupoVirtual.remover_provisionamento | def remover_provisionamento(self, equipamentos, vips):
"""Remove o provisionamento de um grupo virtual para o sistema de Orquestração VM.
:param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento_remove" da
classe "EspecificacaoGrupoVirtual".
:param vips: Lista de... | python | def remover_provisionamento(self, equipamentos, vips):
"""Remove o provisionamento de um grupo virtual para o sistema de Orquestração VM.
:param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento_remove" da
classe "EspecificacaoGrupoVirtual".
:param vips: Lista de... | [
"def",
"remover_provisionamento",
"(",
"self",
",",
"equipamentos",
",",
"vips",
")",
":",
"code",
",",
"map",
"=",
"self",
".",
"submit",
"(",
"{",
"'equipamentos'",
":",
"{",
"'equipamento'",
":",
"equipamentos",
"}",
",",
"'vips'",
":",
"{",
"'vip'",
... | Remove o provisionamento de um grupo virtual para o sistema de Orquestração VM.
:param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento_remove" da
classe "EspecificacaoGrupoVirtual".
:param vips: Lista de VIPs gerada pelo método "add_vip_remove" da classe "Especificacao... | [
"Remove",
"o",
"provisionamento",
"de",
"um",
"grupo",
"virtual",
"para",
"o",
"sistema",
"de",
"Orquestração",
"VM",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoVirtual.py#L111-L131 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Usuario.py | Usuario.list_with_usergroup | def list_with_usergroup(self):
"""List all users and their user groups.
is_more -If more than 3 of groups of users or no, to control expansion Screen.
:return: Dictionary with the following structure:
::
{'usuario': [{'nome': < nome >,
'id': < id >,
... | python | def list_with_usergroup(self):
"""List all users and their user groups.
is_more -If more than 3 of groups of users or no, to control expansion Screen.
:return: Dictionary with the following structure:
::
{'usuario': [{'nome': < nome >,
'id': < id >,
... | [
"def",
"list_with_usergroup",
"(",
"self",
")",
":",
"url",
"=",
"'usuario/get/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | List all users and their user groups.
is_more -If more than 3 of groups of users or no, to control expansion Screen.
:return: Dictionary with the following structure:
::
{'usuario': [{'nome': < nome >,
'id': < id >,
'pwd': < pwd >,
'user': < us... | [
"List",
"all",
"users",
"and",
"their",
"user",
"groups",
".",
"is_more",
"-",
"If",
"more",
"than",
"3",
"of",
"groups",
"of",
"users",
"or",
"no",
"to",
"control",
"expansion",
"Screen",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L121-L146 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Usuario.py | Usuario.get_by_user_ldap | def get_by_user_ldap(self, user_name):
"""Get user by the ldap name.
is_more -If more than 3 of groups of users or no, to control expansion Screen.
:return: Dictionary with the following structure:
::
{'usuario': [{'nome': < nome >,
'id': < id >,
'... | python | def get_by_user_ldap(self, user_name):
"""Get user by the ldap name.
is_more -If more than 3 of groups of users or no, to control expansion Screen.
:return: Dictionary with the following structure:
::
{'usuario': [{'nome': < nome >,
'id': < id >,
'... | [
"def",
"get_by_user_ldap",
"(",
"self",
",",
"user_name",
")",
":",
"url",
"=",
"'user/get/ldap/'",
"+",
"str",
"(",
"user_name",
")",
"+",
"'/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"... | Get user by the ldap name.
is_more -If more than 3 of groups of users or no, to control expansion Screen.
:return: Dictionary with the following structure:
::
{'usuario': [{'nome': < nome >,
'id': < id >,
'pwd': < pwd >,
'user': < user >,
... | [
"Get",
"user",
"by",
"the",
"ldap",
"name",
".",
"is_more",
"-",
"If",
"more",
"than",
"3",
"of",
"groups",
"of",
"users",
"or",
"no",
"to",
"control",
"expansion",
"Screen",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L179-L204 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Usuario.py | Usuario.inserir | def inserir(self, user, pwd, name, email, user_ldap):
"""Inserts a new User and returns its identifier.
The user will be created with active status.
:param user: Username. String with a minimum 3 and maximum of 45 characters
:param pwd: User password. String with a minimum 3 and maximu... | python | def inserir(self, user, pwd, name, email, user_ldap):
"""Inserts a new User and returns its identifier.
The user will be created with active status.
:param user: Username. String with a minimum 3 and maximum of 45 characters
:param pwd: User password. String with a minimum 3 and maximu... | [
"def",
"inserir",
"(",
"self",
",",
"user",
",",
"pwd",
",",
"name",
",",
"email",
",",
"user_ldap",
")",
":",
"user_map",
"=",
"dict",
"(",
")",
"user_map",
"[",
"'user'",
"]",
"=",
"user",
"user_map",
"[",
"'password'",
"]",
"=",
"pwd",
"user_map",... | Inserts a new User and returns its identifier.
The user will be created with active status.
:param user: Username. String with a minimum 3 and maximum of 45 characters
:param pwd: User password. String with a minimum 3 and maximum of 45 characters
:param name: User name. String with a ... | [
"Inserts",
"a",
"new",
"User",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L206-L237 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Usuario.py | Usuario.alterar | def alterar(self, id_user, user, password, nome, ativo, email, user_ldap):
"""Change User from by the identifier.
:param id_user: Identifier of the User. Integer value and greater than zero.
:param user: Username. String with a minimum 3 and maximum of 45 characters
:param password: Use... | python | def alterar(self, id_user, user, password, nome, ativo, email, user_ldap):
"""Change User from by the identifier.
:param id_user: Identifier of the User. Integer value and greater than zero.
:param user: Username. String with a minimum 3 and maximum of 45 characters
:param password: Use... | [
"def",
"alterar",
"(",
"self",
",",
"id_user",
",",
"user",
",",
"password",
",",
"nome",
",",
"ativo",
",",
"email",
",",
"user_ldap",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_user",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The ide... | Change User from by the identifier.
:param id_user: Identifier of the User. Integer value and greater than zero.
:param user: Username. String with a minimum 3 and maximum of 45 characters
:param password: User password. String with a minimum 3 and maximum of 45 characters
:param nome: ... | [
"Change",
"User",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L239-L275 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Usuario.py | Usuario.change_password | def change_password(self, id_user, user_current_password, password):
"""Change password of User from by the identifier.
:param id_user: Identifier of the User. Integer value and greater than zero.
:param user_current_password: Senha atual do usuário.
:param password: Nova Senha do usuár... | python | def change_password(self, id_user, user_current_password, password):
"""Change password of User from by the identifier.
:param id_user: Identifier of the User. Integer value and greater than zero.
:param user_current_password: Senha atual do usuário.
:param password: Nova Senha do usuár... | [
"def",
"change_password",
"(",
"self",
",",
"id_user",
",",
"user_current_password",
",",
"password",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_user",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of User is invalid or was not informed.'",... | Change password of User from by the identifier.
:param id_user: Identifier of the User. Integer value and greater than zero.
:param user_current_password: Senha atual do usuário.
:param password: Nova Senha do usuário.
:return: None
:raise UsuarioNaoExisteError: User not regis... | [
"Change",
"password",
"of",
"User",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L277-L307 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Usuario.py | Usuario.authenticate | def authenticate(self, username, password, is_ldap_user):
"""Get user by username and password and their permissions.
:param username: Username. String with a minimum 3 and maximum of 45 characters
:param password: User password. String with a minimum 3 and maximum of 45 characters
:re... | python | def authenticate(self, username, password, is_ldap_user):
"""Get user by username and password and their permissions.
:param username: Username. String with a minimum 3 and maximum of 45 characters
:param password: User password. String with a minimum 3 and maximum of 45 characters
:re... | [
"def",
"authenticate",
"(",
"self",
",",
"username",
",",
"password",
",",
"is_ldap_user",
")",
":",
"user_map",
"=",
"dict",
"(",
")",
"user_map",
"[",
"'username'",
"]",
"=",
"username",
"user_map",
"[",
"'password'",
"]",
"=",
"password",
"user_map",
"[... | Get user by username and password and their permissions.
:param username: Username. String with a minimum 3 and maximum of 45 characters
:param password: User password. String with a minimum 3 and maximum of 45 characters
:return: Following dictionary:
::
{'user': {'id': ... | [
"Get",
"user",
"by",
"username",
"and",
"password",
"and",
"their",
"permissions",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L331-L360 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Usuario.py | Usuario.authenticate_ldap | def authenticate_ldap(self, username, password):
"""Get user by username and password and their permissions.
:param username: Username. String with a minimum 3 and maximum of 45 characters
:param password: User password. String with a minimum 3 and maximum of 45 characters
:return: Fol... | python | def authenticate_ldap(self, username, password):
"""Get user by username and password and their permissions.
:param username: Username. String with a minimum 3 and maximum of 45 characters
:param password: User password. String with a minimum 3 and maximum of 45 characters
:return: Fol... | [
"def",
"authenticate_ldap",
"(",
"self",
",",
"username",
",",
"password",
")",
":",
"user_map",
"=",
"dict",
"(",
")",
"user_map",
"[",
"'username'",
"]",
"=",
"username",
"user_map",
"[",
"'password'",
"]",
"=",
"password",
"code",
",",
"xml",
"=",
"se... | Get user by username and password and their permissions.
:param username: Username. String with a minimum 3 and maximum of 45 characters
:param password: User password. String with a minimum 3 and maximum of 45 characters
:return: Following dictionary:
::
{'user': {'id': ... | [
"Get",
"user",
"by",
"username",
"and",
"password",
"and",
"their",
"permissions",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L362-L391 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/TipoAcesso.py | TipoAcesso.listar | def listar(self):
"""List all access types.
:return: Dictionary with structure:
::
{‘tipo_acesso’: [{‘id’: < id >,
‘protocolo’: < protocolo >}, ... other access types ...]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError... | python | def listar(self):
"""List all access types.
:return: Dictionary with structure:
::
{‘tipo_acesso’: [{‘id’: < id >,
‘protocolo’: < protocolo >}, ... other access types ...]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError... | [
"def",
"listar",
"(",
"self",
")",
":",
"code",
",",
"map",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"'tipoacesso/'",
")",
"key",
"=",
"'tipo_acesso'",
"return",
"get_list_map",
"(",
"self",
".",
"response",
"(",
"code",
",",
"map",
... | List all access types.
:return: Dictionary with structure:
::
{‘tipo_acesso’: [{‘id’: < id >,
‘protocolo’: < protocolo >}, ... other access types ...]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to genera... | [
"List",
"all",
"access",
"types",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoAcesso.py#L38-L54 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/TipoAcesso.py | TipoAcesso.inserir | def inserir(self, protocolo):
"""Insert new access type and returns its identifier.
:param protocolo: Protocol.
:return: Dictionary with structure: {‘tipo_acesso’: {‘id’: < id >}}
:raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists.
:raise InvalidParameterError: ... | python | def inserir(self, protocolo):
"""Insert new access type and returns its identifier.
:param protocolo: Protocol.
:return: Dictionary with structure: {‘tipo_acesso’: {‘id’: < id >}}
:raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists.
:raise InvalidParameterError: ... | [
"def",
"inserir",
"(",
"self",
",",
"protocolo",
")",
":",
"tipo_acesso_map",
"=",
"dict",
"(",
")",
"tipo_acesso_map",
"[",
"'protocolo'",
"]",
"=",
"protocolo",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'tipo_acesso'",
":",
"tipo_acesso_... | Insert new access type and returns its identifier.
:param protocolo: Protocol.
:return: Dictionary with structure: {‘tipo_acesso’: {‘id’: < id >}}
:raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists.
:raise InvalidParameterError: Protocol value is invalid or none.
... | [
"Insert",
"new",
"access",
"type",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoAcesso.py#L56-L74 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/TipoAcesso.py | TipoAcesso.alterar | def alterar(self, id_tipo_acesso, protocolo):
"""Edit access type by its identifier.
:param id_tipo_acesso: Access type identifier.
:param protocolo: Protocol.
:return: None
:raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists.
:raise InvalidParameterError... | python | def alterar(self, id_tipo_acesso, protocolo):
"""Edit access type by its identifier.
:param id_tipo_acesso: Access type identifier.
:param protocolo: Protocol.
:return: None
:raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists.
:raise InvalidParameterError... | [
"def",
"alterar",
"(",
"self",
",",
"id_tipo_acesso",
",",
"protocolo",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_tipo_acesso",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Access type id is invalid or was not informed.'",
")",
"tipo_acesso_map",
"=",... | Edit access type by its identifier.
:param id_tipo_acesso: Access type identifier.
:param protocolo: Protocol.
:return: None
:raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists.
:raise InvalidParameterError: Protocol value is invalid or none.
:raise TipoA... | [
"Edit",
"access",
"type",
"by",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoAcesso.py#L76-L101 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/TipoAcesso.py | TipoAcesso.remover | def remover(self, id_tipo_acesso):
"""Removes access type by its identifier.
:param id_tipo_acesso: Access type identifier.
:return: None
:raise TipoAcessoError: Access type associated with equipment, cannot be removed.
:raise InvalidParameterError: Protocol value is invalid o... | python | def remover(self, id_tipo_acesso):
"""Removes access type by its identifier.
:param id_tipo_acesso: Access type identifier.
:return: None
:raise TipoAcessoError: Access type associated with equipment, cannot be removed.
:raise InvalidParameterError: Protocol value is invalid o... | [
"def",
"remover",
"(",
"self",
",",
"id_tipo_acesso",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_tipo_acesso",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Access type id is invalid or was not informed.'",
")",
"url",
"=",
"'tipoacesso/'",
"+",
"str"... | Removes access type by its identifier.
:param id_tipo_acesso: Access type identifier.
:return: None
:raise TipoAcessoError: Access type associated with equipment, cannot be removed.
:raise InvalidParameterError: Protocol value is invalid or none.
:raise TipoAcessoNaoExisteErro... | [
"Removes",
"access",
"type",
"by",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoAcesso.py#L103-L124 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/TipoRoteiro.py | TipoRoteiro.inserir | def inserir(self, type, description):
"""Inserts a new Script Type and returns its identifier.
:param type: Script Type type. String with a minimum 3 and maximum of 40 characters
:param description: Script Type description. String with a minimum 3 and maximum of 100 characters
:return:... | python | def inserir(self, type, description):
"""Inserts a new Script Type and returns its identifier.
:param type: Script Type type. String with a minimum 3 and maximum of 40 characters
:param description: Script Type description. String with a minimum 3 and maximum of 100 characters
:return:... | [
"def",
"inserir",
"(",
"self",
",",
"type",
",",
"description",
")",
":",
"script_type_map",
"=",
"dict",
"(",
")",
"script_type_map",
"[",
"'type'",
"]",
"=",
"type",
"script_type_map",
"[",
"'description'",
"]",
"=",
"description",
"code",
",",
"xml",
"=... | Inserts a new Script Type and returns its identifier.
:param type: Script Type type. String with a minimum 3 and maximum of 40 characters
:param description: Script Type description. String with a minimum 3 and maximum of 100 characters
:return: Dictionary with the following structure:
... | [
"Inserts",
"a",
"new",
"Script",
"Type",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoRoteiro.py#L58-L82 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/TipoRoteiro.py | TipoRoteiro.alterar | def alterar(self, id_script_type, type, description):
"""Change Script Type from by the identifier.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:param type: Script Type type. String with a minimum 3 and maximum of 40 characters
:param descr... | python | def alterar(self, id_script_type, type, description):
"""Change Script Type from by the identifier.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:param type: Script Type type. String with a minimum 3 and maximum of 40 characters
:param descr... | [
"def",
"alterar",
"(",
"self",
",",
"id_script_type",
",",
"type",
",",
"description",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_script_type",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Script Type is invalid or was not informed.'",
... | Change Script Type from by the identifier.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:param type: Script Type type. String with a minimum 3 and maximum of 40 characters
:param description: Script Type description. String with a minimum 3 and maxi... | [
"Change",
"Script",
"Type",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoRoteiro.py#L84-L111 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/TipoRoteiro.py | TipoRoteiro.remover | def remover(self, id_script_type):
"""Remove Script Type from by the identifier.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Script Type is null and invalid.
:raise Tip... | python | def remover(self, id_script_type):
"""Remove Script Type from by the identifier.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Script Type is null and invalid.
:raise Tip... | [
"def",
"remover",
"(",
"self",
",",
"id_script_type",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_script_type",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Script Type is invalid or was not informed.'",
")",
"url",
"=",
"'scripttype/'",... | Remove Script Type from by the identifier.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Script Type is null and invalid.
:raise TipoRoteiroNaoExisteError: Script Type not regist... | [
"Remove",
"Script",
"Type",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoRoteiro.py#L113-L134 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiPool.py | ApiPool.pool_by_environmentvip | def pool_by_environmentvip(self, environment_vip_id):
"""
Method to return list object pool by environment vip id
Param environment_vip_id: environment vip id
Return list object pool
"""
uri = 'api/v3/pool/environment-vip/%s/' % environment_vip_id
return super(A... | python | def pool_by_environmentvip(self, environment_vip_id):
"""
Method to return list object pool by environment vip id
Param environment_vip_id: environment vip id
Return list object pool
"""
uri = 'api/v3/pool/environment-vip/%s/' % environment_vip_id
return super(A... | [
"def",
"pool_by_environmentvip",
"(",
"self",
",",
"environment_vip_id",
")",
":",
"uri",
"=",
"'api/v3/pool/environment-vip/%s/'",
"%",
"environment_vip_id",
"return",
"super",
"(",
"ApiPool",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | Method to return list object pool by environment vip id
Param environment_vip_id: environment vip id
Return list object pool | [
"Method",
"to",
"return",
"list",
"object",
"pool",
"by",
"environment",
"vip",
"id",
"Param",
"environment_vip_id",
":",
"environment",
"vip",
"id",
"Return",
"list",
"object",
"pool"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L36-L45 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiPool.py | ApiPool.pool_by_id | def pool_by_id(self, pool_id):
"""
Method to return object pool by id
Param pool_id: pool id
Returns object pool
"""
uri = 'api/v3/pool/%s/' % pool_id
return super(ApiPool, self).get(uri) | python | def pool_by_id(self, pool_id):
"""
Method to return object pool by id
Param pool_id: pool id
Returns object pool
"""
uri = 'api/v3/pool/%s/' % pool_id
return super(ApiPool, self).get(uri) | [
"def",
"pool_by_id",
"(",
"self",
",",
"pool_id",
")",
":",
"uri",
"=",
"'api/v3/pool/%s/'",
"%",
"pool_id",
"return",
"super",
"(",
"ApiPool",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | Method to return object pool by id
Param pool_id: pool id
Returns object pool | [
"Method",
"to",
"return",
"object",
"pool",
"by",
"id",
"Param",
"pool_id",
":",
"pool",
"id",
"Returns",
"object",
"pool"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L47-L56 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiPool.py | ApiPool.get_pool_details | def get_pool_details(self, pool_id):
"""
Method to return object pool by id
Param pool_id: pool id
Returns object pool
"""
uri = 'api/v3/pool/details/%s/' % pool_id
return super(ApiPool, self).get(uri) | python | def get_pool_details(self, pool_id):
"""
Method to return object pool by id
Param pool_id: pool id
Returns object pool
"""
uri = 'api/v3/pool/details/%s/' % pool_id
return super(ApiPool, self).get(uri) | [
"def",
"get_pool_details",
"(",
"self",
",",
"pool_id",
")",
":",
"uri",
"=",
"'api/v3/pool/details/%s/'",
"%",
"pool_id",
"return",
"super",
"(",
"ApiPool",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | Method to return object pool by id
Param pool_id: pool id
Returns object pool | [
"Method",
"to",
"return",
"object",
"pool",
"by",
"id",
"Param",
"pool_id",
":",
"pool",
"id",
"Returns",
"object",
"pool"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L58-L67 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiPool.py | ApiPool.search | def search(self, **kwargs):
"""
Method to search pool's based on extends search.
:param search: Dict containing QuerySets to find pool's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | python | def search(self, **kwargs):
"""
Method to search pool's based on extends search.
:param search: Dict containing QuerySets to find pool's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiPool",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/pool/'",
",",
"kwargs",
")",
")"
] | Method to search pool's based on extends search.
:param search: Dict containing QuerySets to find pool's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override d... | [
"Method",
"to",
"search",
"pool",
"s",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L69-L82 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiPool.py | ApiPool.delete | def delete(self, ids):
"""
Method to delete pool's by their ids
:param ids: Identifiers of pool's
:return: None
"""
url = build_uri_with_ids('api/v3/pool/%s/', ids)
return super(ApiPool, self).delete(url) | python | def delete(self, ids):
"""
Method to delete pool's by their ids
:param ids: Identifiers of pool's
:return: None
"""
url = build_uri_with_ids('api/v3/pool/%s/', ids)
return super(ApiPool, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/pool/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiPool",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete pool's by their ids
:param ids: Identifiers of pool's
:return: None | [
"Method",
"to",
"delete",
"pool",
"s",
"by",
"their",
"ids"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L99-L108 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiPool.py | ApiPool.update | def update(self, pools):
"""
Method to update pool's
:param pools: List containing pool's desired to updated
:return: None
"""
data = {'server_pools': pools}
pools_ids = [str(pool.get('id'))
for pool in pools]
return super(ApiPool, ... | python | def update(self, pools):
"""
Method to update pool's
:param pools: List containing pool's desired to updated
:return: None
"""
data = {'server_pools': pools}
pools_ids = [str(pool.get('id'))
for pool in pools]
return super(ApiPool, ... | [
"def",
"update",
"(",
"self",
",",
"pools",
")",
":",
"data",
"=",
"{",
"'server_pools'",
":",
"pools",
"}",
"pools_ids",
"=",
"[",
"str",
"(",
"pool",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"pool",
"in",
"pools",
"]",
"return",
"super",
"(",
... | Method to update pool's
:param pools: List containing pool's desired to updated
:return: None | [
"Method",
"to",
"update",
"pool",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L110-L123 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiPool.py | ApiPool.create | def create(self, pools):
"""
Method to create pool's
:param pools: List containing pool's desired to be created on database
:return: None
"""
data = {'server_pools': pools}
return super(ApiPool, self).post('api/v3/pool/', data) | python | def create(self, pools):
"""
Method to create pool's
:param pools: List containing pool's desired to be created on database
:return: None
"""
data = {'server_pools': pools}
return super(ApiPool, self).post('api/v3/pool/', data) | [
"def",
"create",
"(",
"self",
",",
"pools",
")",
":",
"data",
"=",
"{",
"'server_pools'",
":",
"pools",
"}",
"return",
"super",
"(",
"ApiPool",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/pool/'",
",",
"data",
")"
] | Method to create pool's
:param pools: List containing pool's desired to be created on database
:return: None | [
"Method",
"to",
"create",
"pool",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L125-L134 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.get_real_related | def get_real_related(self, id_equip):
"""
Find reals related with equipment
:param id_equip: Identifier of equipment
:return: Following dictionary:
::
{'vips': [{'port_real': < port_real >,
'server_pool_member_id': < server_pool_member_id >,
... | python | def get_real_related(self, id_equip):
"""
Find reals related with equipment
:param id_equip: Identifier of equipment
:return: Following dictionary:
::
{'vips': [{'port_real': < port_real >,
'server_pool_member_id': < server_pool_member_id >,
... | [
"def",
"get_real_related",
"(",
"self",
",",
"id_equip",
")",
":",
"url",
"=",
"'equipamento/get_real_related/'",
"+",
"str",
"(",
"id_equip",
")",
"+",
"'/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
... | Find reals related with equipment
:param id_equip: Identifier of equipment
:return: Following dictionary:
::
{'vips': [{'port_real': < port_real >,
'server_pool_member_id': < server_pool_member_id >,
'ip': < ip >,
'port_vip': < port_vip >,
... | [
"Find",
"reals",
"related",
"with",
"equipment"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L40-L68 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.find_equips | def find_equips(
self,
name,
iexact,
environment,
equip_type,
group,
ip,
pagination):
"""
Find vlans by all search parameters
:param name: Filter by vlan name column
:param iexact: Filter by ... | python | def find_equips(
self,
name,
iexact,
environment,
equip_type,
group,
ip,
pagination):
"""
Find vlans by all search parameters
:param name: Filter by vlan name column
:param iexact: Filter by ... | [
"def",
"find_equips",
"(",
"self",
",",
"name",
",",
"iexact",
",",
"environment",
",",
"equip_type",
",",
"group",
",",
"ip",
",",
"pagination",
")",
":",
"if",
"not",
"isinstance",
"(",
"pagination",
",",
"Pagination",
")",
":",
"raise",
"InvalidParamete... | Find vlans by all search parameters
:param name: Filter by vlan name column
:param iexact: Filter by name will be exact?
:param environment: Filter by environment ID related
:param equip_type: Filter by equipment_type ID related
:param group: Filter by equipment group ID related... | [
"Find",
"vlans",
"by",
"all",
"search",
"parameters"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L70-L139 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.inserir | def inserir(self, name, id_equipment_type, id_model, id_group, maintenance=False):
"""Inserts a new Equipment and returns its identifier
Além de inserir o equipamento, a networkAPI também associa o equipamento
ao grupo informado.
:param name: Equipment name. String with a minimum 3 and... | python | def inserir(self, name, id_equipment_type, id_model, id_group, maintenance=False):
"""Inserts a new Equipment and returns its identifier
Além de inserir o equipamento, a networkAPI também associa o equipamento
ao grupo informado.
:param name: Equipment name. String with a minimum 3 and... | [
"def",
"inserir",
"(",
"self",
",",
"name",
",",
"id_equipment_type",
",",
"id_model",
",",
"id_group",
",",
"maintenance",
"=",
"False",
")",
":",
"equip_map",
"=",
"dict",
"(",
")",
"equip_map",
"[",
"'id_tipo_equipamento'",
"]",
"=",
"id_equipment_type",
... | Inserts a new Equipment and returns its identifier
Além de inserir o equipamento, a networkAPI também associa o equipamento
ao grupo informado.
:param name: Equipment name. String with a minimum 3 and maximum of 30 characters
:param id_equipment_type: Identifier of the Equipment Type. ... | [
"Inserts",
"a",
"new",
"Equipment",
"and",
"returns",
"its",
"identifier"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L141-L181 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.edit | def edit(self, id_equip, nome, id_tipo_equipamento, id_modelo, maintenance=None):
"""Change Equipment from by the identifier.
:param id_equip: Identifier of the Equipment. Integer value and greater than zero.
:param nome: Equipment name. String with a minimum 3 and maximum of 30 characters
... | python | def edit(self, id_equip, nome, id_tipo_equipamento, id_modelo, maintenance=None):
"""Change Equipment from by the identifier.
:param id_equip: Identifier of the Equipment. Integer value and greater than zero.
:param nome: Equipment name. String with a minimum 3 and maximum of 30 characters
... | [
"def",
"edit",
"(",
"self",
",",
"id_equip",
",",
"nome",
",",
"id_tipo_equipamento",
",",
"id_modelo",
",",
"maintenance",
"=",
"None",
")",
":",
"equip_map",
"=",
"dict",
"(",
")",
"equip_map",
"[",
"'id_equip'",
"]",
"=",
"id_equip",
"equip_map",
"[",
... | Change Equipment from by the identifier.
:param id_equip: Identifier of the Equipment. Integer value and greater than zero.
:param nome: Equipment name. String with a minimum 3 and maximum of 30 characters
:param id_tipo_equipamento: Identifier of the Equipment Type. Integer value and greater t... | [
"Change",
"Equipment",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L183-L220 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.criar_ip | def criar_ip(self, id_vlan, id_equipamento, descricao):
"""Aloca um IP em uma VLAN para um equipamento.
Insere um novo IP para a VLAN e o associa ao equipamento.
:param id_vlan: Identificador da vlan.
:param id_equipamento: Identificador do equipamento.
:param descricao: Descri... | python | def criar_ip(self, id_vlan, id_equipamento, descricao):
"""Aloca um IP em uma VLAN para um equipamento.
Insere um novo IP para a VLAN e o associa ao equipamento.
:param id_vlan: Identificador da vlan.
:param id_equipamento: Identificador do equipamento.
:param descricao: Descri... | [
"def",
"criar_ip",
"(",
"self",
",",
"id_vlan",
",",
"id_equipamento",
",",
"descricao",
")",
":",
"ip_map",
"=",
"dict",
"(",
")",
"ip_map",
"[",
"'id_vlan'",
"]",
"=",
"id_vlan",
"ip_map",
"[",
"'descricao'",
"]",
"=",
"descricao",
"ip_map",
"[",
"'id_... | Aloca um IP em uma VLAN para um equipamento.
Insere um novo IP para a VLAN e o associa ao equipamento.
:param id_vlan: Identificador da vlan.
:param id_equipamento: Identificador do equipamento.
:param descricao: Descriçao do IP.
:return: Dicionário com a seguinte estrutura:
... | [
"Aloca",
"um",
"IP",
"em",
"uma",
"VLAN",
"para",
"um",
"equipamento",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L222-L257 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.add_ipv4 | def add_ipv4(self, id_network_ipv4, id_equipamento, descricao):
"""Allocate an IP on a network to an equipment.
Insert new IP for network and associate to the equipment
:param id_network_ipv4: ID for NetworkIPv4.
:param id_equipamento: ID for Equipment.
:param descricao: Descrip... | python | def add_ipv4(self, id_network_ipv4, id_equipamento, descricao):
"""Allocate an IP on a network to an equipment.
Insert new IP for network and associate to the equipment
:param id_network_ipv4: ID for NetworkIPv4.
:param id_equipamento: ID for Equipment.
:param descricao: Descrip... | [
"def",
"add_ipv4",
"(",
"self",
",",
"id_network_ipv4",
",",
"id_equipamento",
",",
"descricao",
")",
":",
"ip_map",
"=",
"dict",
"(",
")",
"ip_map",
"[",
"'id_network_ipv4'",
"]",
"=",
"id_network_ipv4",
"ip_map",
"[",
"'description'",
"]",
"=",
"descricao",
... | Allocate an IP on a network to an equipment.
Insert new IP for network and associate to the equipment
:param id_network_ipv4: ID for NetworkIPv4.
:param id_equipamento: ID for Equipment.
:param descricao: Description for IP.
:return: Following dictionary:
::
... | [
"Allocate",
"an",
"IP",
"on",
"a",
"network",
"to",
"an",
"equipment",
".",
"Insert",
"new",
"IP",
"for",
"network",
"and",
"associate",
"to",
"the",
"equipment"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L259-L296 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.add_ipv6 | def add_ipv6(self, id_network_ipv6, id_equip, description):
"""Allocate an IP on a network to an equipment.
Insert new IP for network and associate to the equipment
:param id_network_ipv6: ID for NetworkIPv6.
:param id_equip: ID for Equipment.
:param description: Description for... | python | def add_ipv6(self, id_network_ipv6, id_equip, description):
"""Allocate an IP on a network to an equipment.
Insert new IP for network and associate to the equipment
:param id_network_ipv6: ID for NetworkIPv6.
:param id_equip: ID for Equipment.
:param description: Description for... | [
"def",
"add_ipv6",
"(",
"self",
",",
"id_network_ipv6",
",",
"id_equip",
",",
"description",
")",
":",
"ip_map",
"=",
"dict",
"(",
")",
"ip_map",
"[",
"'id_network_ipv6'",
"]",
"=",
"id_network_ipv6",
"ip_map",
"[",
"'description'",
"]",
"=",
"description",
... | Allocate an IP on a network to an equipment.
Insert new IP for network and associate to the equipment
:param id_network_ipv6: ID for NetworkIPv6.
:param id_equip: ID for Equipment.
:param description: Description for IP.
:return: Following dictionary:
::
{... | [
"Allocate",
"an",
"IP",
"on",
"a",
"network",
"to",
"an",
"equipment",
".",
"Insert",
"new",
"IP",
"for",
"network",
"and",
"associate",
"to",
"the",
"equipment"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L298-L339 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.remover_ip | def remover_ip(self, id_equipamento, id_ip):
"""Removes association of IP and Equipment.
If IP has no other association with equipments, IP is also removed.
:param id_equipamento: Equipment identifier
:param id_ip: IP identifier.
:return: None
:raise VipIpError: Ip can... | python | def remover_ip(self, id_equipamento, id_ip):
"""Removes association of IP and Equipment.
If IP has no other association with equipments, IP is also removed.
:param id_equipamento: Equipment identifier
:param id_ip: IP identifier.
:return: None
:raise VipIpError: Ip can... | [
"def",
"remover_ip",
"(",
"self",
",",
"id_equipamento",
",",
"id_ip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_equipamento",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do equipamento é inválido ou não foi informado.')",
"",
"if",
"... | Removes association of IP and Equipment.
If IP has no other association with equipments, IP is also removed.
:param id_equipamento: Equipment identifier
:param id_ip: IP identifier.
:return: None
:raise VipIpError: Ip can't be removed because there is a created Vip Request.
... | [
"Removes",
"association",
"of",
"IP",
"and",
"Equipment",
".",
"If",
"IP",
"has",
"no",
"other",
"association",
"with",
"equipments",
"IP",
"is",
"also",
"removed",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L341-L371 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.associate_ipv6 | def associate_ipv6(self, id_equip, id_ipv6):
"""Associates an IPv6 to a equipament.
:param id_equip: Identifier of the equipment. Integer value and greater than zero.
:param id_ipv6: Identifier of the ip. Integer value and greater than zero.
:return: Dictionary with the following struc... | python | def associate_ipv6(self, id_equip, id_ipv6):
"""Associates an IPv6 to a equipament.
:param id_equip: Identifier of the equipment. Integer value and greater than zero.
:param id_ipv6: Identifier of the ip. Integer value and greater than zero.
:return: Dictionary with the following struc... | [
"def",
"associate_ipv6",
"(",
"self",
",",
"id_equip",
",",
"id_ipv6",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_equip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of equipment is invalid or was not informed.'",
")",
"if",
"not",
"i... | Associates an IPv6 to a equipament.
:param id_equip: Identifier of the equipment. Integer value and greater than zero.
:param id_ipv6: Identifier of the ip. Integer value and greater than zero.
:return: Dictionary with the following structure:
{'ip_equipamento': {'id': < id_ip_do_e... | [
"Associates",
"an",
"IPv6",
"to",
"a",
"equipament",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L404-L433 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.listar_por_tipo_ambiente | def listar_por_tipo_ambiente(self, id_tipo_equipamento, id_ambiente):
"""Lista os equipamentos de um tipo e que estão associados a um ambiente.
:param id_tipo_equipamento: Identificador do tipo do equipamento.
:param id_ambiente: Identificador do ambiente.
:return: Dicionário com a seg... | python | def listar_por_tipo_ambiente(self, id_tipo_equipamento, id_ambiente):
"""Lista os equipamentos de um tipo e que estão associados a um ambiente.
:param id_tipo_equipamento: Identificador do tipo do equipamento.
:param id_ambiente: Identificador do ambiente.
:return: Dicionário com a seg... | [
"def",
"listar_por_tipo_ambiente",
"(",
"self",
",",
"id_tipo_equipamento",
",",
"id_ambiente",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_tipo_equipamento",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do tipo do equipamento é inválido ou nã... | Lista os equipamentos de um tipo e que estão associados a um ambiente.
:param id_tipo_equipamento: Identificador do tipo do equipamento.
:param id_ambiente: Identificador do ambiente.
:return: Dicionário com a seguinte estrutura:
::
{'equipamento': [{'id': < id_equipament... | [
"Lista",
"os",
"equipamentos",
"de",
"um",
"tipo",
"e",
"que",
"estão",
"associados",
"a",
"um",
"ambiente",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L466-L505 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.listar_por_nome | def listar_por_nome(self, nome):
"""Obtém um equipamento a partir do seu nome.
:param nome: Nome do equipamento.
:return: Dicionário com a seguinte estrutura:
::
{'equipamento': {'id': < id_equipamento >,
'nome': < nome_equipamento >,
'id_tipo_equi... | python | def listar_por_nome(self, nome):
"""Obtém um equipamento a partir do seu nome.
:param nome: Nome do equipamento.
:return: Dicionário com a seguinte estrutura:
::
{'equipamento': {'id': < id_equipamento >,
'nome': < nome_equipamento >,
'id_tipo_equi... | [
"def",
"listar_por_nome",
"(",
"self",
",",
"nome",
")",
":",
"if",
"nome",
"==",
"''",
"or",
"nome",
"is",
"None",
":",
"raise",
"InvalidParameterError",
"(",
"u'O nome do equipamento não foi informado.')",
"",
"url",
"=",
"'equipamento/nome/'",
"+",
"urllib",
... | Obtém um equipamento a partir do seu nome.
:param nome: Nome do equipamento.
:return: Dicionário com a seguinte estrutura:
::
{'equipamento': {'id': < id_equipamento >,
'nome': < nome_equipamento >,
'id_tipo_equipamento': < id_tipo_equipamento >,
... | [
"Obtém",
"um",
"equipamento",
"a",
"partir",
"do",
"seu",
"nome",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L507-L540 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.listar_por_id | def listar_por_id(self, id):
"""Obtém um equipamento a partir do seu identificador.
:param id: ID do equipamento.
:return: Dicionário com a seguinte estrutura:
::
{'equipamento': {'id': < id_equipamento >,
'nome': < nome_equipamento >,
'id_tipo_equ... | python | def listar_por_id(self, id):
"""Obtém um equipamento a partir do seu identificador.
:param id: ID do equipamento.
:return: Dicionário com a seguinte estrutura:
::
{'equipamento': {'id': < id_equipamento >,
'nome': < nome_equipamento >,
'id_tipo_equ... | [
"def",
"listar_por_id",
"(",
"self",
",",
"id",
")",
":",
"if",
"id",
"is",
"None",
":",
"raise",
"InvalidParameterError",
"(",
"u'O id do equipamento não foi informado.')",
"",
"url",
"=",
"'equipamento/id/'",
"+",
"urllib",
".",
"quote",
"(",
"id",
")",
"+",... | Obtém um equipamento a partir do seu identificador.
:param id: ID do equipamento.
:return: Dicionário com a seguinte estrutura:
::
{'equipamento': {'id': < id_equipamento >,
'nome': < nome_equipamento >,
'id_tipo_equipamento': < id_tipo_equipamento >,
... | [
"Obtém",
"um",
"equipamento",
"a",
"partir",
"do",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L542-L575 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.list_all | def list_all(self):
"""Return all equipments in database
:return: Dictionary with the following structure:
::
{'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} }
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLE... | python | def list_all(self):
"""Return all equipments in database
:return: Dictionary with the following structure:
::
{'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} }
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLE... | [
"def",
"list_all",
"(",
"self",
")",
":",
"url",
"=",
"'equipamento/list/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Return all equipments in database
:return: Dictionary with the following structure:
::
{'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} }
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to gene... | [
"Return",
"all",
"equipments",
"in",
"database"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L577-L594 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.get_all | def get_all(self):
"""Return all equipments in database
:return: Dictionary with the following structure:
::
{'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} }
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLErr... | python | def get_all(self):
"""Return all equipments in database
:return: Dictionary with the following structure:
::
{'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} }
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLErr... | [
"def",
"get_all",
"(",
"self",
")",
":",
"url",
"=",
"'equipment/all'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Return all equipments in database
:return: Dictionary with the following structure:
::
{'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} }
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to gener... | [
"Return",
"all",
"equipments",
"in",
"database"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L596-L612 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.remover | def remover(self, id_equipamento):
"""Remove um equipamento a partir do seu identificador.
Além de remover o equipamento, a API também remove:
- O relacionamento do equipamento com os tipos de acessos.
- O relacionamento do equipamento com os roteiros.
- O relaciona... | python | def remover(self, id_equipamento):
"""Remove um equipamento a partir do seu identificador.
Além de remover o equipamento, a API também remove:
- O relacionamento do equipamento com os tipos de acessos.
- O relacionamento do equipamento com os roteiros.
- O relaciona... | [
"def",
"remover",
"(",
"self",
",",
"id_equipamento",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_equipamento",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do equipamento é inválido ou não foi informado.')",
"",
"url",
"=",
"'equipamento/... | Remove um equipamento a partir do seu identificador.
Além de remover o equipamento, a API também remove:
- O relacionamento do equipamento com os tipos de acessos.
- O relacionamento do equipamento com os roteiros.
- O relacionamento do equipamento com os IPs.
-... | [
"Remove",
"um",
"equipamento",
"a",
"partir",
"do",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L614-L643 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.associar_grupo | def associar_grupo(self, id_equipamento, id_grupo_equipamento):
"""Associa um equipamento a um grupo.
:param id_equipamento: Identificador do equipamento.
:param id_grupo_equipamento: Identificador do grupo de equipamento.
:return: Dicionário com a seguinte estrutura:
{'equ... | python | def associar_grupo(self, id_equipamento, id_grupo_equipamento):
"""Associa um equipamento a um grupo.
:param id_equipamento: Identificador do equipamento.
:param id_grupo_equipamento: Identificador do grupo de equipamento.
:return: Dicionário com a seguinte estrutura:
{'equ... | [
"def",
"associar_grupo",
"(",
"self",
",",
"id_equipamento",
",",
"id_grupo_equipamento",
")",
":",
"equip_map",
"=",
"dict",
"(",
")",
"equip_map",
"[",
"'id_grupo'",
"]",
"=",
"id_grupo_equipamento",
"equip_map",
"[",
"'id_equipamento'",
"]",
"=",
"id_equipament... | Associa um equipamento a um grupo.
:param id_equipamento: Identificador do equipamento.
:param id_grupo_equipamento: Identificador do grupo de equipamento.
:return: Dicionário com a seguinte estrutura:
{'equipamento_grupo':{'id': < id_equip_do_grupo >}}
:raise GrupoEquipam... | [
"Associa",
"um",
"equipamento",
"a",
"um",
"grupo",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L645-L669 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.remover_grupo | def remover_grupo(self, id_equipamento, id_grupo):
"""Remove a associação de um equipamento com um grupo de equipamento.
:param id_equipamento: Identificador do equipamento.
:param id_grupo: Identificador do grupo de equipamento.
:return: None
:raise EquipamentoGrupoNaoExisteE... | python | def remover_grupo(self, id_equipamento, id_grupo):
"""Remove a associação de um equipamento com um grupo de equipamento.
:param id_equipamento: Identificador do equipamento.
:param id_grupo: Identificador do grupo de equipamento.
:return: None
:raise EquipamentoGrupoNaoExisteE... | [
"def",
"remover_grupo",
"(",
"self",
",",
"id_equipamento",
",",
"id_grupo",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_equipamento",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do equipamento é inválido ou não foi informado.')",
"",
"if... | Remove a associação de um equipamento com um grupo de equipamento.
:param id_equipamento: Identificador do equipamento.
:param id_grupo: Identificador do grupo de equipamento.
:return: None
:raise EquipamentoGrupoNaoExisteError: Associação entre grupo e equipamento não cadastrada.
... | [
"Remove",
"a",
"associação",
"de",
"um",
"equipamento",
"com",
"um",
"grupo",
"de",
"equipamento",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L671-L700 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.list_by_group | def list_by_group(self, id_egroup):
"""Search Group Equipment from by the identifier.
:param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'equipaments':
[{'nome': < nam... | python | def list_by_group(self, id_egroup):
"""Search Group Equipment from by the identifier.
:param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'equipaments':
[{'nome': < nam... | [
"def",
"list_by_group",
"(",
"self",
",",
"id_egroup",
")",
":",
"if",
"id_egroup",
"is",
"None",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Group Equipament is invalid or was not informed.'",
")",
"url",
"=",
"'equipment/group/'",
"+",
"str",
"(",... | Search Group Equipment from by the identifier.
:param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'equipaments':
[{'nome': < name_equipament >, 'grupos': < id_group >,
... | [
"Search",
"Group",
"Equipment",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L702-L733 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Equipamento.py | Equipamento.get_ips_by_equipment_and_environment | def get_ips_by_equipment_and_environment(self, equip_nome, id_ambiente):
"""Search Group Equipment from by the identifier.
:param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'equi... | python | def get_ips_by_equipment_and_environment(self, equip_nome, id_ambiente):
"""Search Group Equipment from by the identifier.
:param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'equi... | [
"def",
"get_ips_by_equipment_and_environment",
"(",
"self",
",",
"equip_nome",
",",
"id_ambiente",
")",
":",
"if",
"id_ambiente",
"is",
"None",
":",
"raise",
"InvalidParameterError",
"(",
"u'The environment id is invalid or was not informed.'",
")",
"url",
"=",
"'equipmen... | Search Group Equipment from by the identifier.
:param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'equipaments':
[{'nome': < name_equipament >, 'grupos': < id_group >,
... | [
"Search",
"Group",
"Equipment",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L735-L766 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiGenericClient.py | ApiGenericClient.get | def get(self, uri):
"""
Sends a GET request.
@param uri: Uri of Service API.
@param data: Requesting Data. Default: None
@raise NetworkAPIClientError: Client failed to access the API.
"""
request = None
try:
request = reques... | python | def get(self, uri):
"""
Sends a GET request.
@param uri: Uri of Service API.
@param data: Requesting Data. Default: None
@raise NetworkAPIClientError: Client failed to access the API.
"""
request = None
try:
request = reques... | [
"def",
"get",
"(",
"self",
",",
"uri",
")",
":",
"request",
"=",
"None",
"try",
":",
"request",
"=",
"requests",
".",
"get",
"(",
"self",
".",
"_url",
"(",
"uri",
")",
",",
"auth",
"=",
"self",
".",
"_auth_basic",
"(",
")",
",",
"headers",
"=",
... | Sends a GET request.
@param uri: Uri of Service API.
@param data: Requesting Data. Default: None
@raise NetworkAPIClientError: Client failed to access the API. | [
"Sends",
"a",
"GET",
"request",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiGenericClient.py#L54-L96 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiGenericClient.py | ApiGenericClient._parse | def _parse(self, content):
"""
Parse data request to data from python.
@param content: Context of request.
@raise ParseError:
"""
if content:
stream = BytesIO(str(content))
data = json.loads(stream.getvalue())
return dat... | python | def _parse(self, content):
"""
Parse data request to data from python.
@param content: Context of request.
@raise ParseError:
"""
if content:
stream = BytesIO(str(content))
data = json.loads(stream.getvalue())
return dat... | [
"def",
"_parse",
"(",
"self",
",",
"content",
")",
":",
"if",
"content",
":",
"stream",
"=",
"BytesIO",
"(",
"str",
"(",
"content",
")",
")",
"data",
"=",
"json",
".",
"loads",
"(",
"stream",
".",
"getvalue",
"(",
")",
")",
"return",
"data"
] | Parse data request to data from python.
@param content: Context of request.
@raise ParseError: | [
"Parse",
"data",
"request",
"to",
"data",
"from",
"python",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiGenericClient.py#L233-L246 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiGenericClient.py | ApiGenericClient.prepare_url | def prepare_url(self, uri, kwargs):
"""Convert dict for URL params
"""
params = dict()
for key in kwargs:
if key in ('include', 'exclude', 'fields'):
params.update({
key: ','.join(kwargs.get(key))
})
elif key in ... | python | def prepare_url(self, uri, kwargs):
"""Convert dict for URL params
"""
params = dict()
for key in kwargs:
if key in ('include', 'exclude', 'fields'):
params.update({
key: ','.join(kwargs.get(key))
})
elif key in ... | [
"def",
"prepare_url",
"(",
"self",
",",
"uri",
",",
"kwargs",
")",
":",
"params",
"=",
"dict",
"(",
")",
"for",
"key",
"in",
"kwargs",
":",
"if",
"key",
"in",
"(",
"'include'",
",",
"'exclude'",
",",
"'fields'",
")",
":",
"params",
".",
"update",
"... | Convert dict for URL params | [
"Convert",
"dict",
"for",
"URL",
"params"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiGenericClient.py#L270-L288 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Rack.py | Rack.insert_rack | def insert_rack(
self,
number,
name,
mac_address_sw1,
mac_address_sw2,
mac_address_ilo,
id_sw1,
id_sw2,
id_ilo):
"""Create new Rack
:param number: Number of Rack
:return: Following diction... | python | def insert_rack(
self,
number,
name,
mac_address_sw1,
mac_address_sw2,
mac_address_ilo,
id_sw1,
id_sw2,
id_ilo):
"""Create new Rack
:param number: Number of Rack
:return: Following diction... | [
"def",
"insert_rack",
"(",
"self",
",",
"number",
",",
"name",
",",
"mac_address_sw1",
",",
"mac_address_sw2",
",",
"mac_address_ilo",
",",
"id_sw1",
",",
"id_sw2",
",",
"id_ilo",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"number",
")",
":",
"raise",... | Create new Rack
:param number: Number of Rack
:return: Following dictionary:
::
{'rack': {'id': < id_rack >,
'num_rack': < num_rack >,
'name_rack': < name_rack >,
'mac_sw1': < mac_sw1 >,
'mac_sw2': < mac_sw2 >,
'mac_ilo': < mac_ilo >,
... | [
"Create",
"new",
"Rack",
":",
"param",
"number",
":",
"Number",
"of",
"Rack",
":",
"return",
":",
"Following",
"dictionary",
":",
"::",
"{",
"rack",
":",
"{",
"id",
":",
"<",
"id_rack",
">",
"num_rack",
":",
"<",
"num_rack",
">",
"name_rack",
":",
"<... | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Rack.py#L38-L82 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Rack.py | Rack.remover | def remover(self, id_rack):
"""Remove Rack by the identifier.
:param id_rack: Identifier of the Rack. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Rack is null and invalid.
:raise RackNaoExisteError: Rack not registered.
... | python | def remover(self, id_rack):
"""Remove Rack by the identifier.
:param id_rack: Identifier of the Rack. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Rack is null and invalid.
:raise RackNaoExisteError: Rack not registered.
... | [
"def",
"remover",
"(",
"self",
",",
"id_rack",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_rack",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Rack is invalid or was not informed.'",
")",
"url",
"=",
"'rack/'",
"+",
"str",
"(",
"... | Remove Rack by the identifier.
:param id_rack: Identifier of the Rack. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Rack is null and invalid.
:raise RackNaoExisteError: Rack not registered.
:raise RackError: Rack is associa... | [
"Remove",
"Rack",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Rack.py#L168-L189 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.listar | def listar(self, id_divisao=None, id_ambiente_logico=None):
"""Lista os ambientes filtrados conforme parâmetros informados.
Se os dois parâmetros têm o valor None então retorna todos os ambientes.
Se o id_divisao é diferente de None então retorna os ambientes filtrados
pelo valor de id_... | python | def listar(self, id_divisao=None, id_ambiente_logico=None):
"""Lista os ambientes filtrados conforme parâmetros informados.
Se os dois parâmetros têm o valor None então retorna todos os ambientes.
Se o id_divisao é diferente de None então retorna os ambientes filtrados
pelo valor de id_... | [
"def",
"listar",
"(",
"self",
",",
"id_divisao",
"=",
"None",
",",
"id_ambiente_logico",
"=",
"None",
")",
":",
"url",
"=",
"'ambiente/'",
"if",
"is_valid_int_param",
"(",
"id_divisao",
")",
"and",
"not",
"is_valid_int_param",
"(",
"id_ambiente_logico",
")",
"... | Lista os ambientes filtrados conforme parâmetros informados.
Se os dois parâmetros têm o valor None então retorna todos os ambientes.
Se o id_divisao é diferente de None então retorna os ambientes filtrados
pelo valor de id_divisao.
Se o id_divisao e id_ambiente_logico são diferentes de... | [
"Lista",
"os",
"ambientes",
"filtrados",
"conforme",
"parâmetros",
"informados",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L69-L114 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.buscar_por_equipamento | def buscar_por_equipamento(self, nome_equipamento, ip_equipamento):
"""Obtém um ambiente a partir do ip e nome de um equipamento.
:param nome_equipamento: Nome do equipamento.
:param ip_equipamento: IP do equipamento no formato XXX.XXX.XXX.XXX.
:return: Dicionário com a seguinte estrut... | python | def buscar_por_equipamento(self, nome_equipamento, ip_equipamento):
"""Obtém um ambiente a partir do ip e nome de um equipamento.
:param nome_equipamento: Nome do equipamento.
:param ip_equipamento: IP do equipamento no formato XXX.XXX.XXX.XXX.
:return: Dicionário com a seguinte estrut... | [
"def",
"buscar_por_equipamento",
"(",
"self",
",",
"nome_equipamento",
",",
"ip_equipamento",
")",
":",
"if",
"nome_equipamento",
"==",
"''",
"or",
"nome_equipamento",
"is",
"None",
":",
"raise",
"InvalidParameterError",
"(",
"u'O nome do equipamento não foi informado.')"... | Obtém um ambiente a partir do ip e nome de um equipamento.
:param nome_equipamento: Nome do equipamento.
:param ip_equipamento: IP do equipamento no formato XXX.XXX.XXX.XXX.
:return: Dicionário com a seguinte estrutura:
::
{'ambiente': {'id': < id_ambiente >,
... | [
"Obtém",
"um",
"ambiente",
"a",
"partir",
"do",
"ip",
"e",
"nome",
"de",
"um",
"equipamento",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L116-L158 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.buscar_por_id | def buscar_por_id(self, id_ambiente):
"""Obtém um ambiente a partir da chave primária (identificador).
:param id_ambiente: Identificador do ambiente.
:return: Dicionário com a seguinte estrutura:
::
{'ambiente': {'id': < id_ambiente >,
'link': < link >,
... | python | def buscar_por_id(self, id_ambiente):
"""Obtém um ambiente a partir da chave primária (identificador).
:param id_ambiente: Identificador do ambiente.
:return: Dicionário com a seguinte estrutura:
::
{'ambiente': {'id': < id_ambiente >,
'link': < link >,
... | [
"def",
"buscar_por_id",
"(",
"self",
",",
"id_ambiente",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_ambiente",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do ambiente é inválido ou não foi informado.')",
"",
"url",
"=",
"'environment/id/... | Obtém um ambiente a partir da chave primária (identificador).
:param id_ambiente: Identificador do ambiente.
:return: Dicionário com a seguinte estrutura:
::
{'ambiente': {'id': < id_ambiente >,
'link': < link >,
'id_divisao': < id_divisao >,
'... | [
"Obtém",
"um",
"ambiente",
"a",
"partir",
"da",
"chave",
"primária",
"(",
"identificador",
")",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L160-L197 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.buscar_healthcheck_por_id | def buscar_healthcheck_por_id(self, id_healthcheck):
"""Get HealthCheck by id.
:param id_healthcheck: HealthCheck ID.
:return: Following dictionary:
::
{'healthcheck_expect': {'match_list': < match_list >,
'expect_string': < expect_string >,
'id'... | python | def buscar_healthcheck_por_id(self, id_healthcheck):
"""Get HealthCheck by id.
:param id_healthcheck: HealthCheck ID.
:return: Following dictionary:
::
{'healthcheck_expect': {'match_list': < match_list >,
'expect_string': < expect_string >,
'id'... | [
"def",
"buscar_healthcheck_por_id",
"(",
"self",
",",
"id_healthcheck",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_healthcheck",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do healthcheck é inválido ou não foi informado.')",
"",
"url",
"="... | Get HealthCheck by id.
:param id_healthcheck: HealthCheck ID.
:return: Following dictionary:
::
{'healthcheck_expect': {'match_list': < match_list >,
'expect_string': < expect_string >,
'id': < id >,
'ambiente': < ambiente >}}
:rais... | [
"Get",
"HealthCheck",
"by",
"id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L199-L226 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.listar_por_equip | def listar_por_equip(self, equip_id):
"""Lista todos os ambientes por equipamento especifico.
:return: Dicionário com a seguinte estrutura:
::
{'ambiente': {'id': < id_ambiente >,
'link': < link >,
'id_divisao': < id_divisao >,
'nome_divisao': <... | python | def listar_por_equip(self, equip_id):
"""Lista todos os ambientes por equipamento especifico.
:return: Dicionário com a seguinte estrutura:
::
{'ambiente': {'id': < id_ambiente >,
'link': < link >,
'id_divisao': < id_divisao >,
'nome_divisao': <... | [
"def",
"listar_por_equip",
"(",
"self",
",",
"equip_id",
")",
":",
"if",
"equip_id",
"is",
"None",
":",
"raise",
"InvalidParameterError",
"(",
"u'O id do equipamento não foi informado.')",
"",
"url",
"=",
"'ambiente/equip/'",
"+",
"str",
"(",
"equip_id",
")",
"+",... | Lista todos os ambientes por equipamento especifico.
:return: Dicionário com a seguinte estrutura:
::
{'ambiente': {'id': < id_ambiente >,
'link': < link >,
'id_divisao': < id_divisao >,
'nome_divisao': < nome_divisao >,
'id_ambiente_logico'... | [
"Lista",
"todos",
"os",
"ambientes",
"por",
"equipamento",
"especifico",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L228-L259 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.listar_healthcheck_expect | def listar_healthcheck_expect(self, id_ambiente):
"""Lista os healthcheck_expect´s de um ambiente.
:param id_ambiente: Identificador do ambiente.
:return: Dicionário com a seguinte estrutura:
::
{'healthcheck_expect': [{'id': < id_healthcheck_expect >,
'expec... | python | def listar_healthcheck_expect(self, id_ambiente):
"""Lista os healthcheck_expect´s de um ambiente.
:param id_ambiente: Identificador do ambiente.
:return: Dicionário com a seguinte estrutura:
::
{'healthcheck_expect': [{'id': < id_healthcheck_expect >,
'expec... | [
"def",
"listar_healthcheck_expect",
"(",
"self",
",",
"id_ambiente",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_ambiente",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do ambiente é inválido ou não foi informado.')",
"",
"url",
"=",
"'hea... | Lista os healthcheck_expect´s de um ambiente.
:param id_ambiente: Identificador do ambiente.
:return: Dicionário com a seguinte estrutura:
::
{'healthcheck_expect': [{'id': < id_healthcheck_expect >,
'expect_string': < expect_string >,
'match_list': < ma... | [
"Lista",
"os",
"healthcheck_expect´s",
"de",
"um",
"ambiente",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L261-L290 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.add_healthcheck_expect | def add_healthcheck_expect(self, id_ambiente, expect_string, match_list):
"""Insere um novo healthckeck_expect e retorna o seu identificador.
:param expect_string: expect_string.
:param id_ambiente: Identificador do ambiente lógico.
:param match_list: match list.
:return: Dicio... | python | def add_healthcheck_expect(self, id_ambiente, expect_string, match_list):
"""Insere um novo healthckeck_expect e retorna o seu identificador.
:param expect_string: expect_string.
:param id_ambiente: Identificador do ambiente lógico.
:param match_list: match list.
:return: Dicio... | [
"def",
"add_healthcheck_expect",
"(",
"self",
",",
"id_ambiente",
",",
"expect_string",
",",
"match_list",
")",
":",
"healthcheck_map",
"=",
"dict",
"(",
")",
"healthcheck_map",
"[",
"'id_ambiente'",
"]",
"=",
"id_ambiente",
"healthcheck_map",
"[",
"'expect_string'"... | Insere um novo healthckeck_expect e retorna o seu identificador.
:param expect_string: expect_string.
:param id_ambiente: Identificador do ambiente lógico.
:param match_list: match list.
:return: Dicionário com a seguinte estrutura: {'healthcheck_expect': {'id': < id >}}
:rais... | [
"Insere",
"um",
"novo",
"healthckeck_expect",
"e",
"retorna",
"o",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L292-L316 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.inserir | def inserir(
self,
id_grupo_l3,
id_ambiente_logico,
id_divisao,
link,
id_filter=None,
acl_path=None,
ipv4_template=None,
ipv6_template=None,
min_num_vlan_1=None,
max_num_vlan_1=None,
... | python | def inserir(
self,
id_grupo_l3,
id_ambiente_logico,
id_divisao,
link,
id_filter=None,
acl_path=None,
ipv4_template=None,
ipv6_template=None,
min_num_vlan_1=None,
max_num_vlan_1=None,
... | [
"def",
"inserir",
"(",
"self",
",",
"id_grupo_l3",
",",
"id_ambiente_logico",
",",
"id_divisao",
",",
"link",
",",
"id_filter",
"=",
"None",
",",
"acl_path",
"=",
"None",
",",
"ipv4_template",
"=",
"None",
",",
"ipv6_template",
"=",
"None",
",",
"min_num_vla... | Insere um novo ambiente e retorna o seu identificador.
:param id_grupo_l3: Identificador do grupo layer 3.
:param id_ambiente_logico: Identificador do ambiente lógico.
:param id_divisao: Identificador da divisão data center.
:param id_filter: Filter identifier.
:param link: Link... | [
"Insere",
"um",
"novo",
"ambiente",
"e",
"retorna",
"o",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L318-L379 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.insert_with_ip_range | def insert_with_ip_range(
self,
id_l3_group,
id_logical_environment,
id_division,
id_ip_config,
link,
id_filter=None):
"""Insert new environment with ip config and returns your id.
:param id_l3_group: Layer 3 Group ID.
... | python | def insert_with_ip_range(
self,
id_l3_group,
id_logical_environment,
id_division,
id_ip_config,
link,
id_filter=None):
"""Insert new environment with ip config and returns your id.
:param id_l3_group: Layer 3 Group ID.
... | [
"def",
"insert_with_ip_range",
"(",
"self",
",",
"id_l3_group",
",",
"id_logical_environment",
",",
"id_division",
",",
"id_ip_config",
",",
"link",
",",
"id_filter",
"=",
"None",
")",
":",
"environment_map",
"=",
"dict",
"(",
")",
"environment_map",
"[",
"'id_g... | Insert new environment with ip config and returns your id.
:param id_l3_group: Layer 3 Group ID.
:param id_logical_environment: Logical Environment ID.
:param id_division: Data Center Division ID.
:param id_filter: Filter identifier.
:param id_ip_config: IP Configuration ID.
... | [
"Insert",
"new",
"environment",
"with",
"ip",
"config",
"and",
"returns",
"your",
"id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L381-L421 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.add_ip_range | def add_ip_range(self, id_environment, id_ip_config):
"""Makes relationship of environment with ip config and returns your id.
:param id_environment: Environment ID.
:param id_ip_config: IP Configuration ID.
:return: Following dictionary:
{'config_do_ambiente': {'id_config_do_... | python | def add_ip_range(self, id_environment, id_ip_config):
"""Makes relationship of environment with ip config and returns your id.
:param id_environment: Environment ID.
:param id_ip_config: IP Configuration ID.
:return: Following dictionary:
{'config_do_ambiente': {'id_config_do_... | [
"def",
"add_ip_range",
"(",
"self",
",",
"id_environment",
",",
"id_ip_config",
")",
":",
"environment_map",
"=",
"dict",
"(",
")",
"environment_map",
"[",
"'id_environment'",
"]",
"=",
"id_environment",
"environment_map",
"[",
"'id_ip_config'",
"]",
"=",
"id_ip_c... | Makes relationship of environment with ip config and returns your id.
:param id_environment: Environment ID.
:param id_ip_config: IP Configuration ID.
:return: Following dictionary:
{'config_do_ambiente': {'id_config_do_ambiente': < id_config_do_ambiente >}}
:raise InvalidPar... | [
"Makes",
"relationship",
"of",
"environment",
"with",
"ip",
"config",
"and",
"returns",
"your",
"id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L423-L446 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.alterar | def alterar(
self,
id_ambiente,
id_grupo_l3,
id_ambiente_logico,
id_divisao,
link,
id_filter=None,
acl_path=None,
ipv4_template=None,
ipv6_template=None,
min_num_vlan_1=None,
m... | python | def alterar(
self,
id_ambiente,
id_grupo_l3,
id_ambiente_logico,
id_divisao,
link,
id_filter=None,
acl_path=None,
ipv4_template=None,
ipv6_template=None,
min_num_vlan_1=None,
m... | [
"def",
"alterar",
"(",
"self",
",",
"id_ambiente",
",",
"id_grupo_l3",
",",
"id_ambiente_logico",
",",
"id_divisao",
",",
"link",
",",
"id_filter",
"=",
"None",
",",
"acl_path",
"=",
"None",
",",
"ipv4_template",
"=",
"None",
",",
"ipv6_template",
"=",
"None... | Altera os dados de um ambiente a partir do seu identificador.
:param id_ambiente: Identificador do ambiente.
:param id_grupo_l3: Identificador do grupo layer 3.
:param id_ambiente_logico: Identificador do ambiente lógico.
:param id_divisao: Identificador da divisão data center.
... | [
"Altera",
"os",
"dados",
"de",
"um",
"ambiente",
"a",
"partir",
"do",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L448-L515 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.add_expect_string_healthcheck | def add_expect_string_healthcheck(self, expect_string):
"""Inserts a new healthckeck_expect with only expect_string.
:param expect_string: expect_string.
:return: Dictionary with the following structure:
::
{'healthcheck_expect': {'id': < id >}}
:raise InvalidPa... | python | def add_expect_string_healthcheck(self, expect_string):
"""Inserts a new healthckeck_expect with only expect_string.
:param expect_string: expect_string.
:return: Dictionary with the following structure:
::
{'healthcheck_expect': {'id': < id >}}
:raise InvalidPa... | [
"def",
"add_expect_string_healthcheck",
"(",
"self",
",",
"expect_string",
")",
":",
"healthcheck_map",
"=",
"dict",
"(",
")",
"healthcheck_map",
"[",
"'expect_string'",
"]",
"=",
"expect_string",
"url",
"=",
"'healthcheckexpect/add/expect_string/'",
"code",
",",
"xml... | Inserts a new healthckeck_expect with only expect_string.
:param expect_string: expect_string.
:return: Dictionary with the following structure:
::
{'healthcheck_expect': {'id': < id >}}
:raise InvalidParameterError: The value of expect_string is invalid.
:raise... | [
"Inserts",
"a",
"new",
"healthckeck_expect",
"with",
"only",
"expect_string",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L541-L567 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.listar_healtchcheck_expect_distinct | def listar_healtchcheck_expect_distinct(self):
"""Get all expect_string.
:return: Dictionary with the following structure:
::
{'healthcheck_expect': [
'expect_string': < expect_string >,
... demais healthcheck_expects ...]}
:raise InvalidParamet... | python | def listar_healtchcheck_expect_distinct(self):
"""Get all expect_string.
:return: Dictionary with the following structure:
::
{'healthcheck_expect': [
'expect_string': < expect_string >,
... demais healthcheck_expects ...]}
:raise InvalidParamet... | [
"def",
"listar_healtchcheck_expect_distinct",
"(",
"self",
")",
":",
"url",
"=",
"'healthcheckexpect/distinct/busca/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
... | Get all expect_string.
:return: Dictionary with the following structure:
::
{'healthcheck_expect': [
'expect_string': < expect_string >,
... demais healthcheck_expects ...]}
:raise InvalidParameterError: Identifier is null and invalid.
:raise Da... | [
"Get",
"all",
"expect_string",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L569-L590 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.list_acl_path | def list_acl_path(self):
"""Get all distinct acl paths.
:return: Dictionary with the following structure:
::
{'acl_paths': [
< acl_path >,
... ]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkap... | python | def list_acl_path(self):
"""Get all distinct acl paths.
:return: Dictionary with the following structure:
::
{'acl_paths': [
< acl_path >,
... ]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkap... | [
"def",
"list_acl_path",
"(",
"self",
")",
":",
"url",
"=",
"'environment/acl_path/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Get all distinct acl paths.
:return: Dictionary with the following structure:
::
{'acl_paths': [
< acl_path >,
... ]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML respons... | [
"Get",
"all",
"distinct",
"acl",
"paths",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L592-L613 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.set_template | def set_template(self, id_environment, name, network):
"""Set template value. If id_environment = 0, set '' to all environments related with the template name.
:param id_environment: Environment Identifier.
:param name: Template Name.
:param network: IPv4 or IPv6.
:return: None... | python | def set_template(self, id_environment, name, network):
"""Set template value. If id_environment = 0, set '' to all environments related with the template name.
:param id_environment: Environment Identifier.
:param name: Template Name.
:param network: IPv4 or IPv6.
:return: None... | [
"def",
"set_template",
"(",
"self",
",",
"id_environment",
",",
"name",
",",
"network",
")",
":",
"url",
"=",
"'environment/set_template/'",
"+",
"str",
"(",
"id_environment",
")",
"+",
"'/'",
"environment_map",
"=",
"dict",
"(",
")",
"environment_map",
"[",
... | Set template value. If id_environment = 0, set '' to all environments related with the template name.
:param id_environment: Environment Identifier.
:param name: Template Name.
:param network: IPv4 or IPv6.
:return: None
:raise InvalidParameterError: Invalid param.
:ra... | [
"Set",
"template",
"value",
".",
"If",
"id_environment",
"=",
"0",
"set",
"to",
"all",
"environments",
"related",
"with",
"the",
"template",
"name",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L615-L638 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.