Handle receptorctl advertisements for hop nodes

counting it towards their heartbeat.  Also, leave off the link to the
health check endpoint from hop node Instances.
This commit is contained in:
Jeff Bradberry
2022-01-24 15:39:54 -05:00
parent 56f8f8d3f4
commit 334c33ca07
3 changed files with 12 additions and 9 deletions

View File

@@ -4833,7 +4833,8 @@ class InstanceSerializer(BaseSerializer):
res['jobs'] = self.reverse('api:instance_unified_jobs_list', kwargs={'pk': obj.pk})
res['instance_groups'] = self.reverse('api:instance_instance_groups_list', kwargs={'pk': obj.pk})
if self.context['request'].user.is_superuser or self.context['request'].user.is_system_auditor:
res['health_check'] = self.reverse('api:instance_health_check', kwargs={'pk': obj.pk})
if obj.node_type != 'hop':
res['health_check'] = self.reverse('api:instance_health_check', kwargs={'pk': obj.pk})
return res
def get_consumed_capacity(self, obj):