-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ng' of github.com:allegro/ralph into django-2.1
- Loading branch information
Showing
7 changed files
with
79 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
ralph (20241125.1) bionic; urgency=medium | ||
|
||
* Fix debian package (#3870) | ||
|
||
-- Olga Matyla <[email protected]> Mon, 25 Nov 2024 10:48:43 +0000 | ||
|
||
ralph (20241122.1) bionic; urgency=medium | ||
|
||
[ Paweł Szulc ] | ||
* Add hypervisor fields to dc-hosts Cloud Host response | ||
* Add select related to limit queries | ||
|
||
[ Olga Matyla ] | ||
* Fix Service environment inline (#3868) | ||
|
||
-- Paweł Szulc <[email protected]> Fri, 22 Nov 2024 11:45:41 +0000 | ||
|
||
ralph (20241118.1) bionic; urgency=medium | ||
|
||
[ Olga Matyla ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,8 @@ RUN apt-get update && \ | |
git config --global user.name "$GIT_USER_NAME" && \ | ||
git config --global user.email "$GIT_USER_EMAIL" | ||
|
||
RUN npm install -g [email protected] | ||
|
||
COPY . $RALPH_DIR | ||
|
||
WORKDIR $RALPH_DIR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
from rest_framework import fields, serializers | ||
|
||
from ralph.assets.api.serializers import ( | ||
BaseObjectSerializer, | ||
ComponentSerializerMixin, | ||
SecurityScanField | ||
) | ||
from ralph.assets.models import BaseObject | ||
from ralph.data_center.api.serializers import DataCenterAssetSimpleSerializer | ||
from ralph.data_center.models import DCHost | ||
|
||
|
||
class DCHostSerializer(ComponentSerializerMixin, BaseObjectSerializer): | ||
hostname = fields.CharField() | ||
securityscan = SecurityScanField() | ||
hypervisor = DataCenterAssetSimpleSerializer(required=False) | ||
|
||
class Meta: | ||
model = DCHost | ||
fields = [ | ||
'id', | ||
'url', | ||
'ethernet', | ||
'ipaddresses', | ||
'custom_fields', | ||
'tags', | ||
'securityscan', | ||
'object_type', | ||
'__str__', | ||
'service_env', 'configuration_path', | ||
'hostname', | ||
'created', 'modified', 'remarks', 'parent', | ||
'configuration_variables', 'hypervisor' | ||
] | ||
|
||
|
||
class DCHostPhysicalSerializer(DCHostSerializer): | ||
model = serializers.SerializerMethodField() | ||
|
||
class Meta: | ||
model = BaseObject | ||
fields = DCHostSerializer.Meta.fields + ['model'] | ||
|
||
def get_model(self, obj): | ||
try: | ||
return str(obj.model) | ||
except AttributeError: | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters