def execute()

in ees_microsoft_outlook/bootstrap_command.py [0:0]


    def execute(self):
        """This function attempts to create a Content Source.

        It will use data from configuration file to determine
        which instance of Elastic Enterprise Search will be used
        to create a Content Source."""
        schema = {
            "title": "text",
            "type": "text",
            "body": "text",
            "url": "text",
            "created_at": "date",
        }
        display = {
            "title_field": "title",
            "url_field": "url",
            "detail_fields": [
                {"field_name": "title", "label": "Title"},
                {"field_name": "type", "label": "Type"},
                {"field_name": "body", "label": "Content"},
                {"field_name": "created_at", "label": "Created At"},
            ],
            "color": "#000000",
        }
        self.workplace_search_custom_client.create_content_source(
            schema, display, self.args.name, is_searchable=True
        )