boundary/metric_create_bulk.py
def import_metrics(self):
        """
        1) Get command line arguments
        2) Read the JSON file
        3) Parse into a dictionary
        4) Create or update definitions using API call
        """

        self.v2Metrics = self.metricDefinitionV2(self.metrics)
        if self.v2Metrics:
            metrics = self.metrics

        else:
            metrics = self.metrics['result']

        # Loop through the metrics and call the API
        # to create/update
        for m in metrics:
            if self.v2Metrics:
                metric = metrics[m]
                metric['name'] = m
            else:
                metric = m
            self.create_update(metric)
def import_metrics(self):
        """
        1) Get command line arguments
        2) Read the JSON file
        3) Parse into a dictionary
        4) Create or update definitions using API call
        """

        self.v2Metrics = self.metricDefinitionV2(self.metrics)
        if self.v2Metrics:
            metrics = self.metrics

        else:
            metrics = self.metrics['result']

        # Loop through the metrics and call the API
        # to create/update
        for m in metrics:
            if self.v2Metrics:
                metric = metrics[m]
                metric['name'] = m
            else:
                metric = m
            self.create_update(metric)
1) Get command line arguments
        2) Read the JSON file
        3) Parse into a dictionary
        4) Create or update definitions using API call