Skip to content

Commit

Permalink
Disable vips
Browse files Browse the repository at this point in the history
  • Loading branch information
matyldv committed Jan 14, 2025
1 parent 8e4f451 commit 624959b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ralph/admin/sitetrees.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def section(section_name, app, model):
section(_('Databases'), 'data_center', 'Database'),
section(_('Disk Shares'), 'data_center', 'DiskShare'),
section(_('Server Rooms'), 'data_center', 'ServerRoom'),
section(_('VIPs'), 'data_center', 'VIP'),
# section(_('VIPs'), 'data_center', 'VIP'),
section(_('Preboots'), 'deployment', 'Preboot'),
section(
_('Preboot configuration'), 'deployment',
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/api/tests/test_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class APIBrowsableClient(APIClient):
"transitions-job": "/api/transitions-job/",
"transitions-model": "/api/transitions-model/",
"users": "/api/users/",
"vips": "/api/vips/",
# "vips": "/api/vips/",
"virtual-server-types": "/api/virtual-server-types/",
"virtual-servers": "/api/virtual-servers/",
"vulnerabilities": "/api/vulnerabilities/",
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/assets/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_service_base_objects_queryset(self):
service_env__service=self.object
).select_related(
'service_env__environment', 'content_type', 'securityscan'
)
).exclude(content_type__model='vip')

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/assets/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def test_patch_asset_model(self):
ServiceEnvironment: ServiceEnvironmentFactory,
SSLCertificate: SSLCertificatesFactory,
Support: SupportFactory,
VIP: VIPFactory,
# VIP: VIPFactory,
VirtualServer: VirtualServerFactory,
Cluster: ClusterFactory,
ConfigurationClass: ConfigurationClassFactory,
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/data_center/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ class DatabaseAdmin(RalphAdmin):
pass


@register(VIP)
# @register(VIP)
class VIPAdmin(RalphAdmin):
search_fields = ['name', 'ip__address']
list_display = ['name', 'ip', 'port', 'protocol', 'service_env']
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/data_center/api/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
router.register(r'racks', RackViewSet)
router.register(r'rack-accessories', RackAccessoryViewSet)
router.register(r'server-rooms', ServerRoomViewSet)
router.register(r'vips', VIPViewSet)
# router.register(r'vips', VIPViewSet)
router.register(r'clusters', ClusterViewSet)
router.register(r'cluster-types', ClusterTypeViewSet)
router.register(r'base-object-clusters', BaseObjectClusterViewSet)
Expand Down
2 changes: 2 additions & 0 deletions src/ralph/lib/polymorphic/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ def __new__(cls, name, bases, attrs):
if new_class._meta.proxy:
continue
try:
if new_class._meta.model_name == 'vip':
continue
polymorphic_class._polymorphic_descendants.append(new_class)
except AttributeError:
# The exception is for class Polymorphic
Expand Down

0 comments on commit 624959b

Please sign in to comment.