boundary/event_create.py
def get_arguments(self):
        """
        Extracts the specific arguments of this CLI
        """
        ApiCli.get_arguments(self)

        if self.args.tenant_id is not None:
            self._tenant_id = self.args.tenant_id

        if self.args.fingerprint_fields is not None:
            self._fingerprint_fields = self.args.fingerprint_fields

        if self.args.title is not None:
            self._title = self.args.title

        if self.args.source is not None:
            self._source = self.args.source

        if self.args.severity is not None:
            self._severity = self.args.severity

        if self.args.message is not None:
            self._message = self.args.message

        event = {}

        if self._title is not None:
            event['title'] = self._title

        if self._severity is not None:
            event['severity'] = self._severity

        if self._message is not None:
            event['message'] = self._message

        if self._source is not None:
            if 'source' not in event:
                event['source'] = {}
            if len(self._source) >= 1:
                event['source']['ref'] = self._source[0]
            if len(self._source) >= 2:
                event['source']['type'] = self._source[1]

        self._process_properties(self.args.properties)
        if self._properties is not None:
            event['properties'] = self._properties

        if self._fingerprint_fields is not None:
            event['fingerprintFields'] = self._fingerprint_fields

        self.data = json.dumps(event, sort_keys=True)
        self.headers = {'Content-Type': 'application/json'}
def get_arguments(self):
        """
        Extracts the specific arguments of this CLI
        """
        ApiCli.get_arguments(self)

        if self.args.tenant_id is not None:
            self._tenant_id = self.args.tenant_id

        if self.args.fingerprint_fields is not None:
            self._fingerprint_fields = self.args.fingerprint_fields

        if self.args.title is not None:
            self._title = self.args.title

        if self.args.source is not None:
            self._source = self.args.source

        if self.args.severity is not None:
            self._severity = self.args.severity

        if self.args.message is not None:
            self._message = self.args.message

        event = {}

        if self._title is not None:
            event['title'] = self._title

        if self._severity is not None:
            event['severity'] = self._severity

        if self._message is not None:
            event['message'] = self._message

        if self._source is not None:
            if 'source' not in event:
                event['source'] = {}
            if len(self._source) >= 1:
                event['source']['ref'] = self._source[0]
            if len(self._source) >= 2:
                event['source']['type'] = self._source[1]

        self._process_properties(self.args.properties)
        if self._properties is not None:
            event['properties'] = self._properties

        if self._fingerprint_fields is not None:
            event['fingerprintFields'] = self._fingerprint_fields

        self.data = json.dumps(event, sort_keys=True)
        self.headers = {'Content-Type': 'application/json'}
Extracts the specific arguments of this CLI