def run(self):
     # GcpRequest handles unicode text handling
     if GcpRequest({'status': self.current_status}) == GcpRequest({'status': self.desired_status}):
         return
     elif self.desired_status == 'PAUSED':
         self.stop()
     elif self.desired_status == 'RUNNING':
         self.start()
def is_different(module, response):
    request = resource_to_request(module)
    response = response_to_hash(module, response)

    # Remove all output-only from response.
    response_vals = {}
    for k, v in response.items():
        if k in request:
            response_vals[k] = v

    request_vals = {}
    for k, v in request.items():
        if k in response:
            request_vals[k] = v

    return GcpRequest(request_vals) != GcpRequest(response_vals)