Skip to content

Instantly share code, notes, and snippets.

{
"name": "sample-data-processing-workflow",
"description": "A sample workflow demonstrating data processing with approval steps",
"yaml_definition": {
"schemaVersion": "1.0.0",
"version": 1,
"metadata": {
"name": "sample-data-processing-workflow",
"description": "A sample workflow demonstrating data processing with approval steps",
"tags": [
volumes:
postgres-data:
driver: local
kestra-data:
driver: local
services:
postgres:
image: postgres
volumes:
"""
Gateway API client for AAP Gateway interactions with Service Tokens.
This module provides a client class to interact with the AAP Gateway REST API,
specifically for creating authenticators and mapping configurations.
"""
import requests
import logging
from typing import Dict, Optional
"""
Settings migrator.
This module handles the migration of AWX settings to Gateway.
"""
from django.conf import settings
from base_migrator import BaseAuthenticatorMigrator
alerts:
- annotations:
description: https://prometheus.io is reachable for more than 1 minute.
summary: Host https://prometheus.io is up
endsAt: '0001-01-01T00:00:00Z'
fingerprint: 226ceaf4d7c8760e
generatorURL: http://a847ec21bcc3:9090/graph?g0.expr=probe_success%7Bjob%3D%22blackbox%22%7D+%3D%3D+1&g0.tab=1
labels:
alertname: HostUp
instance: https://prometheus.io
import sys
import os
sys.path.append("/tmp")
from django.core.management.base import BaseCommand
from urllib.parse import urlparse, urlunparse
from saml_migrator import SAMLMigrator
from settings_migrator import SettingsMigrator
from gateway_client import GatewayClient, GatewayAPIError
"""
Gateway mapping conversion utilities.
This module contains functions to convert AWX authentication mappings
(organization and team mappings) to AAP Gateway format.
"""
def team_map_to_gateway_format(team_map, start_order=1):
"""Convert AWX team mapping to Gateway authenticator format.
"""
Gateway API client for AAP Gateway interactions.
This module provides a client class to interact with the AAP Gateway REST API,
specifically for creating authenticators and mapping configurations.
"""
import requests
import logging
from typing import Dict, List, Optional, Any
"""
Base authenticator migrator class.
This module defines the contract that all specific authenticator migrators must follow.
"""
from urllib.parse import urlparse, parse_qs
from django.conf import settings
from gateway_client import GatewayAPIError
"""
SAML authenticator migrator.
This module handles the migration of SAML authenticators from AWX to Gateway.
"""
from django.conf import settings
from gateway_mapping import org_map_to_gateway_format, team_map_to_gateway_format
from base_migrator import BaseAuthenticatorMigrator