Skip to content

Commit

Permalink
Merge 66c450b into b311569
Browse files Browse the repository at this point in the history
  • Loading branch information
congwang09 committed Feb 13, 2024
2 parents b311569 + 66c450b commit 926edd1
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies = [
"pika >= 1.2.0",
"dataset",
"pymongo > 3.0",
"sdx-pce @ git+https://github.com/atlanticwave-sdx/pce@2.0.6.dev2",
"sdx-pce @ git+https://github.com/atlanticwave-sdx/pce@2.0.6.dev3",
]

[project.optional-dependencies]
Expand Down
38 changes: 36 additions & 2 deletions sdx_controller/models/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ class Location(Model):
"""

def __init__(
self, address: str = None, latitude: float = None, longitude: float = None
self,
address: str = None,
latitude: float = None,
longitude: float = None,
iso3166_2_lvl4: str = None,
): # noqa: E501
"""Location - a model defined in Swagger
Expand All @@ -26,17 +30,26 @@ def __init__(
:type latitude: float
:param longitude: The longitude of this Location. # noqa: E501
:type longitude: float
:param iso3166_2_lvl4: The iso3166_2_lvl4 code of this Location. # noqa: E501
:type iso3166_2_lvl4: str
"""
self.swagger_types = {"address": str, "latitude": float, "longitude": float}
self.swagger_types = {
"address": str,
"latitude": float,
"longitude": float,
"iso3166_2_lvl4": str,
}

self.attribute_map = {
"address": "address",
"latitude": "latitude",
"longitude": "longitude",
"iso3166_2_lvl4": "iso3166_2_lvl4",
}
self._address = address
self._latitude = latitude
self._longitude = longitude
self._iso3166_2_lvl4 = iso3166_2_lvl4

@classmethod
def from_dict(cls, dikt) -> "Location":
Expand Down Expand Up @@ -111,3 +124,24 @@ def longitude(self, longitude: float):
"""

self._longitude = longitude

@property
def iso3166_2_lvl4(self) -> str:
"""Gets the iso3166_2_lvl4 of this Location.
:return: The iso3166_2_lvl4 of this Location.
:rtype: str
"""
return self._iso3166_2_lvl4

@iso3166_2_lvl4.setter
def iso3166_2_lvl4(self, iso3166_2_lvl4: str):
"""Sets the iso3166_2_lvl4 of this Location.
:param iso3166_2_lvl4: The iso3166_2_lvl4 of this Location.
:type iso3166_2_lvl4: str
"""

self._iso3166_2_lvl4 = iso3166_2_lvl4
6 changes: 6 additions & 0 deletions sdx_controller/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ components:
address: address
latitude: 0.80082819046101150206595775671303272247314453125
longitude: 6.02745618307040320615897144307382404804229736328125
iso3166_2_lvl4: "US-MIA"
id: id
ports:
- node: urn:sdx:port:amlight.net:Novi06
Expand All @@ -552,6 +553,7 @@ components:
address: address
latitude: 0.80082819046101150206595775671303272247314453125
longitude: 6.02745618307040320615897144307382404804229736328125
iso3166_2_lvl4: "US-MIA"
id: id
ports:
- node: urn:sdx:port:amlight.net:Novi06
Expand Down Expand Up @@ -628,6 +630,7 @@ components:
address: address
latitude: 0.80082819046101150206595775671303272247314453125
longitude: 6.02745618307040320615897144307382404804229736328125
iso3166_2_lvl4: "US-MIA"
id: id
ports:
- node: urn:sdx:port:amlight.net:Novi06
Expand Down Expand Up @@ -748,10 +751,13 @@ components:
type: number
longitude:
type: number
iso3166_2_lvl4:
type: string
example:
address: address
latitude: 0.80082819046101150206595775671303272247314453125
longitude: 6.02745618307040320615897144307382404804229736328125
iso3166_2_lvl4: "US-MIA"
ApiResponse:
type: object
properties:
Expand Down
1 change: 0 additions & 1 deletion sdx_controller/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class BaseTestCase(TestCase):

def create_app(self):
# Do not use the message queue if MQ_HOST is not set. This is
# a useful work-around when we do not want to spin up a
Expand Down

0 comments on commit 926edd1

Please sign in to comment.