def parse_response(xml_bytes):
     doc = xml_parse(xml_bytes)
     ret = xml_find(doc, u'return').text.strip()
     if ret == 'true':
         return instance
     else:
         raise AssertionError("could not set tags for %r" % (instance_id,))
Esempio n. 2
0
 def parse_response(xml_bytes):
     doc = xml_parse(xml_bytes)
     ret = xml_find(doc, u'return').text.strip()
     if ret == 'true':
         return instance
     else:
         raise AssertionError("could not set tags for %r" % (instance_id,))
    def parse(cls, body):
        doc = xml_parse(body)
        node = xml_find(doc, u'ActivateDesktopProductResult')
        access_key_id = xml_find(node, u'AWSAccessKeyId').text.strip()
        secret_key = xml_find(node, u'SecretAccessKey').text.strip()
        usertoken = xml_find(node, u'UserToken').text.strip()

        return cls(access_key_id, secret_key, usertoken)
 def parse(cls, body):
     doc = xml_parse(body)
     node = xml_find(doc, u'VerifyProductSubscriptionByTokensResult')
     subscribed = xml_find(node, u'Subscribed').text.strip()
     return subscribed == "true"