code: def resize(self, flavor):
          
          # We need the flavorRef, not the flavor or size.
          flavorRef = self.manager.api._get_flavor_ref(flavor)
          body = {"flavorRef": flavorRef}
          self.manager.action(self, "resize", body=body)
docs: Set the size of this instance to a different flavor.