Hi Team,

I am trying below code but the moment I run the code I am getting error.

try:
evntsdata = hc.stacks.event.list(stack_name=stack_name)

#evntsdata = hc.stacks.events.list(stack_name)

if evntsdata[-1] == 'UPDATE_IN_PROGRESS':
loopcontinue = True
while loopcontinue:
  evntsdata = (hc.stacks.event.list(stack_name)[0]).split(" ")
  if (evntsdata[-1] == 'UPDATE_COMPLETE'):
loopcontinue = False
print(str(timestamp()) + " " + "Stack Update is Completed!" + ' - ' +
evntsdata[-3] + ' = ' + evntsdata[-1])
  else:
print(str(timestamp()) + " " + "Stack Update in Progress!" + ' - ' +
evntsdata[-3] + ' = ' + evntsdata[-1])
time.sleep(10)
elif error_state == 'No updates are to be performed':
  exit(0)

except AttributeError as e:
  print(str(timestamp()) + " " + "ERROR: Stack Update Failure")
  raise


ERROR: Traceback (most recent call last):
  File
"C:/Users/hekh0517/PycharmProjects/untitled1/testingBotoStackUpdate.py",
line 86, in <module>
    evntsdata = hc.stacks.event.list(stack_name=stack_name)
AttributeError: 'StackManager' object has no attribute 'event'

I dont know why this error occurs
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to