def get_metric_values_response(self):
        """
        Get the faked metrics, for all metric groups and all resources that
        have been prepared on the manager object of this context object, as a
        string in the format needed for the "Get Metrics" operation response.

        Returns:

          "MetricsResponse" string as described for the "Get Metrics"
            operation response.
        """
        mv_list = self.get_metric_values()
        resp_lines = []
        for mv in mv_list:
            group_name = mv[0]
            resp_lines.append('"{}"'.format(group_name))
            mo_vals = mv[1]
            for mo_val in mo_vals:
                resp_lines.append('"{}"'.format(mo_val.resource_uri))
                resp_lines.append(
                    str(timestamp_from_datetime(mo_val.timestamp)))
                v_list = []
                for n, v in mo_val.values:
                    if isinstance(v, six.string_types):
                        v_str = '"{}"'.format(v)
                    else:
                        v_str = str(v)
                    v_list.append(v_str)
                v_line = ','.join(v_list)
                resp_lines.append(v_line)
                resp_lines.append('')
            resp_lines.append('')
        resp_lines.append('')
        return '\n'.join(resp_lines) + '\n'
def get_metric_values_response ( self ) : mv_list = self . get_metric_values ( ) resp_lines = [ ] for mv in mv_list : group_name = mv [ 0 ] resp_lines . append ( '"{}"' . format ( group_name ) ) mo_vals = mv [ 1 ] for mo_val in mo_vals : resp_lines . append ( '"{}"' . format ( mo_val . resource_uri ) ) resp_lines . append ( str ( timestamp_from_datetime ( mo_val . timestamp ) ) ) v_list = [ ] for n , v in mo_val . values : if isinstance ( v , six . string_types ) : v_str = '"{}"' . format ( v ) else : v_str = str ( v ) v_list . append ( v_str ) v_line = ',' . join ( v_list ) resp_lines . append ( v_line ) resp_lines . append ( '' ) resp_lines . append ( '' ) resp_lines . append ( '' ) return '\n' . join ( resp_lines ) + '\n'
Get the faked metrics, for all metric groups and all resources that
        have been prepared on the manager object of this context object, as a
        string in the format needed for the "Get Metrics" operation response.

        Returns:

          "MetricsResponse" string as described for the "Get Metrics"
            operation response.