diff --git a/Changelog b/Changelog index 6c48e4b5..95dace16 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,9 @@ +Next: + * #5308: [ipv6only] Fix - when creating a VM, the name begins with v6only + * #5293: Use `terminate-hard` action instead of `terminate` in the opennebula call to terminate a vm 2.0.3: 2018-07-18 * Remove unused /comic url (PR #644) - * 5126: Allow dynamicweb sites to be iframed on other by setting `X_FRAME_OPTIONS_ALLOW_FROM_URI` (PR #645) + * #5126: Allow dynamicweb sites to be iframed on other by setting `X_FRAME_OPTIONS_ALLOW_FROM_URI` (PR #645) 2.0.2: 2018-07-14 * bugfix: [blog] Add missing content block in the blog_ungleich.html template file 2.0.1: 2018-07-14 diff --git a/opennebula_api/models.py b/opennebula_api/models.py index 29632009..3682c5da 100644 --- a/opennebula_api/models.py +++ b/opennebula_api/models.py @@ -315,7 +315,7 @@ class OpenNebulaManager(): return vm_id def delete_vm(self, vm_id): - TERMINATE_ACTION = 'terminate' + TERMINATE_ACTION = 'terminate-hard' vm_terminated = False try: self.oneadmin_client.call( diff --git a/opennebula_api/serializers.py b/opennebula_api/serializers.py index 79f37ecd..f63f2eb0 100644 --- a/opennebula_api/serializers.py +++ b/opennebula_api/serializers.py @@ -162,7 +162,10 @@ class VirtualMachineSerializer(serializers.Serializer): return '-' def get_name(self, obj): - return obj.name.lstrip('public-') + if obj.name.startswith('public-'): + return obj.name.lstrip('public-') + else: + return obj.name class VMTemplateSerializer(serializers.Serializer):