repository_name stringlengths 7 55 | func_path_in_repository stringlengths 4 223 | func_name stringlengths 1 134 | whole_func_string stringlengths 75 104k | language stringclasses 1
value | func_code_string stringlengths 75 104k | func_code_tokens listlengths 19 28.4k | func_documentation_string stringlengths 1 46.9k | func_documentation_tokens listlengths 1 1.97k | split_name stringclasses 1
value | func_code_url stringlengths 87 315 |
|---|---|---|---|---|---|---|---|---|---|---|
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | LocationService.get_locations | def get_locations():
"""
:return: all knows locations
"""
LOGGER.debug("LocationService.get_locations")
args = {'http_operation': 'GET', 'operation_path': ''}
response = LocationService.requester.call(args)
ret = None
if response.rc == 0:
ret =... | python | def get_locations():
"""
:return: all knows locations
"""
LOGGER.debug("LocationService.get_locations")
args = {'http_operation': 'GET', 'operation_path': ''}
response = LocationService.requester.call(args)
ret = None
if response.rc == 0:
ret =... | [
"def",
"get_locations",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"LocationService.get_locations\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"LocationService",
".",
"requester",
".",
... | :return: all knows locations | [
":",
"return",
":",
"all",
"knows",
"locations"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L92-L109 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Location.json_2_location | def json_2_location(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Location object
"""
LOGGER.debug("Location.json_2_location")
return Location(locid=json_obj['loca... | python | def json_2_location(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Location object
"""
LOGGER.debug("Location.json_2_location")
return Location(locid=json_obj['loca... | [
"def",
"json_2_location",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Location.json_2_location\"",
")",
"return",
"Location",
"(",
"locid",
"=",
"json_obj",
"[",
"'locationID'",
"]",
",",
"name",
"=",
"json_obj",
"[",
"'locationName'",
"]",
",",... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Location object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"Location",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L117-L135 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Location.location_2_json | def location_2_json(self):
"""
transform ariane_clip3 location object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Location.location_2_json")
json_obj = {
'locationID': self.id,
'locationName': self.name,
'locati... | python | def location_2_json(self):
"""
transform ariane_clip3 location object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Location.location_2_json")
json_obj = {
'locationID': self.id,
'locationName': self.name,
'locati... | [
"def",
"location_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Location.location_2_json\"",
")",
"json_obj",
"=",
"{",
"'locationID'",
":",
"self",
".",
"id",
",",
"'locationName'",
":",
"self",
".",
"name",
",",
"'locationDescription'",
":",... | transform ariane_clip3 location object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"location",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L137-L157 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Location.sync | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("Location.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
para... | python | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("Location.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
para... | [
"def",
"sync",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Location.sync\"",
")",
"params",
"=",
"None",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"elif",
"self",
".",
"... | synchronize self from Ariane server according its id (prioritary) or name
:return: | [
"synchronize",
"self",
"from",
"Ariane",
"server",
"according",
"its",
"id",
"(",
"prioritary",
")",
"or",
"name",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L159-L192 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Location.add_routing_area | def add_routing_area(self, routing_area, sync=True):
"""
add a routing area to this location.
:param routing_area: the routing area to add on this location
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the routing area object on list to be ... | python | def add_routing_area(self, routing_area, sync=True):
"""
add a routing area to this location.
:param routing_area: the routing area to add on this location
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the routing area object on list to be ... | [
"def",
"add_routing_area",
"(",
"self",
",",
"routing_area",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Location.add_routing_area\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"routing_areas_2_add",
".",
"append",
"(",
"routing_area"... | add a routing area to this location.
:param routing_area: the routing area to add on this location
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the routing area object on list to be added on next save().
:return: | [
"add",
"a",
"routing",
"area",
"to",
"this",
"location",
".",
":",
"param",
"routing_area",
":",
"the",
"routing",
"area",
"to",
"add",
"on",
"this",
"location",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L243-L277 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Location.del_routing_area | def del_routing_area(self, routing_area, sync=True):
"""
delete routing area from this location
:param routing_area: the routing area to be deleted from this location
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the routing area object on ... | python | def del_routing_area(self, routing_area, sync=True):
"""
delete routing area from this location
:param routing_area: the routing area to be deleted from this location
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the routing area object on ... | [
"def",
"del_routing_area",
"(",
"self",
",",
"routing_area",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Location.del_routing_area\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"routing_areas_2_rm",
".",
"append",
"(",
"routing_area",... | delete routing area from this location
:param routing_area: the routing area to be deleted from this location
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the routing area object on list to be removed on next save().
:return: | [
"delete",
"routing",
"area",
"from",
"this",
"location",
":",
"param",
"routing_area",
":",
"the",
"routing",
"area",
"to",
"be",
"deleted",
"from",
"this",
"location",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L279-L313 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Location.save | def save(self):
"""
:return: save this location on Ariane server (create or update)
'locationID': self.id,
'locationName': self.name,
'locationDescription': self.description,
'locationAddress': self.address,
'locationZipCode': self.zip_code,
... | python | def save(self):
"""
:return: save this location on Ariane server (create or update)
'locationID': self.id,
'locationName': self.name,
'locationDescription': self.description,
'locationAddress': self.address,
'locationZipCode': self.zip_code,
... | [
"def",
"save",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Location.save\"",
")",
"post_payload",
"=",
"{",
"}",
"consolidated_ra_id",
"=",
"[",
"]",
"consolidated_sn_id",
"=",
"[",
"]",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"po... | :return: save this location on Ariane server (create or update)
'locationID': self.id,
'locationName': self.name,
'locationDescription': self.description,
'locationAddress': self.address,
'locationZipCode': self.zip_code,
'locationTown': self.town,... | [
":",
"return",
":",
"save",
"this",
"location",
"on",
"Ariane",
"server",
"(",
"create",
"or",
"update",
")",
"locationID",
":",
"self",
".",
"id",
"locationName",
":",
"self",
".",
"name",
"locationDescription",
":",
"self",
".",
"description",
"locationAdd... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L387-L491 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | RoutingAreaService.find_routing_area | def find_routing_area(ra_id=None, ra_name=None):
"""
find routing area according routing area id (default) or routing area name
:param ra_id: routing area id
:param ra_name: routing area name
:return: found routing area or None
"""
LOGGER.debug("RoutingAreaService... | python | def find_routing_area(ra_id=None, ra_name=None):
"""
find routing area according routing area id (default) or routing area name
:param ra_id: routing area id
:param ra_name: routing area name
:return: found routing area or None
"""
LOGGER.debug("RoutingAreaService... | [
"def",
"find_routing_area",
"(",
"ra_id",
"=",
"None",
",",
"ra_name",
"=",
"None",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"RoutingAreaService.find_routing_area\"",
")",
"if",
"(",
"ra_id",
"is",
"None",
"or",
"not",
"ra_id",
")",
"and",
"(",
"ra_name",
... | find routing area according routing area id (default) or routing area name
:param ra_id: routing area id
:param ra_name: routing area name
:return: found routing area or None | [
"find",
"routing",
"area",
"according",
"routing",
"area",
"id",
"(",
"default",
")",
"or",
"routing",
"area",
"name",
":",
"param",
"ra_id",
":",
"routing",
"area",
"id",
":",
"param",
"ra_name",
":",
"routing",
"area",
"name",
":",
"return",
":",
"foun... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L527-L564 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | RoutingAreaService.get_routing_areas | def get_routing_areas():
"""
:return: all routing areas
"""
LOGGER.debug("RoutingAreaService.get_routing_areas")
args = {'http_operation': 'GET', 'operation_path': ''}
response = RoutingAreaService.requester.call(args)
ret = None
if response.rc == 0:
... | python | def get_routing_areas():
"""
:return: all routing areas
"""
LOGGER.debug("RoutingAreaService.get_routing_areas")
args = {'http_operation': 'GET', 'operation_path': ''}
response = RoutingAreaService.requester.call(args)
ret = None
if response.rc == 0:
... | [
"def",
"get_routing_areas",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"RoutingAreaService.get_routing_areas\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"RoutingAreaService",
".",
"reque... | :return: all routing areas | [
":",
"return",
":",
"all",
"routing",
"areas"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L567-L584 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | RoutingArea.json_2_routing_area | def json_2_routing_area(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 RoutingArea object
"""
LOGGER.debug("RoutingArea.json_2_routing_area")
return RoutingArea(rai... | python | def json_2_routing_area(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 RoutingArea object
"""
LOGGER.debug("RoutingArea.json_2_routing_area")
return RoutingArea(rai... | [
"def",
"json_2_routing_area",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"RoutingArea.json_2_routing_area\"",
")",
"return",
"RoutingArea",
"(",
"raid",
"=",
"json_obj",
"[",
"'routingAreaID'",
"]",
",",
"name",
"=",
"json_obj",
"[",
"'routingAreaNa... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 RoutingArea object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"RoutingArea",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L599-L612 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | RoutingArea.routing_area_2_json | def routing_area_2_json(self):
"""
transform ariane_clip3 routing area object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("RoutingArea.routing_area_2_json")
json_obj = {
'routingAreaID': self.id,
'routingAreaName': self.name... | python | def routing_area_2_json(self):
"""
transform ariane_clip3 routing area object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("RoutingArea.routing_area_2_json")
json_obj = {
'routingAreaID': self.id,
'routingAreaName': self.name... | [
"def",
"routing_area_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"RoutingArea.routing_area_2_json\"",
")",
"json_obj",
"=",
"{",
"'routingAreaID'",
":",
"self",
".",
"id",
",",
"'routingAreaName'",
":",
"self",
".",
"name",
",",
"'routingAreaD... | transform ariane_clip3 routing area object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"routing",
"area",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L614-L629 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | RoutingArea.sync | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("RoutingArea.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
p... | python | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("RoutingArea.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
p... | [
"def",
"sync",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"RoutingArea.sync\"",
")",
"params",
"=",
"None",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"elif",
"self",
".",
... | synchronize self from Ariane server according its id (prioritary) or name
:return: | [
"synchronize",
"self",
"from",
"Ariane",
"server",
"according",
"its",
"id",
"(",
"prioritary",
")",
"or",
"name",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L631-L660 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | RoutingArea.add_location | def add_location(self, location, sync=True):
"""
add a location to this routing area.
:param location: the location to add on this routing area
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the location object on list to be added on next sa... | python | def add_location(self, location, sync=True):
"""
add a location to this routing area.
:param location: the location to add on this routing area
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the location object on list to be added on next sa... | [
"def",
"add_location",
"(",
"self",
",",
"location",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"RoutingArea.add_location\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"loc_2_add",
".",
"append",
"(",
"location",
")",
"else",
":... | add a location to this routing area.
:param location: the location to add on this routing area
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the location object on list to be added on next save().
:return: | [
"add",
"a",
"location",
"to",
"this",
"routing",
"area",
".",
":",
"param",
"location",
":",
"the",
"location",
"to",
"add",
"on",
"this",
"routing",
"area",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"wit... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L700-L734 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | RoutingArea.del_location | def del_location(self, location, sync=True):
"""
delete location from this routing area
:param location: the location to be deleted from this routing area
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the location object on list to be remov... | python | def del_location(self, location, sync=True):
"""
delete location from this routing area
:param location: the location to be deleted from this routing area
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the location object on list to be remov... | [
"def",
"del_location",
"(",
"self",
",",
"location",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"RoutingArea.del_location\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"loc_2_rm",
".",
"append",
"(",
"location",
")",
"else",
":"... | delete location from this routing area
:param location: the location to be deleted from this routing area
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the location object on list to be removed on next save().
:return: | [
"delete",
"location",
"from",
"this",
"routing",
"area",
":",
"param",
"location",
":",
"the",
"location",
"to",
"be",
"deleted",
"from",
"this",
"routing",
"area",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L736-L771 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | RoutingArea.save | def save(self):
"""
:return: save this routing area on Ariane server (create or update)
"""
LOGGER.debug("RoutingArea.save")
post_payload = {}
consolidated_loc_id = []
if self.id is not None:
post_payload['routingAreaID'] = self.id
if self.na... | python | def save(self):
"""
:return: save this routing area on Ariane server (create or update)
"""
LOGGER.debug("RoutingArea.save")
post_payload = {}
consolidated_loc_id = []
if self.id is not None:
post_payload['routingAreaID'] = self.id
if self.na... | [
"def",
"save",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"RoutingArea.save\"",
")",
"post_payload",
"=",
"{",
"}",
"consolidated_loc_id",
"=",
"[",
"]",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"post_payload",
"[",
"'routingAreaID'",
... | :return: save this routing area on Ariane server (create or update) | [
":",
"return",
":",
"save",
"this",
"routing",
"area",
"on",
"Ariane",
"server",
"(",
"create",
"or",
"update",
")"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L773-L832 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | SubnetService.find_subnet | def find_subnet(sb_id=None, sb_name=None):
"""
find the subnet according subnet id (prioritary) or subnet name
:param sb_id: the subnet id
:param sb_name: the subnet name
:return: found subnet or None if not found
"""
LOGGER.debug("SubnetService.find_subnet")
... | python | def find_subnet(sb_id=None, sb_name=None):
"""
find the subnet according subnet id (prioritary) or subnet name
:param sb_id: the subnet id
:param sb_name: the subnet name
:return: found subnet or None if not found
"""
LOGGER.debug("SubnetService.find_subnet")
... | [
"def",
"find_subnet",
"(",
"sb_id",
"=",
"None",
",",
"sb_name",
"=",
"None",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"SubnetService.find_subnet\"",
")",
"if",
"(",
"sb_id",
"is",
"None",
"or",
"not",
"sb_id",
")",
"and",
"(",
"sb_name",
"is",
"None",
... | find the subnet according subnet id (prioritary) or subnet name
:param sb_id: the subnet id
:param sb_name: the subnet name
:return: found subnet or None if not found | [
"find",
"the",
"subnet",
"according",
"subnet",
"id",
"(",
"prioritary",
")",
"or",
"subnet",
"name",
":",
"param",
"sb_id",
":",
"the",
"subnet",
"id",
":",
"param",
"sb_name",
":",
"the",
"subnet",
"name",
":",
"return",
":",
"found",
"subnet",
"or",
... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L868-L902 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | SubnetService.get_subnets | def get_subnets():
"""
:return: all knows subnets
"""
LOGGER.debug("SubnetService.get_subnets")
args = {'http_operation': 'GET', 'operation_path': ''}
response = SubnetService.requester.call(args)
ret = None
if response.rc == 0:
ret = []
... | python | def get_subnets():
"""
:return: all knows subnets
"""
LOGGER.debug("SubnetService.get_subnets")
args = {'http_operation': 'GET', 'operation_path': ''}
response = SubnetService.requester.call(args)
ret = None
if response.rc == 0:
ret = []
... | [
"def",
"get_subnets",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"SubnetService.get_subnets\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"SubnetService",
".",
"requester",
".",
"call"... | :return: all knows subnets | [
":",
"return",
":",
"all",
"knows",
"subnets"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L905-L922 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Subnet.json_2_subnet | def json_2_subnet(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Subnet object
"""
LOGGER.debug("Subnet.json_2_subnet")
return Subnet(subnetid=json_obj['subnetID'],... | python | def json_2_subnet(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Subnet object
"""
LOGGER.debug("Subnet.json_2_subnet")
return Subnet(subnetid=json_obj['subnetID'],... | [
"def",
"json_2_subnet",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Subnet.json_2_subnet\"",
")",
"return",
"Subnet",
"(",
"subnetid",
"=",
"json_obj",
"[",
"'subnetID'",
"]",
",",
"name",
"=",
"json_obj",
"[",
"'subnetName'",
"]",
",",
"descr... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Subnet object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"Subnet",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L927-L942 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Subnet.subnet_2_json | def subnet_2_json(self):
"""
transform ariane_clip3 subnet object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Subnet.subnet_2_json")
json_obj = {
'subnetID': self.id,
'subnetName': self.name,
'subnetDescription'... | python | def subnet_2_json(self):
"""
transform ariane_clip3 subnet object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Subnet.subnet_2_json")
json_obj = {
'subnetID': self.id,
'subnetName': self.name,
'subnetDescription'... | [
"def",
"subnet_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Subnet.subnet_2_json\"",
")",
"json_obj",
"=",
"{",
"'subnetID'",
":",
"self",
".",
"id",
",",
"'subnetName'",
":",
"self",
".",
"name",
",",
"'subnetDescription'",
":",
"self",
... | transform ariane_clip3 subnet object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"subnet",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L944-L961 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Subnet.sync | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("Subnet.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
params... | python | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("Subnet.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
params... | [
"def",
"sync",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Subnet.sync\"",
")",
"params",
"=",
"None",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"elif",
"self",
".",
"na... | synchronize self from Ariane server according its id (prioritary) or name
:return: | [
"synchronize",
"self",
"from",
"Ariane",
"server",
"according",
"its",
"id",
"(",
"prioritary",
")",
"or",
"name",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L963-L994 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Subnet.add_os_instance | def add_os_instance(self, os_instance, sync=True):
"""
add a OS instance to this subnet.
:param os_instance: the OS instance to add on this subnet
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS instance object on list to be added on n... | python | def add_os_instance(self, os_instance, sync=True):
"""
add a OS instance to this subnet.
:param os_instance: the OS instance to add on this subnet
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS instance object on list to be added on n... | [
"def",
"add_os_instance",
"(",
"self",
",",
"os_instance",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Subnet.add_os_instance\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"osi_2_add",
".",
"append",
"(",
"os_instance",
")",
"else... | add a OS instance to this subnet.
:param os_instance: the OS instance to add on this subnet
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS instance object on list to be added on next save().
:return: | [
"add",
"a",
"OS",
"instance",
"to",
"this",
"subnet",
".",
":",
"param",
"os_instance",
":",
"the",
"OS",
"instance",
"to",
"add",
"on",
"this",
"subnet",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1114-L1148 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Subnet.del_os_instance | def del_os_instance(self, os_instance, sync=True):
"""
delete OS instance from this subnet
:param os_instance: the OS instance to be deleted from this subnet
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS instance object on list to be... | python | def del_os_instance(self, os_instance, sync=True):
"""
delete OS instance from this subnet
:param os_instance: the OS instance to be deleted from this subnet
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS instance object on list to be... | [
"def",
"del_os_instance",
"(",
"self",
",",
"os_instance",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Subnet.del_os_instance\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"osi_2_rm",
".",
"append",
"(",
"os_instance",
")",
"else"... | delete OS instance from this subnet
:param os_instance: the OS instance to be deleted from this subnet
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS instance object on list to be removed on next save().
:return: | [
"delete",
"OS",
"instance",
"from",
"this",
"subnet",
":",
"param",
"os_instance",
":",
"the",
"OS",
"instance",
"to",
"be",
"deleted",
"from",
"this",
"subnet",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"w... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1150-L1184 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Subnet.save | def save(self):
"""
:return: save this subnet on Ariane server (create or update)
'subnetID': self.id,
'subnetName': self.name,
'subnetDescription': self.description,
'subnetIP': self.ip,
'subnetMask': self.mask,
'subnetRoutingAreaI... | python | def save(self):
"""
:return: save this subnet on Ariane server (create or update)
'subnetID': self.id,
'subnetName': self.name,
'subnetDescription': self.description,
'subnetIP': self.ip,
'subnetMask': self.mask,
'subnetRoutingAreaI... | [
"def",
"save",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Subnet.save\"",
")",
"post_payload",
"=",
"{",
"}",
"consolidated_osi_id",
"=",
"[",
"]",
"consolidated_loc_id",
"=",
"[",
"]",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"po... | :return: save this subnet on Ariane server (create or update)
'subnetID': self.id,
'subnetName': self.name,
'subnetDescription': self.description,
'subnetIP': self.ip,
'subnetMask': self.mask,
'subnetRoutingAreaID': self.routing_area_id,
... | [
":",
"return",
":",
"save",
"this",
"subnet",
"on",
"Ariane",
"server",
"(",
"create",
"or",
"update",
")",
"subnetID",
":",
"self",
".",
"id",
"subnetName",
":",
"self",
".",
"name",
"subnetDescription",
":",
"self",
".",
"description",
"subnetIP",
":",
... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1186-L1280 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | IPAddressService.find_ip_address | def find_ip_address(ipa_id=None, ipa_fqdn=None, ipa_ip_address=None, ipa_subnet_id=None, ipa_osi_id=None):
"""
find the IP Address (ipa) according ipa id (prioritary) or ipa ipAddress
:param ipa_id: the IP Address id
:param ipa_ip_address: the IP Address
:return: found IP Address... | python | def find_ip_address(ipa_id=None, ipa_fqdn=None, ipa_ip_address=None, ipa_subnet_id=None, ipa_osi_id=None):
"""
find the IP Address (ipa) according ipa id (prioritary) or ipa ipAddress
:param ipa_id: the IP Address id
:param ipa_ip_address: the IP Address
:return: found IP Address... | [
"def",
"find_ip_address",
"(",
"ipa_id",
"=",
"None",
",",
"ipa_fqdn",
"=",
"None",
",",
"ipa_ip_address",
"=",
"None",
",",
"ipa_subnet_id",
"=",
"None",
",",
"ipa_osi_id",
"=",
"None",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"IPAddressService.find_ip_addres... | find the IP Address (ipa) according ipa id (prioritary) or ipa ipAddress
:param ipa_id: the IP Address id
:param ipa_ip_address: the IP Address
:return: found IP Address or None if not found | [
"find",
"the",
"IP",
"Address",
"(",
"ipa",
")",
"according",
"ipa",
"id",
"(",
"prioritary",
")",
"or",
"ipa",
"ipAddress",
":",
"param",
"ipa_id",
":",
"the",
"IP",
"Address",
"id",
":",
"param",
"ipa_ip_address",
":",
"the",
"IP",
"Address",
":",
"r... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1316-L1371 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | IPAddressService.get_ip_addresses | def get_ip_addresses():
"""
:return: all knows IP Address
"""
LOGGER.debug("IPAddressService.get_ip_addresses")
args = {'http_operation': 'GET', 'operation_path': ''}
response = IPAddressService.requester.call(args)
ret = None
if response.rc == 0:
... | python | def get_ip_addresses():
"""
:return: all knows IP Address
"""
LOGGER.debug("IPAddressService.get_ip_addresses")
args = {'http_operation': 'GET', 'operation_path': ''}
response = IPAddressService.requester.call(args)
ret = None
if response.rc == 0:
... | [
"def",
"get_ip_addresses",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"IPAddressService.get_ip_addresses\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"IPAddressService",
".",
"requester",... | :return: all knows IP Address | [
":",
"return",
":",
"all",
"knows",
"IP",
"Address"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1374-L1391 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | IPAddress.json_2_ip_address | def json_2_ip_address(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 IP Address object
"""
LOGGER.debug("IPAddress.json_2_ip_address")
return IPAddress(ipa_id=json_... | python | def json_2_ip_address(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 IP Address object
"""
LOGGER.debug("IPAddress.json_2_ip_address")
return IPAddress(ipa_id=json_... | [
"def",
"json_2_ip_address",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"IPAddress.json_2_ip_address\"",
")",
"return",
"IPAddress",
"(",
"ipa_id",
"=",
"json_obj",
"[",
"'ipAddressID'",
"]",
",",
"ip_address",
"=",
"json_obj",
"[",
"'ipAddressIPA'",... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 IP Address object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"IP",
"Address",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1396-L1407 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | IPAddress.ip_address_2_json | def ip_address_2_json(self):
"""
transform ariane_clip3 OS Instance object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("IPAddress.ip_address_2_json")
json_obj = {
'ipAddressID': self.id,
'ipAddressIPA': self.ip_address,
... | python | def ip_address_2_json(self):
"""
transform ariane_clip3 OS Instance object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("IPAddress.ip_address_2_json")
json_obj = {
'ipAddressID': self.id,
'ipAddressIPA': self.ip_address,
... | [
"def",
"ip_address_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"IPAddress.ip_address_2_json\"",
")",
"json_obj",
"=",
"{",
"'ipAddressID'",
":",
"self",
".",
"id",
",",
"'ipAddressIPA'",
":",
"self",
".",
"ip_address",
",",
"'ipAddressFQDN'",
... | transform ariane_clip3 OS Instance object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"OS",
"Instance",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1409-L1422 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | IPAddress.sync | def sync(self):
"""
synchronize self from Ariane server according its id (priority) or name
:return:
"""
LOGGER.debug("IPAddress.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.ip_address is not None:
... | python | def sync(self):
"""
synchronize self from Ariane server according its id (priority) or name
:return:
"""
LOGGER.debug("IPAddress.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.ip_address is not None:
... | [
"def",
"sync",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"IPAddress.sync\"",
")",
"params",
"=",
"None",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"elif",
"self",
".",
... | synchronize self from Ariane server according its id (priority) or name
:return: | [
"synchronize",
"self",
"from",
"Ariane",
"server",
"according",
"its",
"id",
"(",
"priority",
")",
"or",
"name",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1424-L1452 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | IPAddress.save | def save(self):
"""
:return: save this IP Address on Ariane server (create or update)
"""
LOGGER.debug("IPAddress.save")
post_payload = {}
if self.id is not None:
post_payload['ipAddressID'] = self.id
if self.ip_address is not None:
post_... | python | def save(self):
"""
:return: save this IP Address on Ariane server (create or update)
"""
LOGGER.debug("IPAddress.save")
post_payload = {}
if self.id is not None:
post_payload['ipAddressID'] = self.id
if self.ip_address is not None:
post_... | [
"def",
"save",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"IPAddress.save\"",
")",
"post_payload",
"=",
"{",
"}",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"post_payload",
"[",
"'ipAddressID'",
"]",
"=",
"self",
".",
"id",
"if",
"... | :return: save this IP Address on Ariane server (create or update) | [
":",
"return",
":",
"save",
"this",
"IP",
"Address",
"on",
"Ariane",
"server",
"(",
"create",
"or",
"update",
")"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1486-L1520 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | IPAddress.remove | def remove(self):
"""
remove this object from Ariane server
:return:
"""
LOGGER.debug("IPAddress.remove")
if self.id is None:
return None
else:
params = {
'id': self.id
}
args = {'http_operation': 'GE... | python | def remove(self):
"""
remove this object from Ariane server
:return:
"""
LOGGER.debug("IPAddress.remove")
if self.id is None:
return None
else:
params = {
'id': self.id
}
args = {'http_operation': 'GE... | [
"def",
"remove",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"IPAddress.remove\"",
")",
"if",
"self",
".",
"id",
"is",
"None",
":",
"return",
"None",
"else",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"args",
"=",
"{",
... | remove this object from Ariane server
:return: | [
"remove",
"this",
"object",
"from",
"Ariane",
"server",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1522-L1544 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | NICService.find_nic | def find_nic(nic_id=None, nic_mac_address=None, nic_name=None):
"""
find the NIC according nic id (prioritary) or name or mac_Address
:rtype : object
:param nic_id: the NIC id
:param nic_mac_address: the NIC mac Address
:param nic_name : name
:return: found NIC or... | python | def find_nic(nic_id=None, nic_mac_address=None, nic_name=None):
"""
find the NIC according nic id (prioritary) or name or mac_Address
:rtype : object
:param nic_id: the NIC id
:param nic_mac_address: the NIC mac Address
:param nic_name : name
:return: found NIC or... | [
"def",
"find_nic",
"(",
"nic_id",
"=",
"None",
",",
"nic_mac_address",
"=",
"None",
",",
"nic_name",
"=",
"None",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"NICService.find_nic\"",
")",
"if",
"(",
"nic_id",
"is",
"None",
"or",
"not",
"nic_id",
")",
"and",... | find the NIC according nic id (prioritary) or name or mac_Address
:rtype : object
:param nic_id: the NIC id
:param nic_mac_address: the NIC mac Address
:param nic_name : name
:return: found NIC or None if not found | [
"find",
"the",
"NIC",
"according",
"nic",
"id",
"(",
"prioritary",
")",
"or",
"name",
"or",
"mac_Address",
":",
"rtype",
":",
"object",
":",
"param",
"nic_id",
":",
"the",
"NIC",
"id",
":",
"param",
"nic_mac_address",
":",
"the",
"NIC",
"mac",
"Address",... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1556-L1606 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | NICService.get_nics | def get_nics():
"""
:return: all knows NIC
"""
LOGGER.debug("NICService.get_nics")
args = {'http_operation': 'GET', 'operation_path': ''}
response = NICService.requester.call(args)
ret = None
if response.rc == 0:
ret = []
for nic in... | python | def get_nics():
"""
:return: all knows NIC
"""
LOGGER.debug("NICService.get_nics")
args = {'http_operation': 'GET', 'operation_path': ''}
response = NICService.requester.call(args)
ret = None
if response.rc == 0:
ret = []
for nic in... | [
"def",
"get_nics",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"NICService.get_nics\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"NICService",
".",
"requester",
".",
"call",
"(",
"... | :return: all knows NIC | [
":",
"return",
":",
"all",
"knows",
"NIC"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1609-L1626 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | NIC.json_2_nic | def json_2_nic(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 NIC object
"""
LOGGER.debug("NIC.json_2_nic")
return NIC(nic_id=json_obj['nicID'],
... | python | def json_2_nic(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 NIC object
"""
LOGGER.debug("NIC.json_2_nic")
return NIC(nic_id=json_obj['nicID'],
... | [
"def",
"json_2_nic",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"NIC.json_2_nic\"",
")",
"return",
"NIC",
"(",
"nic_id",
"=",
"json_obj",
"[",
"'nicID'",
"]",
",",
"mac_address",
"=",
"json_obj",
"[",
"'nicMacAddress'",
"]",
",",
"name",
"="... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 NIC object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"NIC",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1631-L1645 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | NIC.nic_2_json | def nic_2_json(self):
"""
transform ariane_clip3 OS Instance object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("NIC.nic_2_json")
json_obj = {
'nicID': self.id,
'nicName': self.name,
'nicMacAddress': self.mac_add... | python | def nic_2_json(self):
"""
transform ariane_clip3 OS Instance object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("NIC.nic_2_json")
json_obj = {
'nicID': self.id,
'nicName': self.name,
'nicMacAddress': self.mac_add... | [
"def",
"nic_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"NIC.nic_2_json\"",
")",
"json_obj",
"=",
"{",
"'nicID'",
":",
"self",
".",
"id",
",",
"'nicName'",
":",
"self",
".",
"name",
",",
"'nicMacAddress'",
":",
"self",
".",
"mac_addres... | transform ariane_clip3 OS Instance object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"OS",
"Instance",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1647-L1663 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | NIC.sync | def sync(self):
"""
synchronize self from Ariane server according its id (priority) or name
:return:
"""
LOGGER.debug("NIC.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
params = {'... | python | def sync(self):
"""
synchronize self from Ariane server according its id (priority) or name
:return:
"""
LOGGER.debug("NIC.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
params = {'... | [
"def",
"sync",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"NIC.sync\"",
")",
"params",
"=",
"None",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"elif",
"self",
".",
"name"... | synchronize self from Ariane server according its id (priority) or name
:return: | [
"synchronize",
"self",
"from",
"Ariane",
"server",
"according",
"its",
"id",
"(",
"priority",
")",
"or",
"name",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1665-L1695 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | NIC.save | def save(self):
"""
:return: save this NIC on Ariane server (create or update)
"""
LOGGER.debug("NIC.save")
post_payload = {}
if self.id is not None:
post_payload['nicID'] = self.id
if self.name is not None:
post_payload['nicName'] = self... | python | def save(self):
"""
:return: save this NIC on Ariane server (create or update)
"""
LOGGER.debug("NIC.save")
post_payload = {}
if self.id is not None:
post_payload['nicID'] = self.id
if self.name is not None:
post_payload['nicName'] = self... | [
"def",
"save",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"NIC.save\"",
")",
"post_payload",
"=",
"{",
"}",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"post_payload",
"[",
"'nicID'",
"]",
"=",
"self",
".",
"id",
"if",
"self",
"."... | :return: save this NIC on Ariane server (create or update) | [
":",
"return",
":",
"save",
"this",
"NIC",
"on",
"Ariane",
"server",
"(",
"create",
"or",
"update",
")"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1735-L1778 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstanceService.find_os_instance | def find_os_instance(osi_id=None, osi_name=None):
"""
find the OS instance (osi) according osi id (prioritary) or osi name
:param osi_id: the OS instance id
:param osi_name: the OS instance name
:return: found OS instance or None if not found
"""
LOGGER.debug("OSI... | python | def find_os_instance(osi_id=None, osi_name=None):
"""
find the OS instance (osi) according osi id (prioritary) or osi name
:param osi_id: the OS instance id
:param osi_name: the OS instance name
:return: found OS instance or None if not found
"""
LOGGER.debug("OSI... | [
"def",
"find_os_instance",
"(",
"osi_id",
"=",
"None",
",",
"osi_name",
"=",
"None",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstanceService.find_os_instance\"",
")",
"if",
"(",
"osi_id",
"is",
"None",
"or",
"not",
"osi_id",
")",
"and",
"(",
"osi_name",
... | find the OS instance (osi) according osi id (prioritary) or osi name
:param osi_id: the OS instance id
:param osi_name: the OS instance name
:return: found OS instance or None if not found | [
"find",
"the",
"OS",
"instance",
"(",
"osi",
")",
"according",
"osi",
"id",
"(",
"prioritary",
")",
"or",
"osi",
"name",
":",
"param",
"osi_id",
":",
"the",
"OS",
"instance",
"id",
":",
"param",
"osi_name",
":",
"the",
"OS",
"instance",
"name",
":",
... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1814-L1851 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstanceService.get_os_instances | def get_os_instances():
"""
:return: all knows OS instance
"""
LOGGER.debug("OSInstanceService.get_os_instances")
args = {'http_operation': 'GET', 'operation_path': ''}
response = OSInstanceService.requester.call(args)
ret = None
if response.rc == 0:
... | python | def get_os_instances():
"""
:return: all knows OS instance
"""
LOGGER.debug("OSInstanceService.get_os_instances")
args = {'http_operation': 'GET', 'operation_path': ''}
response = OSInstanceService.requester.call(args)
ret = None
if response.rc == 0:
... | [
"def",
"get_os_instances",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstanceService.get_os_instances\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"OSInstanceService",
".",
"requester... | :return: all knows OS instance | [
":",
"return",
":",
"all",
"knows",
"OS",
"instance"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1854-L1871 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.json_2_os_instance | def json_2_os_instance(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 OS instance object
"""
LOGGER.debug("OSInstance.json_2_os_instance")
return OSInstance(osiid=j... | python | def json_2_os_instance(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 OS instance object
"""
LOGGER.debug("OSInstance.json_2_os_instance")
return OSInstance(osiid=j... | [
"def",
"json_2_os_instance",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.json_2_os_instance\"",
")",
"return",
"OSInstance",
"(",
"osiid",
"=",
"json_obj",
"[",
"'osInstanceID'",
"]",
",",
"name",
"=",
"json_obj",
"[",
"'osInstanceName'",... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 OS instance object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"OS",
"instance",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1876-L1895 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.os_instance_2_json | def os_instance_2_json(self):
"""
transform ariane_clip3 OS Instance object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("OSInstance.os_instance_2_json")
json_obj = {
'osInstanceID': self.id,
'osInstanceName': self.name,
... | python | def os_instance_2_json(self):
"""
transform ariane_clip3 OS Instance object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("OSInstance.os_instance_2_json")
json_obj = {
'osInstanceID': self.id,
'osInstanceName': self.name,
... | [
"def",
"os_instance_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.os_instance_2_json\"",
")",
"json_obj",
"=",
"{",
"'osInstanceID'",
":",
"self",
".",
"id",
",",
"'osInstanceName'",
":",
"self",
".",
"name",
",",
"'osInstanceDescrip... | transform ariane_clip3 OS Instance object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"OS",
"Instance",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1897-L1918 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.sync | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("OSInstance.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
pa... | python | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("OSInstance.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
pa... | [
"def",
"sync",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.sync\"",
")",
"params",
"=",
"None",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"elif",
"self",
".",
... | synchronize self from Ariane server according its id (prioritary) or name
:return: | [
"synchronize",
"self",
"from",
"Ariane",
"server",
"according",
"its",
"id",
"(",
"prioritary",
")",
"or",
"name",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L1920-L1961 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.add_subnet | def add_subnet(self, subnet, sync=True):
"""
add a subnet to this OS instance.
:param subnet: the subnet to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the subnet object on list to be added on next save().
... | python | def add_subnet(self, subnet, sync=True):
"""
add a subnet to this OS instance.
:param subnet: the subnet to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the subnet object on list to be added on next save().
... | [
"def",
"add_subnet",
"(",
"self",
",",
"subnet",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.add_subnet\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"subnets_2_add",
".",
"append",
"(",
"subnet",
")",
"else",
":",
... | add a subnet to this OS instance.
:param subnet: the subnet to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the subnet object on list to be added on next save().
:return: | [
"add",
"a",
"subnet",
"to",
"this",
"OS",
"instance",
".",
":",
"param",
"subnet",
":",
"the",
"subnet",
"to",
"add",
"on",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"A... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2027-L2061 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.add_ip_address | def add_ip_address(self, ip_address, sync=True):
"""
add a ip address to this OS instance.
:param ip_address: the ip address to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the subnet object on list to be added on n... | python | def add_ip_address(self, ip_address, sync=True):
"""
add a ip address to this OS instance.
:param ip_address: the ip address to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the subnet object on list to be added on n... | [
"def",
"add_ip_address",
"(",
"self",
",",
"ip_address",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.add_ip_address\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"ip_address_2_add",
".",
"append",
"(",
"ip_address",
")",
... | add a ip address to this OS instance.
:param ip_address: the ip address to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the subnet object on list to be added on next save().
:return: | [
"add",
"a",
"ip",
"address",
"to",
"this",
"OS",
"instance",
".",
":",
"param",
"ip_address",
":",
"the",
"ip",
"address",
"to",
"add",
"on",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchr... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2099-L2133 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.del_ip_address | def del_ip_address(self, ip_address, sync=True):
"""
delete ip address from this OS instance
:param ip_address: the ip address to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the ipAddress object on list to... | python | def del_ip_address(self, ip_address, sync=True):
"""
delete ip address from this OS instance
:param ip_address: the ip address to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the ipAddress object on list to... | [
"def",
"del_ip_address",
"(",
"self",
",",
"ip_address",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.del_ip_address\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"ip_address_2_rm",
".",
"append",
"(",
"ip_address",
")",
... | delete ip address from this OS instance
:param ip_address: the ip address to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the ipAddress object on list to be removed on next save().
:return: | [
"delete",
"ip",
"address",
"from",
"this",
"OS",
"instance",
":",
"param",
"ip_address",
":",
"the",
"ip",
"address",
"to",
"be",
"deleted",
"from",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"s... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2135-L2169 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.add_nic | def add_nic(self, nic, sync=True):
"""
add a nic to this OS instance.
:param nic: the nic to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the nic object on list to be added on next save().
:return:
"... | python | def add_nic(self, nic, sync=True):
"""
add a nic to this OS instance.
:param nic: the nic to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the nic object on list to be added on next save().
:return:
"... | [
"def",
"add_nic",
"(",
"self",
",",
"nic",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.add_nic\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"nic_2_add",
".",
"append",
"(",
"nic",
")",
"else",
":",
"if",
"nic",
... | add a nic to this OS instance.
:param nic: the nic to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the nic object on list to be added on next save().
:return: | [
"add",
"a",
"nic",
"to",
"this",
"OS",
"instance",
".",
":",
"param",
"nic",
":",
"the",
"nic",
"to",
"add",
"on",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"Ariane",
... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2171-L2205 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.del_nic | def del_nic(self, nic, sync=True):
"""
delete nic from this OS instance
:param nic: the nic to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the nic object on list to be removed on next save().
:retu... | python | def del_nic(self, nic, sync=True):
"""
delete nic from this OS instance
:param nic: the nic to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the nic object on list to be removed on next save().
:retu... | [
"def",
"del_nic",
"(",
"self",
",",
"nic",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.del_nic\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"nic_2_rm",
".",
"append",
"(",
"nic",
")",
"else",
":",
"if",
"nic",
... | delete nic from this OS instance
:param nic: the nic to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the nic object on list to be removed on next save().
:return: | [
"delete",
"nic",
"from",
"this",
"OS",
"instance",
":",
"param",
"nic",
":",
"the",
"nic",
"to",
"be",
"deleted",
"from",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"Arian... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2207-L2241 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.add_embedded_osi | def add_embedded_osi(self, e_osi, sync=True):
"""
add an embedded OS instance to this OS instance.
:param e_osi: the embedded OS instance to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the embedded OS instance obje... | python | def add_embedded_osi(self, e_osi, sync=True):
"""
add an embedded OS instance to this OS instance.
:param e_osi: the embedded OS instance to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the embedded OS instance obje... | [
"def",
"add_embedded_osi",
"(",
"self",
",",
"e_osi",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.add_embedded_osi\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"embedded_osi_2_add",
".",
"append",
"(",
"e_osi",
")",
"e... | add an embedded OS instance to this OS instance.
:param e_osi: the embedded OS instance to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the embedded OS instance object on list to be added on next save().
:return: | [
"add",
"an",
"embedded",
"OS",
"instance",
"to",
"this",
"OS",
"instance",
".",
":",
"param",
"e_osi",
":",
"the",
"embedded",
"OS",
"instance",
"to",
"add",
"on",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2243-L2278 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.del_embedded_osi | def del_embedded_osi(self, e_osi, sync=True):
"""
delete embedded OS instance from this OS instance
:param e_osi: the embedded OS instance to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the embedded OS ins... | python | def del_embedded_osi(self, e_osi, sync=True):
"""
delete embedded OS instance from this OS instance
:param e_osi: the embedded OS instance to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the embedded OS ins... | [
"def",
"del_embedded_osi",
"(",
"self",
",",
"e_osi",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.del_embedded_osi\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"embedded_osi_2_rm",
".",
"append",
"(",
"e_osi",
")",
"el... | delete embedded OS instance from this OS instance
:param e_osi: the embedded OS instance to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the embedded OS instance object on list to be removed on next save().
:return... | [
"delete",
"embedded",
"OS",
"instance",
"from",
"this",
"OS",
"instance",
":",
"param",
"e_osi",
":",
"the",
"embedded",
"OS",
"instance",
"to",
"be",
"deleted",
"from",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2280-L2315 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.add_application | def add_application(self, application, sync=True):
"""
add an application to this OS instance.
:param application: the application to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be... | python | def add_application(self, application, sync=True):
"""
add an application to this OS instance.
:param application: the application to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be... | [
"def",
"add_application",
"(",
"self",
",",
"application",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.add_application\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"application_2_add",
".",
"append",
"(",
"application",
... | add an application to this OS instance.
:param application: the application to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be added on next save().
:return: | [
"add",
"an",
"application",
"to",
"this",
"OS",
"instance",
".",
":",
"param",
"application",
":",
"the",
"application",
"to",
"add",
"on",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize"... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2317-L2351 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.del_application | def del_application(self, application, sync=True):
"""
delete application from this OS instance
:param application: the application to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on ... | python | def del_application(self, application, sync=True):
"""
delete application from this OS instance
:param application: the application to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on ... | [
"def",
"del_application",
"(",
"self",
",",
"application",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.del_application\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"application_2_rm",
".",
"append",
"(",
"application",
"... | delete application from this OS instance
:param application: the application to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be removed on next save().
:return: | [
"delete",
"application",
"from",
"this",
"OS",
"instance",
":",
"param",
"application",
":",
"the",
"application",
"to",
"be",
"deleted",
"from",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchron... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2353-L2387 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.add_environment | def add_environment(self, environment, sync=True):
"""
add an environment to this OS instance.
:param environment: the environment to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the environment object on list to be... | python | def add_environment(self, environment, sync=True):
"""
add an environment to this OS instance.
:param environment: the environment to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the environment object on list to be... | [
"def",
"add_environment",
"(",
"self",
",",
"environment",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.add_environment\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"environment_2_add",
".",
"append",
"(",
"environment",
... | add an environment to this OS instance.
:param environment: the environment to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the environment object on list to be added on next save().
:return: | [
"add",
"an",
"environment",
"to",
"this",
"OS",
"instance",
".",
":",
"param",
"environment",
":",
"the",
"environment",
"to",
"add",
"on",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize"... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2389-L2423 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.del_environment | def del_environment(self, environment, sync=True):
"""
delete environment from this OS instance
:param environment: the environment to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the environment object on ... | python | def del_environment(self, environment, sync=True):
"""
delete environment from this OS instance
:param environment: the environment to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the environment object on ... | [
"def",
"del_environment",
"(",
"self",
",",
"environment",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.del_environment\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"environment_2_rm",
".",
"append",
"(",
"environment",
"... | delete environment from this OS instance
:param environment: the environment to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the environment object on list to be removed on next save().
:return: | [
"delete",
"environment",
"from",
"this",
"OS",
"instance",
":",
"param",
"environment",
":",
"the",
"environment",
"to",
"be",
"deleted",
"from",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchron... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2425-L2459 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.add_team | def add_team(self, team, sync=True):
"""
add a team to this OS instance.
:param team: the team to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the team object on list to be added on next save().
:return:
... | python | def add_team(self, team, sync=True):
"""
add a team to this OS instance.
:param team: the team to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the team object on list to be added on next save().
:return:
... | [
"def",
"add_team",
"(",
"self",
",",
"team",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.add_team\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"team_2_add",
".",
"append",
"(",
"team",
")",
"else",
":",
"if",
"te... | add a team to this OS instance.
:param team: the team to add on this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the team object on list to be added on next save().
:return: | [
"add",
"a",
"team",
"to",
"this",
"OS",
"instance",
".",
":",
"param",
"team",
":",
"the",
"team",
"to",
"add",
"on",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"Ariane"... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2461-L2495 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.del_team | def del_team(self, team, sync=True):
"""
delete team from this OS instance
:param team: the team to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the team object on list to be removed on next save().
... | python | def del_team(self, team, sync=True):
"""
delete team from this OS instance
:param team: the team to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the team object on list to be removed on next save().
... | [
"def",
"del_team",
"(",
"self",
",",
"team",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.del_team\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"team_2_rm",
".",
"append",
"(",
"team",
")",
"else",
":",
"if",
"tea... | delete team from this OS instance
:param team: the team to be deleted from this OS instance
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the team object on list to be removed on next save().
:return: | [
"delete",
"team",
"from",
"this",
"OS",
"instance",
":",
"param",
"team",
":",
"the",
"team",
"to",
"be",
"deleted",
"from",
"this",
"OS",
"instance",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"Ar... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2497-L2531 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSInstance.save | def save(self):
"""
:return: save this OS instance on Ariane server (create or update)
"""
LOGGER.debug("OSInstance.save")
post_payload = {}
consolidated_osi_id = []
consolidated_ipa_id = []
consolidated_nic_id = []
consolidated_app_id = []
... | python | def save(self):
"""
:return: save this OS instance on Ariane server (create or update)
"""
LOGGER.debug("OSInstance.save")
post_payload = {}
consolidated_osi_id = []
consolidated_ipa_id = []
consolidated_nic_id = []
consolidated_app_id = []
... | [
"def",
"save",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSInstance.save\"",
")",
"post_payload",
"=",
"{",
"}",
"consolidated_osi_id",
"=",
"[",
"]",
"consolidated_ipa_id",
"=",
"[",
"]",
"consolidated_nic_id",
"=",
"[",
"]",
"consolidated_app_id... | :return: save this OS instance on Ariane server (create or update) | [
":",
"return",
":",
"save",
"this",
"OS",
"instance",
"on",
"Ariane",
"server",
"(",
"create",
"or",
"update",
")"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2533-L2731 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSTypeService.find_ostype | def find_ostype(ost_id=None, ost_name=None, ost_arch=None):
"""
find the OS type (ost) according ost id (prioritary) or ost name
:param ost_id: the OS type id
:param ost_name: the OS type name
:param ost_arch: the OS type architecture
:return: found OS type or None if not... | python | def find_ostype(ost_id=None, ost_name=None, ost_arch=None):
"""
find the OS type (ost) according ost id (prioritary) or ost name
:param ost_id: the OS type id
:param ost_name: the OS type name
:param ost_arch: the OS type architecture
:return: found OS type or None if not... | [
"def",
"find_ostype",
"(",
"ost_id",
"=",
"None",
",",
"ost_name",
"=",
"None",
",",
"ost_arch",
"=",
"None",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSTypeService.find_ostype\"",
")",
"if",
"(",
"ost_id",
"is",
"None",
"or",
"not",
"ost_id",
")",
"and... | find the OS type (ost) according ost id (prioritary) or ost name
:param ost_id: the OS type id
:param ost_name: the OS type name
:param ost_arch: the OS type architecture
:return: found OS type or None if not found | [
"find",
"the",
"OS",
"type",
"(",
"ost",
")",
"according",
"ost",
"id",
"(",
"prioritary",
")",
"or",
"ost",
"name",
":",
"param",
"ost_id",
":",
"the",
"OS",
"type",
"id",
":",
"param",
"ost_name",
":",
"the",
"OS",
"type",
"name",
":",
"param",
"... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2767-L2810 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSTypeService.get_ostypes | def get_ostypes():
"""
:return: all knows OS types
"""
LOGGER.debug("OSTypeService.get_ostypes")
args = {'http_operation': 'GET', 'operation_path': ''}
response = OSTypeService.requester.call(args)
ret = None
if response.rc == 0:
ret = []
... | python | def get_ostypes():
"""
:return: all knows OS types
"""
LOGGER.debug("OSTypeService.get_ostypes")
args = {'http_operation': 'GET', 'operation_path': ''}
response = OSTypeService.requester.call(args)
ret = None
if response.rc == 0:
ret = []
... | [
"def",
"get_ostypes",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSTypeService.get_ostypes\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"OSTypeService",
".",
"requester",
".",
"call"... | :return: all knows OS types | [
":",
"return",
":",
"all",
"knows",
"OS",
"types"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2813-L2831 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSType.json_2_ostype | def json_2_ostype(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 OS type object
"""
LOGGER.debug("OSType.json_2_ostype")
return OSType(ostid=json_obj['osTypeID'],
... | python | def json_2_ostype(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 OS type object
"""
LOGGER.debug("OSType.json_2_ostype")
return OSType(ostid=json_obj['osTypeID'],
... | [
"def",
"json_2_ostype",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSType.json_2_ostype\"",
")",
"return",
"OSType",
"(",
"ostid",
"=",
"json_obj",
"[",
"'osTypeID'",
"]",
",",
"name",
"=",
"json_obj",
"[",
"'osTypeName'",
"]",
",",
"architec... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 OS type object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"OS",
"type",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2836-L2847 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSType.ostype_2_json | def ostype_2_json(self):
"""
transform ariane_clip3 OS Type object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("OSType.ostype_2_json")
json_obj = {
'osTypeID': self.id,
'osTypeName': self.name,
'osTypeArchitectur... | python | def ostype_2_json(self):
"""
transform ariane_clip3 OS Type object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("OSType.ostype_2_json")
json_obj = {
'osTypeID': self.id,
'osTypeName': self.name,
'osTypeArchitectur... | [
"def",
"ostype_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSType.ostype_2_json\"",
")",
"json_obj",
"=",
"{",
"'osTypeID'",
":",
"self",
".",
"id",
",",
"'osTypeName'",
":",
"self",
".",
"name",
",",
"'osTypeArchitecture'",
":",
"self",
... | transform ariane_clip3 OS Type object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"OS",
"Type",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2849-L2862 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | OSType.sync | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("OSType.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
params... | python | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("OSType.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
params... | [
"def",
"sync",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"OSType.sync\"",
")",
"params",
"=",
"None",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"elif",
"self",
".",
"na... | synchronize self from Ariane server according its id (prioritary) or name
:return: | [
"synchronize",
"self",
"from",
"Ariane",
"server",
"according",
"its",
"id",
"(",
"prioritary",
")",
"or",
"name",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L2864-L2894 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | ApplicationService.find_application | def find_application(app_id=None, app_name=None):
"""
find the application according application id (prioritary) or application name
:param app_id: the application id
:param app_name: the application name
:return: found application or None if not found
"""
LOGGER.... | python | def find_application(app_id=None, app_name=None):
"""
find the application according application id (prioritary) or application name
:param app_id: the application id
:param app_name: the application name
:return: found application or None if not found
"""
LOGGER.... | [
"def",
"find_application",
"(",
"app_id",
"=",
"None",
",",
"app_name",
"=",
"None",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"ApplicationService.find_application\"",
")",
"if",
"(",
"app_id",
"is",
"None",
"or",
"not",
"app_id",
")",
"and",
"(",
"app_name",... | find the application according application id (prioritary) or application name
:param app_id: the application id
:param app_name: the application name
:return: found application or None if not found | [
"find",
"the",
"application",
"according",
"application",
"id",
"(",
"prioritary",
")",
"or",
"application",
"name",
":",
"param",
"app_id",
":",
"the",
"application",
"id",
":",
"param",
"app_name",
":",
"the",
"application",
"name",
":",
"return",
":",
"fo... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3097-L3134 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | ApplicationService.get_applications | def get_applications():
"""
:return: all knows applications
"""
LOGGER.debug("ApplicationService.get_applications")
args = {'http_operation': 'GET', 'operation_path': ''}
response = ApplicationService.requester.call(args)
ret = None
if response.rc == 0:
... | python | def get_applications():
"""
:return: all knows applications
"""
LOGGER.debug("ApplicationService.get_applications")
args = {'http_operation': 'GET', 'operation_path': ''}
response = ApplicationService.requester.call(args)
ret = None
if response.rc == 0:
... | [
"def",
"get_applications",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"ApplicationService.get_applications\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"ApplicationService",
".",
"request... | :return: all knows applications | [
":",
"return",
":",
"all",
"knows",
"applications"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3137-L3154 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Application.json_2_application | def json_2_application(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Application object
"""
LOGGER.debug("Application.json_2_application")
return Application(appid... | python | def json_2_application(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Application object
"""
LOGGER.debug("Application.json_2_application")
return Application(appid... | [
"def",
"json_2_application",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Application.json_2_application\"",
")",
"return",
"Application",
"(",
"appid",
"=",
"json_obj",
"[",
"'applicationID'",
"]",
",",
"name",
"=",
"json_obj",
"[",
"'applicationNam... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Application object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"Application",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3159-L3173 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Application.application_2_json | def application_2_json(self):
"""
transform ariane_clip3 Application object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Application.application_2_json")
json_obj = {
'applicationID': self.id,
'applicationName': self.name,
... | python | def application_2_json(self):
"""
transform ariane_clip3 Application object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Application.application_2_json")
json_obj = {
'applicationID': self.id,
'applicationName': self.name,
... | [
"def",
"application_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Application.application_2_json\"",
")",
"json_obj",
"=",
"{",
"'applicationID'",
":",
"self",
".",
"id",
",",
"'applicationName'",
":",
"self",
".",
"name",
",",
"'applicationDes... | transform ariane_clip3 Application object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"Application",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3175-L3191 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Application.sync | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("Application.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
p... | python | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("Application.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
p... | [
"def",
"sync",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Application.sync\"",
")",
"params",
"=",
"None",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"elif",
"self",
".",
... | synchronize self from Ariane server according its id (prioritary) or name
:return: | [
"synchronize",
"self",
"from",
"Ariane",
"server",
"according",
"its",
"id",
"(",
"prioritary",
")",
"or",
"name",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3193-L3229 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | CompanyService.find_company | def find_company(cmp_id=None, cmp_name=None):
"""
find the company according company id (prioritary) or company name
:param cmp_id: the company id
:param cmp_name: the company name
:return: found company or None if not found
"""
LOGGER.debug("CompanyService.find_c... | python | def find_company(cmp_id=None, cmp_name=None):
"""
find the company according company id (prioritary) or company name
:param cmp_id: the company id
:param cmp_name: the company name
:return: found company or None if not found
"""
LOGGER.debug("CompanyService.find_c... | [
"def",
"find_company",
"(",
"cmp_id",
"=",
"None",
",",
"cmp_name",
"=",
"None",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"CompanyService.find_company\"",
")",
"if",
"(",
"cmp_id",
"is",
"None",
"or",
"not",
"cmp_id",
")",
"and",
"(",
"cmp_name",
"is",
"... | find the company according company id (prioritary) or company name
:param cmp_id: the company id
:param cmp_name: the company name
:return: found company or None if not found | [
"find",
"the",
"company",
"according",
"company",
"id",
"(",
"prioritary",
")",
"or",
"company",
"name",
":",
"param",
"cmp_id",
":",
"the",
"company",
"id",
":",
"param",
"cmp_name",
":",
"the",
"company",
"name",
":",
"return",
":",
"found",
"company",
... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3451-L3487 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | CompanyService.get_companies | def get_companies():
"""
:return: all knows companies
"""
LOGGER.debug("CompanyService.get_companies")
args = {'http_operation': 'GET', 'operation_path': ''}
response = CompanyService.requester.call(args)
ret = None
if response.rc == 0:
ret = [... | python | def get_companies():
"""
:return: all knows companies
"""
LOGGER.debug("CompanyService.get_companies")
args = {'http_operation': 'GET', 'operation_path': ''}
response = CompanyService.requester.call(args)
ret = None
if response.rc == 0:
ret = [... | [
"def",
"get_companies",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"CompanyService.get_companies\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"CompanyService",
".",
"requester",
".",
... | :return: all knows companies | [
":",
"return",
":",
"all",
"knows",
"companies"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3490-L3507 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Company.json_2_company | def json_2_company(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Company object
"""
LOGGER.debug("Company.json_2_company")
return Company(cmpid=json_obj['companyID... | python | def json_2_company(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Company object
"""
LOGGER.debug("Company.json_2_company")
return Company(cmpid=json_obj['companyID... | [
"def",
"json_2_company",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Company.json_2_company\"",
")",
"return",
"Company",
"(",
"cmpid",
"=",
"json_obj",
"[",
"'companyID'",
"]",
",",
"name",
"=",
"json_obj",
"[",
"'companyName'",
"]",
",",
"de... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Company object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"Company",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3512-L3523 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Company.company_2_json | def company_2_json(self):
"""
transform ariane_clip3 company object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Company.company_2_json")
json_obj = {
'companyID': self.id,
'companyName': self.name,
'companyDescr... | python | def company_2_json(self):
"""
transform ariane_clip3 company object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Company.company_2_json")
json_obj = {
'companyID': self.id,
'companyName': self.name,
'companyDescr... | [
"def",
"company_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Company.company_2_json\"",
")",
"json_obj",
"=",
"{",
"'companyID'",
":",
"self",
".",
"id",
",",
"'companyName'",
":",
"self",
".",
"name",
",",
"'companyDescription'",
":",
"se... | transform ariane_clip3 company object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"company",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3525-L3538 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Company.sync | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("Company.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
param... | python | def sync(self):
"""
synchronize self from Ariane server according its id (prioritary) or name
:return:
"""
LOGGER.debug("Company.sync")
params = None
if self.id is not None:
params = {'id': self.id}
elif self.name is not None:
param... | [
"def",
"sync",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Company.sync\"",
")",
"params",
"=",
"None",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"elif",
"self",
".",
"n... | synchronize self from Ariane server according its id (prioritary) or name
:return: | [
"synchronize",
"self",
"from",
"Ariane",
"server",
"according",
"its",
"id",
"(",
"prioritary",
")",
"or",
"name",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3540-L3567 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Company.add_application | def add_application(self, application, sync=True):
"""
add a application to this company.
:param application: the application to add on this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be added on... | python | def add_application(self, application, sync=True):
"""
add a application to this company.
:param application: the application to add on this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be added on... | [
"def",
"add_application",
"(",
"self",
",",
"application",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Company.add_application\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"applications_2_add",
".",
"append",
"(",
"application",
")... | add a application to this company.
:param application: the application to add on this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be added on next save().
:return: | [
"add",
"a",
"application",
"to",
"this",
"company",
".",
":",
"param",
"application",
":",
"the",
"application",
"to",
"add",
"on",
"this",
"company",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"Aria... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3605-L3639 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Company.del_application | def del_application(self, application, sync=True):
"""
delete application from this company
:param application: the subnet to be deleted from this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be re... | python | def del_application(self, application, sync=True):
"""
delete application from this company
:param application: the subnet to be deleted from this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be re... | [
"def",
"del_application",
"(",
"self",
",",
"application",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Company.del_application\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"applications_2_rm",
".",
"append",
"(",
"application",
")"... | delete application from this company
:param application: the subnet to be deleted from this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be removed on next save().
:return: | [
"delete",
"application",
"from",
"this",
"company",
":",
"param",
"application",
":",
"the",
"subnet",
"to",
"be",
"deleted",
"from",
"this",
"company",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"Aria... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3641-L3675 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Company.add_ostype | def add_ostype(self, ostype, sync=True):
"""
add a OS type to this company.
:param ostype: the OS type to add on this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS type object on list to be added on next save().
:retu... | python | def add_ostype(self, ostype, sync=True):
"""
add a OS type to this company.
:param ostype: the OS type to add on this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS type object on list to be added on next save().
:retu... | [
"def",
"add_ostype",
"(",
"self",
",",
"ostype",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Company.add_ostype\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"ost_2_add",
".",
"append",
"(",
"ostype",
")",
"else",
":",
"if",
... | add a OS type to this company.
:param ostype: the OS type to add on this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS type object on list to be added on next save().
:return: | [
"add",
"a",
"OS",
"type",
"to",
"this",
"company",
".",
":",
"param",
"ostype",
":",
"the",
"OS",
"type",
"to",
"add",
"on",
"this",
"company",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"Ariane"... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3677-L3711 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Company.del_ostype | def del_ostype(self, ostype, sync=True):
"""
delete OS type from this company
:param ostype: the OS type to be deleted from this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS type object on list to be removed on next save().
... | python | def del_ostype(self, ostype, sync=True):
"""
delete OS type from this company
:param ostype: the OS type to be deleted from this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS type object on list to be removed on next save().
... | [
"def",
"del_ostype",
"(",
"self",
",",
"ostype",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Company.del_ostype\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"ost_2_rm",
".",
"append",
"(",
"ostype",
")",
"else",
":",
"if",
... | delete OS type from this company
:param ostype: the OS type to be deleted from this company
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the OS type object on list to be removed on next save().
:return: | [
"delete",
"OS",
"type",
"from",
"this",
"company",
":",
"param",
"ostype",
":",
"the",
"OS",
"type",
"to",
"be",
"deleted",
"from",
"this",
"company",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"Ar... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3713-L3747 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Company.save | def save(self):
"""
:return: save this company on Ariane server (create or update)
"""
LOGGER.debug("Company.save")
post_payload = {}
consolidated_app_id = []
consolidated_ost_id = []
if self.id is not None:
post_payload['companyID'] = self.id... | python | def save(self):
"""
:return: save this company on Ariane server (create or update)
"""
LOGGER.debug("Company.save")
post_payload = {}
consolidated_app_id = []
consolidated_ost_id = []
if self.id is not None:
post_payload['companyID'] = self.id... | [
"def",
"save",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Company.save\"",
")",
"post_payload",
"=",
"{",
"}",
"consolidated_app_id",
"=",
"[",
"]",
"consolidated_ost_id",
"=",
"[",
"]",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"p... | :return: save this company on Ariane server (create or update) | [
":",
"return",
":",
"save",
"this",
"company",
"on",
"Ariane",
"server",
"(",
"create",
"or",
"update",
")"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3749-L3822 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | EnvironmentService.find_environment | def find_environment(env_id=None, env_name=None):
"""
find the environment according environment id (prioritary) or environment name
:param env_id: the environment id
:param env_name: the environment name
:return: found environment or None if not found
"""
LOGGER.... | python | def find_environment(env_id=None, env_name=None):
"""
find the environment according environment id (prioritary) or environment name
:param env_id: the environment id
:param env_name: the environment name
:return: found environment or None if not found
"""
LOGGER.... | [
"def",
"find_environment",
"(",
"env_id",
"=",
"None",
",",
"env_name",
"=",
"None",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"EnvironmentService.find_environment\"",
")",
"if",
"(",
"env_id",
"is",
"None",
"or",
"not",
"env_id",
")",
"and",
"(",
"env_name",... | find the environment according environment id (prioritary) or environment name
:param env_id: the environment id
:param env_name: the environment name
:return: found environment or None if not found | [
"find",
"the",
"environment",
"according",
"environment",
"id",
"(",
"prioritary",
")",
"or",
"environment",
"name",
":",
"param",
"env_id",
":",
"the",
"environment",
"id",
":",
"param",
"env_name",
":",
"the",
"environment",
"name",
":",
"return",
":",
"fo... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3858-L3894 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | EnvironmentService.get_environments | def get_environments():
"""
:return: all knows environments
"""
LOGGER.debug("EnvironmentService.get_environments")
args = {'http_operation': 'GET', 'operation_path': ''}
response = EnvironmentService.requester.call(args)
ret = None
if response.rc == 0:
... | python | def get_environments():
"""
:return: all knows environments
"""
LOGGER.debug("EnvironmentService.get_environments")
args = {'http_operation': 'GET', 'operation_path': ''}
response = EnvironmentService.requester.call(args)
ret = None
if response.rc == 0:
... | [
"def",
"get_environments",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"EnvironmentService.get_environments\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"EnvironmentService",
".",
"request... | :return: all knows environments | [
":",
"return",
":",
"all",
"knows",
"environments"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3897-L3914 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Environment.json_2_environment | def json_2_environment(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Environment object
"""
LOGGER.debug("Environment.json_2_environment")
return Environment(envid... | python | def json_2_environment(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Environment object
"""
LOGGER.debug("Environment.json_2_environment")
return Environment(envid... | [
"def",
"json_2_environment",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Environment.json_2_environment\"",
")",
"return",
"Environment",
"(",
"envid",
"=",
"json_obj",
"[",
"'environmentID'",
"]",
",",
"name",
"=",
"json_obj",
"[",
"'environmentNam... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Environment object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"Environment",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3919-L3930 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Environment.environment_2_json | def environment_2_json(self):
"""
transform ariane_clip3 environment object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Environment.environment_2_json")
json_obj = {
'environmentID': self.id,
'environmentName': self.name,
... | python | def environment_2_json(self):
"""
transform ariane_clip3 environment object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Environment.environment_2_json")
json_obj = {
'environmentID': self.id,
'environmentName': self.name,
... | [
"def",
"environment_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Environment.environment_2_json\"",
")",
"json_obj",
"=",
"{",
"'environmentID'",
":",
"self",
".",
"id",
",",
"'environmentName'",
":",
"self",
".",
"name",
",",
"'environmentDes... | transform ariane_clip3 environment object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"environment",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L3932-L3945 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Environment.save | def save(self):
"""
:return: save this environment on Ariane server (create or update)
"""
LOGGER.debug("Environment.save")
post_payload = {}
consolidated_osi_id = []
if self.id is not None:
post_payload['environmentID'] = self.id
if self.nam... | python | def save(self):
"""
:return: save this environment on Ariane server (create or update)
"""
LOGGER.debug("Environment.save")
post_payload = {}
consolidated_osi_id = []
if self.id is not None:
post_payload['environmentID'] = self.id
if self.nam... | [
"def",
"save",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Environment.save\"",
")",
"post_payload",
"=",
"{",
"}",
"consolidated_osi_id",
"=",
"[",
"]",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"post_payload",
"[",
"'environmentID'",
... | :return: save this environment on Ariane server (create or update) | [
":",
"return",
":",
"save",
"this",
"environment",
"on",
"Ariane",
"server",
"(",
"create",
"or",
"update",
")"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L4084-L4137 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Environment.remove | def remove(self):
"""
remove this object from Ariane server
:return:
"""
LOGGER.debug("Environment.remove")
if self.id is None:
return None
else:
params = {
'id': self.id
}
args = {'http_operation': '... | python | def remove(self):
"""
remove this object from Ariane server
:return:
"""
LOGGER.debug("Environment.remove")
if self.id is None:
return None
else:
params = {
'id': self.id
}
args = {'http_operation': '... | [
"def",
"remove",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Environment.remove\"",
")",
"if",
"self",
".",
"id",
"is",
"None",
":",
"return",
"None",
"else",
":",
"params",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
"}",
"args",
"=",
"{"... | remove this object from Ariane server
:return: | [
"remove",
"this",
"object",
"from",
"Ariane",
"server",
":",
"return",
":"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L4139-L4161 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | TeamService.find_team | def find_team(team_id=None, team_name=None):
"""
find the team according team id (prioritary) or team name
:param team_id: the team id
:param team_name: the team name
:return: found team or None if not found
"""
LOGGER.debug("TeamService.find_team")
if (te... | python | def find_team(team_id=None, team_name=None):
"""
find the team according team id (prioritary) or team name
:param team_id: the team id
:param team_name: the team name
:return: found team or None if not found
"""
LOGGER.debug("TeamService.find_team")
if (te... | [
"def",
"find_team",
"(",
"team_id",
"=",
"None",
",",
"team_name",
"=",
"None",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"TeamService.find_team\"",
")",
"if",
"(",
"team_id",
"is",
"None",
"or",
"not",
"team_id",
")",
"and",
"(",
"team_name",
"is",
"None... | find the team according team id (prioritary) or team name
:param team_id: the team id
:param team_name: the team name
:return: found team or None if not found | [
"find",
"the",
"team",
"according",
"team",
"id",
"(",
"prioritary",
")",
"or",
"team",
"name",
":",
"param",
"team_id",
":",
"the",
"team",
"id",
":",
"param",
"team_name",
":",
"the",
"team",
"name",
":",
"return",
":",
"found",
"team",
"or",
"None",... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L4173-L4209 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | TeamService.get_teams | def get_teams():
"""
:return: all knows teams
"""
LOGGER.debug("TeamService.get_teams")
args = {'http_operation': 'GET', 'operation_path': ''}
response = TeamService.requester.call(args)
ret = None
if response.rc == 0:
ret = []
for ... | python | def get_teams():
"""
:return: all knows teams
"""
LOGGER.debug("TeamService.get_teams")
args = {'http_operation': 'GET', 'operation_path': ''}
response = TeamService.requester.call(args)
ret = None
if response.rc == 0:
ret = []
for ... | [
"def",
"get_teams",
"(",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"TeamService.get_teams\"",
")",
"args",
"=",
"{",
"'http_operation'",
":",
"'GET'",
",",
"'operation_path'",
":",
"''",
"}",
"response",
"=",
"TeamService",
".",
"requester",
".",
"call",
"(",... | :return: all knows teams | [
":",
"return",
":",
"all",
"knows",
"teams"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L4212-L4229 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Team.json_2_team | def json_2_team(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Team object
"""
LOGGER.debug("Team.json_2_team")
return Team(teamid=json_obj['teamID'],
... | python | def json_2_team(json_obj):
"""
transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Team object
"""
LOGGER.debug("Team.json_2_team")
return Team(teamid=json_obj['teamID'],
... | [
"def",
"json_2_team",
"(",
"json_obj",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Team.json_2_team\"",
")",
"return",
"Team",
"(",
"teamid",
"=",
"json_obj",
"[",
"'teamID'",
"]",
",",
"name",
"=",
"json_obj",
"[",
"'teamName'",
"]",
",",
"description",
"="... | transform JSON obj coming from Ariane to ariane_clip3 object
:param json_obj: the JSON obj coming from Ariane
:return: ariane_clip3 Team object | [
"transform",
"JSON",
"obj",
"coming",
"from",
"Ariane",
"to",
"ariane_clip3",
"object",
":",
"param",
"json_obj",
":",
"the",
"JSON",
"obj",
"coming",
"from",
"Ariane",
":",
"return",
":",
"ariane_clip3",
"Team",
"object"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L4234-L4246 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Team.team_2_json | def team_2_json(self):
"""
transform ariane_clip3 team object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Team.team_2_json")
json_obj = {
'teamID': self.id,
'teamName': self.name,
'teamDescription': self.descrip... | python | def team_2_json(self):
"""
transform ariane_clip3 team object to Ariane server JSON obj
:return: Ariane JSON obj
"""
LOGGER.debug("Team.team_2_json")
json_obj = {
'teamID': self.id,
'teamName': self.name,
'teamDescription': self.descrip... | [
"def",
"team_2_json",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Team.team_2_json\"",
")",
"json_obj",
"=",
"{",
"'teamID'",
":",
"self",
".",
"id",
",",
"'teamName'",
":",
"self",
".",
"name",
",",
"'teamDescription'",
":",
"self",
".",
"des... | transform ariane_clip3 team object to Ariane server JSON obj
:return: Ariane JSON obj | [
"transform",
"ariane_clip3",
"team",
"object",
"to",
"Ariane",
"server",
"JSON",
"obj",
":",
"return",
":",
"Ariane",
"JSON",
"obj"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L4248-L4262 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Team.add_application | def add_application(self, application, sync=True):
"""
add a application to this team.
:param application: the application to add on this team
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be added on next ... | python | def add_application(self, application, sync=True):
"""
add a application to this team.
:param application: the application to add on this team
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be added on next ... | [
"def",
"add_application",
"(",
"self",
",",
"application",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Team.add_application\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"app_2_add",
".",
"append",
"(",
"application",
")",
"else",... | add a application to this team.
:param application: the application to add on this team
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be added on next save().
:return: | [
"add",
"a",
"application",
"to",
"this",
"team",
".",
":",
"param",
"application",
":",
"the",
"application",
"to",
"add",
"on",
"this",
"team",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"Ariane",
... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L4404-L4438 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Team.del_application | def del_application(self, application, sync=True):
"""
delete application from this team
:param application: the application to be deleted from this team
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be rem... | python | def del_application(self, application, sync=True):
"""
delete application from this team
:param application: the application to be deleted from this team
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be rem... | [
"def",
"del_application",
"(",
"self",
",",
"application",
",",
"sync",
"=",
"True",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Team.del_application\"",
")",
"if",
"not",
"sync",
":",
"self",
".",
"app_2_rm",
".",
"append",
"(",
"application",
")",
"else",
... | delete application from this team
:param application: the application to be deleted from this team
:param sync: If sync=True(default) synchronize with Ariane server. If sync=False,
add the application object on list to be removed on next save().
:return: | [
"delete",
"application",
"from",
"this",
"team",
":",
"param",
"application",
":",
"the",
"application",
"to",
"be",
"deleted",
"from",
"this",
"team",
":",
"param",
"sync",
":",
"If",
"sync",
"=",
"True",
"(",
"default",
")",
"synchronize",
"with",
"Arian... | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L4440-L4474 |
echinopsii/net.echinopsii.ariane.community.cli.python3 | ariane_clip3/directory.py | Team.save | def save(self):
"""
:return: save this team on Ariane server (create or update)
"""
LOGGER.debug("Team.save")
post_payload = {}
consolidated_osi_id = []
consolidated_app_id = []
if self.id is not None:
post_payload['teamID'] = self.id
... | python | def save(self):
"""
:return: save this team on Ariane server (create or update)
"""
LOGGER.debug("Team.save")
post_payload = {}
consolidated_osi_id = []
consolidated_app_id = []
if self.id is not None:
post_payload['teamID'] = self.id
... | [
"def",
"save",
"(",
"self",
")",
":",
"LOGGER",
".",
"debug",
"(",
"\"Team.save\"",
")",
"post_payload",
"=",
"{",
"}",
"consolidated_osi_id",
"=",
"[",
"]",
"consolidated_app_id",
"=",
"[",
"]",
"if",
"self",
".",
"id",
"is",
"not",
"None",
":",
"post... | :return: save this team on Ariane server (create or update) | [
":",
"return",
":",
"save",
"this",
"team",
"on",
"Ariane",
"server",
"(",
"create",
"or",
"update",
")"
] | train | https://github.com/echinopsii/net.echinopsii.ariane.community.cli.python3/blob/0a7feddebf66fee4bef38d64f456d93a7e9fcd68/ariane_clip3/directory.py#L4476-L4552 |
kxgames/vecrec | vecrec/shapes.py | Vector.random | def random(magnitude=1):
""" Create a unit vector pointing in a random direction. """
theta = random.uniform(0, 2 * math.pi)
return magnitude * Vector(math.cos(theta), math.sin(theta)) | python | def random(magnitude=1):
""" Create a unit vector pointing in a random direction. """
theta = random.uniform(0, 2 * math.pi)
return magnitude * Vector(math.cos(theta), math.sin(theta)) | [
"def",
"random",
"(",
"magnitude",
"=",
"1",
")",
":",
"theta",
"=",
"random",
".",
"uniform",
"(",
"0",
",",
"2",
"*",
"math",
".",
"pi",
")",
"return",
"magnitude",
"*",
"Vector",
"(",
"math",
".",
"cos",
"(",
"theta",
")",
",",
"math",
".",
... | Create a unit vector pointing in a random direction. | [
"Create",
"a",
"unit",
"vector",
"pointing",
"in",
"a",
"random",
"direction",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L172-L175 |
kxgames/vecrec | vecrec/shapes.py | Vector.from_rectangle | def from_rectangle(box):
""" Create a vector randomly within the given rectangle. """
x = box.left + box.width * random.uniform(0, 1)
y = box.bottom + box.height * random.uniform(0, 1)
return Vector(x, y) | python | def from_rectangle(box):
""" Create a vector randomly within the given rectangle. """
x = box.left + box.width * random.uniform(0, 1)
y = box.bottom + box.height * random.uniform(0, 1)
return Vector(x, y) | [
"def",
"from_rectangle",
"(",
"box",
")",
":",
"x",
"=",
"box",
".",
"left",
"+",
"box",
".",
"width",
"*",
"random",
".",
"uniform",
"(",
"0",
",",
"1",
")",
"y",
"=",
"box",
".",
"bottom",
"+",
"box",
".",
"height",
"*",
"random",
".",
"unifo... | Create a vector randomly within the given rectangle. | [
"Create",
"a",
"vector",
"randomly",
"within",
"the",
"given",
"rectangle",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L198-L202 |
kxgames/vecrec | vecrec/shapes.py | Vector.interpolate | def interpolate(self, target, extent):
""" Move this vector towards the given towards the target by the given
extent. The extent should be between 0 and 1. """
target = cast_anything_to_vector(target)
self += extent * (target - self) | python | def interpolate(self, target, extent):
""" Move this vector towards the given towards the target by the given
extent. The extent should be between 0 and 1. """
target = cast_anything_to_vector(target)
self += extent * (target - self) | [
"def",
"interpolate",
"(",
"self",
",",
"target",
",",
"extent",
")",
":",
"target",
"=",
"cast_anything_to_vector",
"(",
"target",
")",
"self",
"+=",
"extent",
"*",
"(",
"target",
"-",
"self",
")"
] | Move this vector towards the given towards the target by the given
extent. The extent should be between 0 and 1. | [
"Move",
"this",
"vector",
"towards",
"the",
"given",
"towards",
"the",
"target",
"by",
"the",
"given",
"extent",
".",
"The",
"extent",
"should",
"be",
"between",
"0",
"and",
"1",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L231-L235 |
kxgames/vecrec | vecrec/shapes.py | Vector.project | def project(self, axis):
""" Project this vector onto the given axis. """
projection = self.get_projection(axis)
self.assign(projection) | python | def project(self, axis):
""" Project this vector onto the given axis. """
projection = self.get_projection(axis)
self.assign(projection) | [
"def",
"project",
"(",
"self",
",",
"axis",
")",
":",
"projection",
"=",
"self",
".",
"get_projection",
"(",
"axis",
")",
"self",
".",
"assign",
"(",
"projection",
")"
] | Project this vector onto the given axis. | [
"Project",
"this",
"vector",
"onto",
"the",
"given",
"axis",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L238-L241 |
kxgames/vecrec | vecrec/shapes.py | Vector.dot_product | def dot_product(self, other):
""" Return the dot product of the given vectors. """
return self.x * other.x + self.y * other.y | python | def dot_product(self, other):
""" Return the dot product of the given vectors. """
return self.x * other.x + self.y * other.y | [
"def",
"dot_product",
"(",
"self",
",",
"other",
")",
":",
"return",
"self",
".",
"x",
"*",
"other",
".",
"x",
"+",
"self",
".",
"y",
"*",
"other",
".",
"y"
] | Return the dot product of the given vectors. | [
"Return",
"the",
"dot",
"product",
"of",
"the",
"given",
"vectors",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L244-L246 |
kxgames/vecrec | vecrec/shapes.py | Vector.perp_product | def perp_product(self, other):
""" Return the perp product of the given vectors. The perp product is
just a cross product where the third dimension is taken to be zero and
the result is returned as a scalar. """
return self.x * other.y - self.y * other.x | python | def perp_product(self, other):
""" Return the perp product of the given vectors. The perp product is
just a cross product where the third dimension is taken to be zero and
the result is returned as a scalar. """
return self.x * other.y - self.y * other.x | [
"def",
"perp_product",
"(",
"self",
",",
"other",
")",
":",
"return",
"self",
".",
"x",
"*",
"other",
".",
"y",
"-",
"self",
".",
"y",
"*",
"other",
".",
"x"
] | Return the perp product of the given vectors. The perp product is
just a cross product where the third dimension is taken to be zero and
the result is returned as a scalar. | [
"Return",
"the",
"perp",
"product",
"of",
"the",
"given",
"vectors",
".",
"The",
"perp",
"product",
"is",
"just",
"a",
"cross",
"product",
"where",
"the",
"third",
"dimension",
"is",
"taken",
"to",
"be",
"zero",
"and",
"the",
"result",
"is",
"returned",
... | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L249-L254 |
kxgames/vecrec | vecrec/shapes.py | Vector.rotate | def rotate(self, angle):
""" Rotate the given vector by an angle. Angle measured in radians counter-clockwise. """
x, y = self.tuple
self.x = x * math.cos(angle) - y * math.sin(angle)
self.y = x * math.sin(angle) + y * math.cos(angle) | python | def rotate(self, angle):
""" Rotate the given vector by an angle. Angle measured in radians counter-clockwise. """
x, y = self.tuple
self.x = x * math.cos(angle) - y * math.sin(angle)
self.y = x * math.sin(angle) + y * math.cos(angle) | [
"def",
"rotate",
"(",
"self",
",",
"angle",
")",
":",
"x",
",",
"y",
"=",
"self",
".",
"tuple",
"self",
".",
"x",
"=",
"x",
"*",
"math",
".",
"cos",
"(",
"angle",
")",
"-",
"y",
"*",
"math",
".",
"sin",
"(",
"angle",
")",
"self",
".",
"y",
... | Rotate the given vector by an angle. Angle measured in radians counter-clockwise. | [
"Rotate",
"the",
"given",
"vector",
"by",
"an",
"angle",
".",
"Angle",
"measured",
"in",
"radians",
"counter",
"-",
"clockwise",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L256-L260 |
kxgames/vecrec | vecrec/shapes.py | Vector.round | def round(self, digits=0):
""" Round the elements of the given vector to the given number of digits. """
# Meant as a way to clean up Vector.rotate()
# For example:
# V = Vector(1,0)
# V.rotate(2*pi)
#
# V is now <1.0, -2.4492935982947064e-16>, when it sh... | python | def round(self, digits=0):
""" Round the elements of the given vector to the given number of digits. """
# Meant as a way to clean up Vector.rotate()
# For example:
# V = Vector(1,0)
# V.rotate(2*pi)
#
# V is now <1.0, -2.4492935982947064e-16>, when it sh... | [
"def",
"round",
"(",
"self",
",",
"digits",
"=",
"0",
")",
":",
"# Meant as a way to clean up Vector.rotate()",
"# For example:",
"# V = Vector(1,0)",
"# V.rotate(2*pi)",
"# ",
"# V is now <1.0, -2.4492935982947064e-16>, when it should be ",
"# <1,0>. V.round(15) will corre... | Round the elements of the given vector to the given number of digits. | [
"Round",
"the",
"elements",
"of",
"the",
"given",
"vector",
"to",
"the",
"given",
"number",
"of",
"digits",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L262-L273 |
kxgames/vecrec | vecrec/shapes.py | Vector.get_scaled | def get_scaled(self, magnitude):
""" Return a unit vector parallel to this one. """
result = self.copy()
result.scale(magnitude)
return result | python | def get_scaled(self, magnitude):
""" Return a unit vector parallel to this one. """
result = self.copy()
result.scale(magnitude)
return result | [
"def",
"get_scaled",
"(",
"self",
",",
"magnitude",
")",
":",
"result",
"=",
"self",
".",
"copy",
"(",
")",
"result",
".",
"scale",
"(",
"magnitude",
")",
"return",
"result"
] | Return a unit vector parallel to this one. | [
"Return",
"a",
"unit",
"vector",
"parallel",
"to",
"this",
"one",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L412-L416 |
kxgames/vecrec | vecrec/shapes.py | Vector.get_interpolated | def get_interpolated(self, target, extent):
""" Return a new vector that has been moved towards the given target by
the given extent. The extent should be between 0 and 1. """
result = self.copy()
result.interpolate(target, extent)
return result | python | def get_interpolated(self, target, extent):
""" Return a new vector that has been moved towards the given target by
the given extent. The extent should be between 0 and 1. """
result = self.copy()
result.interpolate(target, extent)
return result | [
"def",
"get_interpolated",
"(",
"self",
",",
"target",
",",
"extent",
")",
":",
"result",
"=",
"self",
".",
"copy",
"(",
")",
"result",
".",
"interpolate",
"(",
"target",
",",
"extent",
")",
"return",
"result"
] | Return a new vector that has been moved towards the given target by
the given extent. The extent should be between 0 and 1. | [
"Return",
"a",
"new",
"vector",
"that",
"has",
"been",
"moved",
"towards",
"the",
"given",
"target",
"by",
"the",
"given",
"extent",
".",
"The",
"extent",
"should",
"be",
"between",
"0",
"and",
"1",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L418-L423 |
kxgames/vecrec | vecrec/shapes.py | Vector.get_projection | def get_projection(self, axis):
""" Return the projection of this vector onto the given axis. The
axis does not need to be normalized. """
scale = axis.dot(self) / axis.dot(axis)
return axis * scale | python | def get_projection(self, axis):
""" Return the projection of this vector onto the given axis. The
axis does not need to be normalized. """
scale = axis.dot(self) / axis.dot(axis)
return axis * scale | [
"def",
"get_projection",
"(",
"self",
",",
"axis",
")",
":",
"scale",
"=",
"axis",
".",
"dot",
"(",
"self",
")",
"/",
"axis",
".",
"dot",
"(",
"axis",
")",
"return",
"axis",
"*",
"scale"
] | Return the projection of this vector onto the given axis. The
axis does not need to be normalized. | [
"Return",
"the",
"projection",
"of",
"this",
"vector",
"onto",
"the",
"given",
"axis",
".",
"The",
"axis",
"does",
"not",
"need",
"to",
"be",
"normalized",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L426-L430 |
kxgames/vecrec | vecrec/shapes.py | Vector.get_components | def get_components(self, other):
""" Break this vector into one vector that is perpendicular to the
given vector and another that is parallel to it. """
tangent = self.get_projection(other)
normal = self - tangent
return normal, tangent | python | def get_components(self, other):
""" Break this vector into one vector that is perpendicular to the
given vector and another that is parallel to it. """
tangent = self.get_projection(other)
normal = self - tangent
return normal, tangent | [
"def",
"get_components",
"(",
"self",
",",
"other",
")",
":",
"tangent",
"=",
"self",
".",
"get_projection",
"(",
"other",
")",
"normal",
"=",
"self",
"-",
"tangent",
"return",
"normal",
",",
"tangent"
] | Break this vector into one vector that is perpendicular to the
given vector and another that is parallel to it. | [
"Break",
"this",
"vector",
"into",
"one",
"vector",
"that",
"is",
"perpendicular",
"to",
"the",
"given",
"vector",
"and",
"another",
"that",
"is",
"parallel",
"to",
"it",
"."
] | train | https://github.com/kxgames/vecrec/blob/18b0841419de21a644b4511e2229af853ed09529/vecrec/shapes.py#L433-L438 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.