usharesoft / hammr

Command-line tool for building consistent and repeatable machine images for multiple cloud platforms
http://hammr.io
Apache License 2.0
28 stars 24 forks source link

template export fails to do "enumeration constraint violated by value Etc/UTC" #447

Closed alefebvr closed 5 years ago

alefebvr commented 5 years ago

Hello,

Using hammr 3.8.6, I have a template where the timezone is Etc/UTC. When I try to export the template, I get:

hammr> template export --id 412
Exporting template with id [412] :
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/hammr/commands/template/template.py", line 109, in do_export
    myAppliance = self.api.Users(self.login).Appliances(doArgs.id).Get()
  File "/usr/lib/python2.7/site-packages/uforge/application.py", line 432, in Get
    return self._REST('/users/' + str(self._get('Uid')) + '/appliances/' + str(self._get('Aid')) + '', 'GET', body, element_name, streamingResponseFile, **kwargs)
  File "/usr/lib/python2.7/site-packages/uforge/application.py", line 120, in _REST
    return _Objects.parseString(resp.content, True)
  File "/usr/lib/python2.7/site-packages/uforge/application.py", line 45, in parseString
    raise exception
SimpleFacetValueError: Type <class 'uforge.objects.uforge.STD_ANON_18'> enumeration constraint violated by value Etc/UTC

Note that changing the time zone to another value fixes the issue. This might be related to issue https://github.com/usharesoft/hammr/issues/411

AliceAlbano commented 5 years ago

Is it possible for you to make a new try with hammr 3.8.7 ? I think this issue has been fixed between 3.8.6 and 3.8.7.

alefebvr commented 5 years ago

Hello @AliceAlbano, Indeed the issue has been fixed in 3.8.7 and after upgrading AppCenter to 3.8.fp7 and using hammr 3.8.7, there is no more issue.