-
-
Notifications
You must be signed in to change notification settings - Fork 226
[feature] Estimated location creation #1067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gsoc25-whois
Are you sure you want to change the base?
Conversation
6643b32
to
73c3b0a
Compare
73c3b0a
to
44fa3e9
Compare
""" | ||
|
||
# Check cheap conditions first before hitting the database | ||
if not self.is_valid_public_ip_address(new_ip): | ||
return False | ||
return False, False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that we should not club this logic here. Although you added the comment, but still name of the function doesn't explain why we are returning two booleans. Can't we create one more function to check if WHOIS info exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These checks are dependent on each other. We need to trigger the task when WHOIS already exists for an IP. I will still look into this to find another approach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we should not change the return type for this function.
transaction.on_commit( | ||
lambda: fetch_whois_details.delay( | ||
device_pk=self.device.pk, | ||
initial_ip_address=self.device._initial_last_ip, | ||
new_ip_address=self.device.last_ip, | ||
) | ||
) | ||
elif whois_info_exists and self.is_whois_enabled: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WHOIS information should exist only when WHOIS is enabled. Do you mean that if WHOIS is disabled after checksum occurs and WHOIS info is added in DB? What are the consequences if we show fuzzy location for that last_ip only whether WHOIS is enabled or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think we are deleting existing WHOIS information if WHOIS is disabled for an organization as for some org it may be enabled, we are just not adding that information for that org's device admin and api endpoints.
This check above is to tackle the early fallback when the above condition for fetch_whois_details
fail as WHOIS already exists. The task manage_fuzzy_locations
in that case will attach the location of an already existing device having same ip to current device. I have defined this behavior in the task's docstring
Also IMO there should not be a problem if fuzzy locations exist irrespective of WHOIS is enabled or not as it just informs the approximate nature of the location. But still if we need to make any changes to fuzzy locations based on WHOIS enabled or not please let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we put fuzzy location creation behind a flag? I’m asking because I’m not sure every organization with WHOIS enabled will need it.
|
||
|
||
@shared_task | ||
def manage_fuzzy_locations( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you simplify this function? It looks like it has too many conditional statements. Also, why aren’t we leveraging the service layer here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try to make this function more simpler.
Apologies but I am not sure how should i use the service layer here. Also, service file imports this file so we will encounter circular imports if using service here as well
""" | ||
|
||
# Check cheap conditions first before hitting the database | ||
if not self.is_valid_public_ip_address(new_ip): | ||
return False | ||
return False, False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we should not change the return type for this function.
current_location = device_location.location | ||
if add_existing and (not current_location or current_location.is_approximate): | ||
existing_device_location = ( | ||
Device.objects.select_related("devicelocation") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we filter to the current organization’s devices first, rather than checking every device?
We might have to change some things based on how this feature is expected to work. For instance, do we want this to be a complete separate feature than WHOIS lookup (which will require more changes) or a feature which can be enabled/disabled only if WHOIS is enabled. Update: There is also a case which is not handled:
In that case we might need to perform WHOIS lookup again which might be a bit costly as per rate limiting of 1000 requests per day. We can change the WHOIS model to store latitude and longitude information as well to ensure we need not perform a lookup again. Let me know your thoughts! |
41e0b55
to
3ffae10
Compare
563bb4a
to
f19ac51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check the logic for manage_fuzzy_locations
once again along with tests. Rest looks good. Have some minor suggestions
# we are only checking for 2 of the above conditions of `_need_whois_lookup` | ||
# as we need to ensure that the fuzzy locations are managed only if there is | ||
# existing WHOIS record |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment looks confusing to me, we are managing fuzzy locations in fetch_whois_details
task also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the comment for better clarity
- If attaching existing location and current device has no location then the | ||
existing location is attached to the current device as well. | ||
- If attaching existing location and current device already has location, then | ||
current device's location is deleted and set same as existing device's location. | ||
- If not attaching existing then new location is created if no location exists for | ||
current device, or existing one is updated if it is approximate(fuzzy). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, we can re-write this comment to something more readable like
- If attaching existing location and current device has no location then the | |
existing location is attached to the current device as well. | |
- If attaching existing location and current device already has location, then | |
current device's location is deleted and set same as existing device's location. | |
- If not attaching existing then new location is created if no location exists for | |
current device, or existing one is updated if it is approximate(fuzzy). | |
- If current device already has a location previously, then it is deleted. | |
- If existing location is not attached, then a new location is created if no location exists for | |
current device, or existing one is updated if it is approximate(fuzzy). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Based on the suggestions I have modified the doc string
if not self.is_valid_public_ip_address(new_ip): | ||
return False | ||
|
||
if not self.is_whois_enabled: | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think based on our discussion we have decided to do cheap checks first. is_valid_public_ip_address
will require an API call and should be done after checking if whois is enabled or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Kapil, is_valid_public_ip_address
checks if ip address is public or not locally in memory without calling any API hence, it is kept first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are importing ip_address in first line as well as using some variables with same name. Can we have a clear distinction between the two?
We can write the import line as
from ipaddress import ip_address as something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I am in favour of renaming the ip_address
variable in get_device_whois_info
method. I didn't found any other occurence for this.
Creates/updates fuzzy location for a device based on the latitude and longitude | ||
or attaches an existing location if `add_existing` is True. | ||
Existing location here means a location of another device whose last_ip matches | ||
the given ip_address. | ||
When `add_existing` is True: | ||
- If the current device has no location, attach the existing one; if it does, | ||
update it with the existing one only if it is approximate (fuzzy). | ||
When `add_existing` is False: | ||
- A new location is created if no location exists for current device, or | ||
existing one is updated using coords from WHOIS record if it is approximate(fuzzy). | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 much better
migrations.AddField( | ||
model_name="whoisinfo", | ||
name="latitude", | ||
field=models.FloatField(blank=True, help_text="Latitude", null=True), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we any validation checks in the code to ensure that latitude and longitude values are correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I will think of some tests for these as well
mocked_task.assert_not_called() | ||
mocked_task.reset_mock() | ||
|
||
with self.subTest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add one more check if it is not there, task not called via DeviceChecksumView when WHOIS is disabled
9837a7f
to
fde52b0
Compare
docs/user/approximate-location.rst
Outdated
The **Approximate Location** feature is **disabled by default**. | ||
|
||
Before enabling it, the :doc:`WHOIS Lookup feature <whois>` must be | ||
enabled and then set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enabled and then set | |
enabled. Then set |
docs/user/approximate-location.rst
Outdated
If **a matching location already exists** for another device with the same | ||
IP, the system will **attach that location** to the current device if: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rewrite this, something like
If **a matching location already exists** for another device with the same | |
IP, the system will **attach that location** to the current device if: | |
The system will **attach the already existing matching location** of another device with same ip to the current device if **a matching location if |
docs/user/approximate-location.rst
Outdated
If **a matching location already exists** for another device with the same | ||
IP, the system will **attach that location** to the current device if: | ||
|
||
- Only one device is found with that IP and it has a location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if more than one device has same ip?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are more than once devices having the same ip and location then notification will be sent to use as in that case we are not use which device's location to use. Will add this in docs as well
docs/user/approximate-location.rst
Outdated
- The current device **has no location** or if it does then the location | ||
is **approximate**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The current device **has no location** or if it does then the location | |
is **approximate**. | |
- The current device **has no location** or that location | |
is **approximate**. |
docs/user/approximate-location.rst
Outdated
If there is **no matching location**, a new approximate location is | ||
created or the existing one is updated using coordinates from the WHOIS | ||
record, but only if the existing location is approximate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is **no matching location**, a new approximate location is | |
created or the existing one is updated using coordinates from the WHOIS | |
record, but only if the existing location is approximate. | |
If there is **no matching location** and existing location is approximate (if exists), a new approximate location is | |
created or the existing one is updated using coordinates from the WHOIS record. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this as when there is no matching location then it will either create an approximate location else update the existing location only if the existing one is already approximate.
The suggested statement sounds a bit misleading.
coords = Point(whois_obj.longitude, whois_obj.latitude, srid=4326) | ||
address = whois_obj.formatted_address | ||
location_name = ( | ||
",".join(address.split(",")[:2]) + f" (Estimated: {ip_address})" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be similar with below name
",".join(address.split(",")[:2]) + f" (Estimated: {ip_address})" | |
",".join(address.split(",")[:2]) + f" (Estimated Location: {ip_address})" |
|
||
with self.subTest( | ||
"Test Approximate Location field visible on admin when " | ||
"WHOIS_CONFIGURED True" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"WHOIS_CONFIGURED True" | |
"WHOIS_CONFIGURED is True" |
importlib.reload(config_app_settings) | ||
with self.subTest( | ||
"Test Approximate Location field hidden on admin when " | ||
"WHOIS_CONFIGURED False" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"WHOIS_CONFIGURED False" | |
"WHOIS_CONFIGURED is False" |
with self.subTest( | ||
"Approximate location task called when last_ip has related WhoIsInfo" | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure on this but if there is only one sub test, should we create sub tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other subtests called as well in statement above it
openwisp-controller/openwisp_controller/geo/approximate_location/test_approximate_location.py
Line 121 in fde52b0
self._task_called( |
2d063af
to
fbd5bb7
Compare
@@ -51,6 +52,18 @@ class AbstractWHOISInfo(TimeStampedEditableModel): | |||
blank=True, | |||
help_text=_("CIDR"), | |||
) | |||
latitude = models.FloatField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use PointField
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can, I was also think of doing this as these are used for coordinates only
if not self.is_valid_public_ip_address(new_ip): | ||
return False | ||
|
||
if not self.is_whois_enabled: | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I am in favour of renaming the ip_address
variable in get_device_whois_info
method. I didn't found any other occurence for this.
@@ -220,8 +220,41 @@ def test_whois_model_fields_validation(self): | |||
with self.assertRaises(ValidationError): | |||
self._create_whois_info(asn="InvalidASN") | |||
|
|||
# Common validation checks for latitude and longitude | |||
latitudes = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about jus this?
cases = [
("latitude", 100.0, "Ensure this value is less than or equal to 90.0."),
("latitude", -100.0, "Ensure this value is greater than or equal to -90.0."),
("longitude", 200.0, "Ensure this value is less than or equal to 180.0."),
("longitude", -200.0, "Ensure this value is greater than or equal to -180.0."),
]
for field, value, expected_msg in cases:
with self.subTest(field=field, value=value):
with self.assertRaises(ValidationError) as cm:
kwargs = {field: value}
self._create_whois_info(**kwargs)
self.assertEqual(cm.exception.message_dict[field][0], expected_msg)
@@ -1,3 +1,8 @@ | |||
from unittest import mock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s ensure we always keep test utilities separate from those used in functional code.
logger.info( | ||
f"Estimated location saved successfully for {device_pk} for IP: {ip_address}" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if whois_obj
doesn't exist, then it will log that as success which is incorrect. we should handle such cases as well.
coords = Point(whois_obj.longitude, whois_obj.latitude, srid=4326) | ||
address = whois_obj.formatted_address | ||
location_name = ( | ||
",".join(address.split(",")[:2]) + f" (Estimated Location: {ip_address})" | ||
if address | ||
else f"Estimated Location: {ip_address}" | ||
) | ||
# Used to update an existing location if it is estimated | ||
# or create a new one if it doesn't exist | ||
location_defaults = { | ||
"name": location_name, | ||
"type": "outdoor", | ||
"organization_id": device.organization_id, | ||
"is_mobile": False, | ||
"geometry": coords, | ||
"address": address, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's define this as part of whois model class itself, so that it can be reused via model and have less dependency on this task.
if add_existing and (not current_location or current_location.is_estimated): | ||
existing_devices_location = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be separated into a new function called: handle_attach_existing
# If there are multiple devices with same last_ip then we need to inform | ||
# the user to resolve the conflict manually. | ||
if existing_devices_location.count() > 1: | ||
send_whois_task_notification( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here logging an error will be better about multiple devices found
if current_location and current_location.pk != existing_location.pk: | ||
current_location.delete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when we will get this case, can you explain a scenario to test it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added due to an Issue I was facing while writing tests, which is now resolved. I will update this as i think there might be some changes in this.
location = Location(**location_defaults, is_estimated=True) | ||
location.full_clean() | ||
location.save() | ||
device_location.location = location | ||
device_location.full_clean() | ||
device_location.save() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should use transaction.atomic
here
@@ -51,6 +52,24 @@ class AbstractWHOISInfo(TimeStampedEditableModel): | |||
blank=True, | |||
help_text=_("CIDR"), | |||
) | |||
# latitude = models.FloatField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this code is commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, might have been left during last changes. Will remove this
b82ff48
to
641a3d9
Compare
new_ip_address=new_ip, | ||
) | ||
) | ||
# `add_existing` is `True` to handle the case when WHOIS already exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment still relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not, removing this
def is_estimated_location_enabled(self): | ||
""" | ||
Check if the Estimated location feature is enabled. | ||
This does not require to set cache as `is_whois_enabled` already sets it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a test case for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update the existing test case which asserts cache.get
to assert .set
is not called as well
docs/user/whois.rst
Outdated
triggering the WHOIS lookup automatically. | ||
|
||
It accepts an optional flag ``--whois-related`` to exclude devices with | ||
WHOIS records. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the default, I don't think we need the flag.
docs/user/whois.rst
Outdated
@@ -45,6 +45,17 @@ met: | |||
- There is **no existing WHOIS record** for that IP. | |||
- WHOIS lookup is **enabled** for the device's organization. | |||
|
|||
Handling Existing Devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding this section here, add it at the bottom of the setup instructions and provide a copy/paste example that includes enabling the virtualenv (for users using ansible-openwisp2).
Point 6 should be to restart the application if using ansible-openwisp2, while docker containers should just be respawned.
Point 7 should be to use the management command.
devices = Device.objects.filter(_is_deactivated=False).exclude(last_ip=None) | ||
devices = devices.only("last_ip") | ||
if options["whois_related"]: | ||
if not app_settings.WHOIS_CONFIGURED: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check should be at the beginning of the command.
2dad1f0
to
48d0036
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature is looking great. I did end-to-end testing. Please take a look at my comments below:
if address: | ||
parts = [part.strip() for part in address.split(",")[:2] if part.strip()] | ||
location = ", ".join(parts) | ||
return f"{location} (Estimated Location: {self.ip_address})" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we keep Estimated Location
translatable?
def process_ip_data_and_location(self): | ||
""" | ||
Trigger WHOIS lookup based on the conditions of `_need_whois_lookup`. | ||
Task is triggered on commit to ensure redundant data is not created. | ||
Trigger WHOIS lookup based on the conditions of `_need_whois_lookup` | ||
and also manage estimated locations based on the conditions of | ||
`_need_estimated_location_management`. | ||
Tasks are triggered on commit to ensure redundant data is not created. | ||
""" | ||
if self._need_whois_lookup(self.device.last_ip): | ||
new_ip = self.device.last_ip | ||
if self._need_whois_lookup(new_ip): | ||
transaction.on_commit( | ||
lambda: fetch_whois_details.delay( | ||
device_pk=self.device.pk, | ||
initial_ip_address=self.device._initial_last_ip, | ||
new_ip_address=self.device.last_ip, | ||
new_ip_address=new_ip, | ||
) | ||
) | ||
# To handle the case when WHOIS already exists as in that case | ||
# WHOIS lookup is not triggered but we still need to | ||
# manage estimated locations. | ||
elif self._need_estimated_location_management(new_ip): | ||
transaction.on_commit( | ||
lambda: manage_estimated_locations.delay( | ||
device_pk=self.device.pk, ip_address=new_ip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
manage_estimated_locations
keeps firing repeatedly, even when an estimated location already exists and the device’s IP hasn’t changed. can we ignore this task if ip and location is not changed?
Another thing which i found is delete handler is not working properly as shown in the demo below.

video: https://drive.google.com/file/d/1HbgtsxukFQbIPQuqlObTIqS7fLu6NiTh/view?usp=sharing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first issue is fixed, had to remove the function from DeviceChecksumView.
I cannot replicate the second one as the record is getting deleted on device deletion
WHOIS_Deleted.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then it might be issue with my system, @devkapilbansal can you please also verify this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also a test for deletion of record on device delete, can you please check if that is failing as well?
Edit: last subtest of test_whois_creation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will check this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codesankalp @DragnEmperor How can we test the scenario where multiple devices have same last_ip? Any way to do it without router or VM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually follow these steps:
- Create 2 or more devices from admin
- Use ngrok tunnel for creating a global link for the local server
- Open either https://www.proxysite.com/ or https://proxyium.com/ and pass the url to checksum for the device. Selecting the same server will register same IP for the devices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last time while using using proxium, I believe the IPs were different for same server as well. Will try it once again or with proxysite
if not app_settings.WHOIS_CONFIGURED: | ||
self.stdout.write("WHOIS must be configured to use this option.") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we don't need this check, this management command is separate and doesn't need who is to be configured.
7e941ae
to
5c93b19
Compare
a9c5fbc
to
bc837a1
Compare
d10ef51
to
0a1c1cc
Compare
0a1c1cc
to
2c1dda6
Compare
Checklist
Reference to Existing Issue
Closes #1034.
Description of Changes
Fuzzy locations task is added to allow creation of such locations when WhoIs is created for the same device. Also the task should attach the device to an existing location if already WhoIs is available for that device.
Scenarios for estimated locations:
In case A has a location which is estimated then it should be deleted before attaching an already existing location.