From b2c39ace252b4548253c035efdcafff23ed7dd8b Mon Sep 17 00:00:00 2001 From: Artem Torubarov Date: Mon, 16 Sep 2024 14:51:49 +0200 Subject: [PATCH 01/13] exporter: move config to cluster CRD allows to set prio-limit and stats-period options to ceph exporter Signed-off-by: Artem Torubarov --- .../CRDs/Cluster/ceph-cluster-crd.md | 3 ++ Documentation/CRDs/specification.md | 53 +++++++++++++++++++ .../charts/rook-ceph/templates/resources.yaml | 14 +++++ deploy/examples/cluster.yaml | 9 ++++ deploy/examples/crds.yaml | 14 +++++ pkg/apis/ceph.rook.io/v1/types.go | 14 +++++ .../ceph/cluster/nodedaemon/exporter.go | 11 ++-- .../ceph/cluster/nodedaemon/exporter_test.go | 20 +++++++ 8 files changed, 135 insertions(+), 3 deletions(-) diff --git a/Documentation/CRDs/Cluster/ceph-cluster-crd.md b/Documentation/CRDs/Cluster/ceph-cluster-crd.md index 67a4d3945de7..29ded5c34a8b 100755 --- a/Documentation/CRDs/Cluster/ceph-cluster-crd.md +++ b/Documentation/CRDs/Cluster/ceph-cluster-crd.md @@ -52,6 +52,9 @@ If this value is empty, each pod will get an ephemeral directory to store their * `externalMgrPrometheusPort`: external prometheus manager module port. See [external cluster configuration](./external-cluster/external-cluster.md) for more details. * `port`: The internal prometheus manager module port where the prometheus mgr module listens. The port may need to be configured when host networking is enabled. * `interval`: The interval for the prometheus module to to scrape targets. + * `exporter`: Ceph exporter metrics config. + * `perfCountersPrioLimit`: Specifies which performance counters are exported. Corresponds to `--prio-limit` Ceph exporter flag. `0` - all counters are exported, default is `5`. + * `statsPeriodSeconds`: Time to wait before sending requests again to exporter server (seconds). Corresponds to `--stats-period` Ceph exporter flag. Default is `5`. * `network`: For the network settings for the cluster, refer to the [network configuration settings](#network-configuration-settings) * `mon`: contains mon related options [mon settings](#mon-settings) For more details on the mons and when to choose a number other than `3`, see the [mon health doc](../../Storage-Configuration/Advanced/ceph-mon-health.md). diff --git a/Documentation/CRDs/specification.md b/Documentation/CRDs/specification.md index 662c8575c97f..ebd043d22f6e 100644 --- a/Documentation/CRDs/specification.md +++ b/Documentation/CRDs/specification.md @@ -3686,6 +3686,45 @@ map[string]int +

CephExporterSpec +

+

+(Appears on:MonitoringSpec) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+perfCountersPrioLimit
+ +int64 + +
+

Only performance counters greater than or equal to this option are fetched

+
+statsPeriodSeconds
+ +int64 + +
+

Time to wait before sending requests again to exporter server (seconds)

+

CephFilesystemStatus

@@ -8527,6 +8566,20 @@ Kubernetes meta/v1.Duration

Interval determines prometheus scrape interval

+ + +exporter
+ + +CephExporterSpec + + + + +(Optional) +

Ceph exporter configuration

+ +

MultiClusterServiceSpec diff --git a/deploy/charts/rook-ceph/templates/resources.yaml b/deploy/charts/rook-ceph/templates/resources.yaml index 767e08498461..0092ad799fad 100644 --- a/deploy/charts/rook-ceph/templates/resources.yaml +++ b/deploy/charts/rook-ceph/templates/resources.yaml @@ -2341,6 +2341,20 @@ spec: Enabled determines whether to create the prometheus rules for the ceph cluster. If true, the prometheus types must exist or the creation will fail. Default is false. type: boolean + exporter: + description: Ceph exporter configuration + properties: + perfCountersPrioLimit: + default: 5 + description: Only performance counters greater than or equal to this option are fetched + format: int64 + type: integer + statsPeriodSeconds: + default: 5 + description: Time to wait before sending requests again to exporter server (seconds) + format: int64 + type: integer + type: object externalMgrEndpoints: description: ExternalMgrEndpoints points to an existing Ceph prometheus exporter endpoint items: diff --git a/deploy/examples/cluster.yaml b/deploy/examples/cluster.yaml index 11860340376e..a01f99f396b0 100644 --- a/deploy/examples/cluster.yaml +++ b/deploy/examples/cluster.yaml @@ -85,6 +85,15 @@ spec: # Whether to disable the metrics reported by Ceph. If false, the prometheus mgr module and Ceph exporter are enabled. # If true, the prometheus mgr module and Ceph exporter are both disabled. Default is false. metricsDisabled: false + # Ceph exporter metrics config. + exporter: + # Specifies which performance counters are exported. + # Corresponds to --prio-limit Ceph exporter flag + # 0 - all counters are exported + perfCountersPrioLimit: 5 + # Time to wait before sending requests again to exporter server (seconds) + # Corresponds to --stats-period Ceph exporter flag + statsPeriodSeconds: 5 network: connections: # Whether to encrypt the data in transit across the wire to prevent eavesdropping the data on the network. diff --git a/deploy/examples/crds.yaml b/deploy/examples/crds.yaml index 9f7a3d225655..aa8759c17784 100644 --- a/deploy/examples/crds.yaml +++ b/deploy/examples/crds.yaml @@ -2339,6 +2339,20 @@ spec: Enabled determines whether to create the prometheus rules for the ceph cluster. If true, the prometheus types must exist or the creation will fail. Default is false. type: boolean + exporter: + description: Ceph exporter configuration + properties: + perfCountersPrioLimit: + default: 5 + description: Only performance counters greater than or equal to this option are fetched + format: int64 + type: integer + statsPeriodSeconds: + default: 5 + description: Time to wait before sending requests again to exporter server (seconds) + format: int64 + type: integer + type: object externalMgrEndpoints: description: ExternalMgrEndpoints points to an existing Ceph prometheus exporter endpoint items: diff --git a/pkg/apis/ceph.rook.io/v1/types.go b/pkg/apis/ceph.rook.io/v1/types.go index c817ac41ac73..d06c20081f95 100755 --- a/pkg/apis/ceph.rook.io/v1/types.go +++ b/pkg/apis/ceph.rook.io/v1/types.go @@ -406,6 +406,20 @@ type MonitoringSpec struct { // Interval determines prometheus scrape interval // +optional Interval *metav1.Duration `json:"interval,omitempty"` + + // Ceph exporter configuration + // +optional + Exporter *CephExporterSpec `json:"exporter,omitempty"` +} + +type CephExporterSpec struct { + // Only performance counters greater than or equal to this option are fetched + // +kubebuilder:default=5 + PerfCountersPrioLimit int64 `json:"perfCountersPrioLimit,omitempty"` + + // Time to wait before sending requests again to exporter server (seconds) + // +kubebuilder:default=5 + StatsPeriodSeconds int64 `json:"statsPeriodSeconds,omitempty"` } // ClusterStatus represents the status of a Ceph cluster diff --git a/pkg/operator/ceph/cluster/nodedaemon/exporter.go b/pkg/operator/ceph/cluster/nodedaemon/exporter.go index 070bee756301..dec1809eb163 100644 --- a/pkg/operator/ceph/cluster/nodedaemon/exporter.go +++ b/pkg/operator/ceph/cluster/nodedaemon/exporter.go @@ -42,8 +42,8 @@ const ( monitoringPath = "/etc/ceph-monitoring/" serviceMonitorFile = "exporter-service-monitor.yaml" sockDir = "/run/ceph" - perfCountersPrioLimit = "5" - statsPeriod = "5" + defaultPrioLimit = "5" + defaultStatsPeriod = "5" DefaultMetricsPort uint16 = 9926 exporterServiceMetricName = "ceph-exporter-http-metrics" exporterKeyringUsername = "client.ceph-exporter" @@ -179,10 +179,15 @@ func getCephExporterDaemonContainer(cephCluster cephv1.CephCluster, cephVersion exporterEnvVar := generateExporterEnvVar() envVars := append(controller.DaemonEnvVars(&cephCluster.Spec), exporterEnvVar) + prioLimit, statsPeriod := defaultPrioLimit, defaultStatsPeriod + if cephCluster.Spec.Monitoring.Exporter != nil { + prioLimit = strconv.Itoa(int(cephCluster.Spec.Monitoring.Exporter.PerfCountersPrioLimit)) + statsPeriod = strconv.Itoa(int(cephCluster.Spec.Monitoring.Exporter.StatsPeriodSeconds)) + } args := []string{ "--sock-dir", sockDir, "--port", strconv.Itoa(int(DefaultMetricsPort)), - "--prio-limit", perfCountersPrioLimit, + "--prio-limit", prioLimit, "--stats-period", statsPeriod, } diff --git a/pkg/operator/ceph/cluster/nodedaemon/exporter_test.go b/pkg/operator/ceph/cluster/nodedaemon/exporter_test.go index 2a6adc90cd22..17ab9132dbff 100644 --- a/pkg/operator/ceph/cluster/nodedaemon/exporter_test.go +++ b/pkg/operator/ceph/cluster/nodedaemon/exporter_test.go @@ -121,6 +121,26 @@ func TestCreateOrUpdateCephExporter(t *testing.T) { assert.Equal(t, tolerations, podSpec.Spec.Tolerations) assert.Equal(t, true, podSpec.Spec.HostNetwork) assert.Equal(t, "test-priority-class", podSpec.Spec.PriorityClassName) + + t.Run("exporter config", func(t *testing.T) { + cephCluster.Spec.Monitoring.Exporter = &cephv1.CephExporterSpec{ + PerfCountersPrioLimit: 3, + StatsPeriodSeconds: 7, + } + res, err := r.createOrUpdateCephExporter(node, tolerations, cephCluster, cephVersion) + assert.NoError(t, err) + assert.Equal(t, controllerutil.OperationResult("updated"), res) + + err = r.client.Get(ctx, types.NamespacedName{Namespace: "rook-ceph", Name: name}, &deploy) + assert.NoError(t, err) + + podSpec := deploy.Spec.Template + args := podSpec.Spec.Containers[0].Args + assert.Equal(t, "--prio-limit", args[4]) + assert.Equal(t, "3", args[5]) + assert.Equal(t, "--stats-period", args[6]) + assert.Equal(t, "7", args[7]) + }) } func TestCephExporterBindAddress(t *testing.T) { From 1e3d08f11409dcf3e1f0119fe9388ba840bb98d6 Mon Sep 17 00:00:00 2001 From: Niraj Yadav Date: Thu, 12 Sep 2024 18:25:09 +0530 Subject: [PATCH 02/13] docs: add documentation for volumegroupsnapshot This PR adds the sample YAMLs and documentation for the VolumeGroupSnapshot feature. Signed-off-by: Niraj Yadav --- .../Storage-Configuration/Ceph-CSI/.pages | 1 + .../Ceph-CSI/ceph-csi-snapshot.md | 5 - .../ceph-csi-volume-group-snapshot.md | 109 ++++++++++++++++++ deploy/examples/csi/cephfs/groupsnapshot.yaml | 13 +++ .../csi/cephfs/groupsnapshotclass.yaml | 15 +++ deploy/examples/csi/cephfs/pvc.yaml | 2 + 6 files changed, 140 insertions(+), 5 deletions(-) create mode 100644 Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-volume-group-snapshot.md create mode 100644 deploy/examples/csi/cephfs/groupsnapshot.yaml create mode 100644 deploy/examples/csi/cephfs/groupsnapshotclass.yaml diff --git a/Documentation/Storage-Configuration/Ceph-CSI/.pages b/Documentation/Storage-Configuration/Ceph-CSI/.pages index a117ff7ddd87..47db28e1cd34 100644 --- a/Documentation/Storage-Configuration/Ceph-CSI/.pages +++ b/Documentation/Storage-Configuration/Ceph-CSI/.pages @@ -1,6 +1,7 @@ nav: - ceph-csi-drivers.md - ceph-csi-snapshot.md + - ceph-csi-volume-group-snapshot.md - ceph-csi-volume-clone.md - custom-images.md - ... diff --git a/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-snapshot.md b/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-snapshot.md index 1a8d888d14ce..c436b7198821 100644 --- a/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-snapshot.md +++ b/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-snapshot.md @@ -178,8 +178,3 @@ kubectl delete -f deploy/examples/csi/cephfs/pvc-restore.yaml kubectl delete -f deploy/examples/csi/cephfs/snapshot.yaml kubectl delete -f deploy/examples/csi/cephfs/snapshotclass.yaml ``` - -## Limitations - -- There is a limit of 400 snapshots per cephFS filesystem. -- The PVC cannot be deleted if it has snapshots. make sure all the snapshots on the PVC are deleted before you delete the PVC. diff --git a/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-volume-group-snapshot.md b/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-volume-group-snapshot.md new file mode 100644 index 000000000000..33d58b807fa2 --- /dev/null +++ b/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-volume-group-snapshot.md @@ -0,0 +1,109 @@ +--- +title: Volume Group Snapshots +--- + +Ceph provides the ability to create crash-consistent snapshots of multiple volumes. +A group snapshot represents “copies” from multiple volumes that are taken at the same point in time. +A group snapshot can be used either to rehydrate new volumes (pre-populated with the snapshot data) +or to restore existing volumes to a previous state (represented by the snapshots) + + +## Prerequisites + +- Install the [snapshot controller, volume group snapshot and snapshot CRDs](https://github.com/kubernetes-csi/external-snapshotter/tree/master#usage), +refer to VolumeGroupSnapshot documentation +[here](https://github.com/kubernetes-csi/external-snapshotter/tree/master#volume-group-snapshot-support) for more details. + +- A `VolumeGroupSnapshotClass` is needed for the volume group snapshot to work. The purpose of a `VolumeGroupSnapshotClass` is +defined in [the kubernetes +documentation](https://kubernetes.io/blog/2023/05/08/kubernetes-1-27-volume-group-snapshot-alpha/). +In short, as the documentation describes it: + +!!! info + Created by cluster administrators to describe how volume group snapshots + should be created. including the driver information, the deletion policy, etc. + +## Volume Group Snapshots + +### CephFS VolumeGroupSnapshotClass + +In [VolumeGroupSnapshotClass](https://github.com/rook/rook/tree/master/deploy/examples/csi/cephfs/groupsnapshotclass.yaml), +the `csi.storage.k8s.io/group-snapshotter-secret-name` parameter should reference the +name of the secret created for the cephfs-plugin. + +In the `VolumeGroupSnapshotClass`, update the value of the `clusterID` field to match the namespace +that Rook is running in. When Ceph CSI is deployed by Rook, the operator will automatically +maintain a configmap whose contents will match this key. By default this is +"rook-ceph". + +```console +kubectl create -f deploy/examples/csi/cephfs/groupsnapshotclass.yaml +``` + +### CephFS VolumeGroupSnapshot + +In [VolumeGroupSnapshot](https://github.com/rook/rook/tree/master/deploy/examples/csi/cephfs/groupsnapshot.yaml), +`volumeGroupSnapshotClassName` should be the name of the `VolumeGroupSnapshotClass` +previously created. The labels inside `matchLabels` should be present on the +PVCs that are already created by the CephFS CSI driver. + +```console +kubectl create -f deploy/examples/csi/cephfs/groupsnapshot.yaml +``` + +### Verify CephFS GroupSnapshot Creation + +```console +$ kubectl get volumegroupsnapshotclass +NAME DRIVER DELETIONPOLICY AGE +csi-cephfsplugin-groupsnapclass rook-ceph.cephfs.csi.ceph.com Delete 21m +``` + +```console +$ kubectl get volumegroupsnapshot +NAME READYTOUSE VOLUMEGROUPSNAPSHOTCLASS VOLUMEGROUPSNAPSHOTCONTENT CREATIONTIME AGE +cephfs-groupsnapshot true csi-cephfsplugin-groupsnapclass groupsnapcontent-d13f4d95-8822-4729-9586-4f222a3f788e 5m37s 5m39s +``` + +The snapshot will be ready to restore to a new PVC when `READYTOUSE` field of the +`volumegroupsnapshot` is set to true. + +### Restore the CephFS volume group snapshot to a new PVC + +Find the name of the snapshots created by the `VolumeGroupSnapshot` first by running: + +```console +$ kubectl get volumegroupsnapshot/cephfs-groupsnapshot -o=jsonpath='{range .status.pvcVolumeSnapshotRefList[*]}PVC: {.persistentVolumeClaimRef.name}, Snapshot: {.volumeSnapshotRef.name}{"\n"}{end}' +PVC: cephfs-pvc, Snapshot: snapshot-9d21b143904c10f49ddc92664a7e8fe93c23387d0a88549c14337484ebaf1011-2024-09-12-3.49.13 +``` + +It will list the PVC's name followed by its snapshot name. + +In +[pvc-restore](https://github.com/rook/rook/tree/master/deploy/examples/csi/cephfs/pvc-restore.yaml), +`dataSource` should be one of the `Snapshot` that we just +found. The `dataSource` kind should be the `VolumeSnapshot`. + +Create a new PVC from the snapshot + +```console +kubectl create -f deploy/examples/csi/cephfs/pvc-restore.yaml +``` + +### Verify CephFS Restore PVC Creation + +```console +$ kubectl get pvc +cephfs-pvc Bound pvc-9ae60bf9-4931-4f9a-9de1-7f45f31fe4da 1Gi RWO rook-cephfs 171m +cephfs-pvc-restore Bound pvc-b4b73cbb-5061-48c7-9ac8-e1202508cf97 1Gi RWO rook-cephfs 46s +``` + +## CephFS volume group snapshot resource Cleanup + +To clean the resources created by this example, run the following: + +```console +kubectl delete -f deploy/examples/csi/cephfs/pvc-restore.yaml +kubectl delete -f deploy/examples/csi/cephfs/groupsnapshot.yaml +kubectl delete -f deploy/examples/csi/cephfs/groupsnapshotclass.yaml +``` diff --git a/deploy/examples/csi/cephfs/groupsnapshot.yaml b/deploy/examples/csi/cephfs/groupsnapshot.yaml new file mode 100644 index 000000000000..98a8a6d46cfe --- /dev/null +++ b/deploy/examples/csi/cephfs/groupsnapshot.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +kind: VolumeGroupSnapshot +metadata: + name: cephfs-groupsnapshot +spec: + source: + selector: + matchLabels: + # The PVCs require this label for them to be + # included in the VolumeGroupSnapshot + group: snapshot-test + volumeGroupSnapshotClassName: csi-cephfsplugin-groupsnapclass diff --git a/deploy/examples/csi/cephfs/groupsnapshotclass.yaml b/deploy/examples/csi/cephfs/groupsnapshotclass.yaml new file mode 100644 index 000000000000..fe8d2e775c24 --- /dev/null +++ b/deploy/examples/csi/cephfs/groupsnapshotclass.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: groupsnapshot.storage.k8s.io/v1alpha1 +kind: VolumeGroupSnapshotClass +metadata: + name: csi-cephfsplugin-groupsnapclass +driver: rook-ceph.cephfs.csi.ceph.com # csi-provisioner-name +parameters: + # Specify a string that identifies your cluster. Ceph CSI supports any + # unique string. When Ceph CSI is deployed by Rook use the Rook namespace, + # for example "rook-ceph". + clusterID: rook-ceph # namespace: cluster + fsName: myfs + csi.storage.k8s.io/group-snapshotter-secret-name: rook-csi-cephfs-provisioner + csi.storage.k8s.io/group-snapshotter-secret-namespace: rook-ceph +deletionPolicy: Delete diff --git a/deploy/examples/csi/cephfs/pvc.yaml b/deploy/examples/csi/cephfs/pvc.yaml index 0f6addb69fae..cf3057de3115 100644 --- a/deploy/examples/csi/cephfs/pvc.yaml +++ b/deploy/examples/csi/cephfs/pvc.yaml @@ -3,6 +3,8 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: cephfs-pvc + labels: + group: snapshot-test spec: accessModes: - ReadWriteOnce From 32c5d99ef565e9aaf88f5f1f36c4aeca083b8347 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Tue, 17 Sep 2024 15:03:21 +0530 Subject: [PATCH 03/13] external: mds caps to healthchecker/cephfs users for cephfs fencing in external mode, we run command `ceph tell mds ***` which requires user user to include cap mds allow * in permission. So, we need to add this in healthchercker and cephfs provisioner user Signed-off-by: subhamkrai --- .../create-external-cluster-resources.py | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/deploy/examples/create-external-cluster-resources.py b/deploy/examples/create-external-cluster-resources.py index 45b972d1114c..268176c4f607 100644 --- a/deploy/examples/create-external-cluster-resources.py +++ b/deploy/examples/create-external-cluster-resources.py @@ -96,8 +96,8 @@ def _init_cmd_output_map(self): """{"dashboard":"https://ceph-dashboard:8443/","prometheus":"http://ceph-dashboard-db:9283/"}""" ) self.cmd_output_map[ - """{"caps": ["mon", "allow r, allow command quorum_status", "osd", "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow x pool=default.rgw.buckets.index"], "entity": "client.healthchecker", "format": "json", "prefix": "auth get-or-create"}""" - ] = """[{"entity":"client.healthchecker","key":"AQDFkbNeft5bFRAATndLNUSEKruozxiZi3lrdA==","caps":{"mon":"allow r, allow command quorum_status","osd":"profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow x pool=default.rgw.buckets.index"}}]""" + """{"caps": ["mon", "allow r, allow command quorum_status", "osd", "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow x pool=default.rgw.buckets.index", "mds", "allow *"], "entity": "client.healthchecker", "format": "json", "prefix": "auth get-or-create"}""" + ] = """[{"entity":"client.healthchecker","key":"AQDFkbNeft5bFRAATndLNUSEKruozxiZi3lrdA==","caps":{"mon":"allow r, allow command quorum_status","osd":"profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow x pool=default.rgw.buckets.index","mds":"allow *"}}]""" self.cmd_output_map[ """{"caps": ["mon", "profile rbd, allow command 'osd blocklist'", "osd", "profile rbd"], "entity": "client.csi-rbd-node", "format": "json", "prefix": "auth get-or-create"}""" ] = """[{"entity":"client.csi-rbd-node","key":"AQBOgrNeHbK1AxAAubYBeV8S1U/GPzq5SVeq6g==","caps":{"mon":"profile rbd, allow command 'osd blocklist'","osd":"profile rbd"}}]""" @@ -108,20 +108,20 @@ def _init_cmd_output_map(self): """{"caps": ["mon", "allow r, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "allow rw tag cephfs *=*", "mds", "allow rw"], "entity": "client.csi-cephfs-node", "format": "json", "prefix": "auth get-or-create"}""" ] = """[{"entity":"client.csi-cephfs-node","key":"AQBOgrNeENunKxAAPCmgE7R6G8DcXnaJ1F32qg==","caps":{"mds":"allow rw","mgr":"allow rw","mon":"allow r, allow command 'osd blocklist'","osd":"allow rw tag cephfs *=*"}}]""" self.cmd_output_map[ - """{"caps": ["mon", "allow r, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "allow rw tag cephfs metadata=*"], "entity": "client.csi-cephfs-provisioner", "format": "json", "prefix": "auth get-or-create"}""" - ] = """[{"entity":"client.csi-cephfs-provisioner","key":"AQBOgrNeAFgcGBAAvGqKOAD0D3xxmVY0R912dg==","caps":{"mgr":"allow rw","mon":"allow r, allow command 'osd blocklist'","osd":"allow rw tag cephfs metadata=*"}}]""" + """{"caps": ["mon", "allow r, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "allow rw tag cephfs metadata=*", "mds", "allow *"], "entity": "client.csi-cephfs-provisioner", "format": "json", "prefix": "auth get-or-create"}""" + ] = """[{"entity":"client.csi-cephfs-provisioner","key":"AQBOgrNeAFgcGBAAvGqKOAD0D3xxmVY0R912dg==","caps":{"mgr":"allow rw","mon":"allow r, allow command 'osd blocklist'","osd":"allow rw tag cephfs metadata=*","mds":"allow *"}}]""" self.cmd_output_map[ - """{"caps": ["mon", "allow r, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "allow rw tag cephfs metadata=*"], "entity": "client.csi-cephfs-provisioner-openshift-storage", "format": "json", "prefix": "auth get-or-create"}""" - ] = """[{"entity":"client.csi-cephfs-provisioner-openshift-storage","key":"BQBOgrNeAFgcGBAAvGqKOAD0D3xxmVY0R912dg==","caps":{"mgr":"allow rw","mon":"allow r, allow command 'osd blocklist'","osd":"allow rw tag cephfs metadata=*"}}]""" + """{"caps": ["mon", "allow r, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "allow rw tag cephfs metadata=*", "mds", "allow *"], "entity": "client.csi-cephfs-provisioner-openshift-storage", "format": "json", "prefix": "auth get-or-create"}""" + ] = """[{"entity":"client.csi-cephfs-provisioner-openshift-storage","key":"BQBOgrNeAFgcGBAAvGqKOAD0D3xxmVY0R912dg==","caps":{"mgr":"allow rw","mon":"allow r, allow command 'osd blocklist'","osd":"allow rw tag cephfs metadata=*", "mds":"allow *"}}]""" self.cmd_output_map[ - """{"caps": ["mon", "allow r, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "allow rw tag cephfs metadata=myfs"], "entity": "client.csi-cephfs-provisioner-openshift-storage-myfs", "format": "json", "prefix": "auth get-or-create"}""" - ] = """[{"entity":"client.csi-cephfs-provisioner-openshift-storage-myfs","key":"CQBOgrNeAFgcGBAAvGqKOAD0D3xxmVY0R912dg==","caps":{"mgr":"allow rw","mon":"allow r, allow command 'osd blocklist'","osd":"allow rw tag cephfs metadata=myfs"}}]""" + """{"caps": ["mon", "allow r, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "allow rw tag cephfs metadata=myfs", "mds", "allow *"], "entity": "client.csi-cephfs-provisioner-openshift-storage-myfs", "format": "json", "prefix": "auth get-or-create"}""" + ] = """[{"entity":"client.csi-cephfs-provisioner-openshift-storage-myfs","key":"CQBOgrNeAFgcGBAAvGqKOAD0D3xxmVY0R912dg==","caps":{"mgr":"allow rw","mon":"allow r, allow command 'osd blocklist'","osd":"allow rw tag cephfs metadata=myfs","mds":"allow *"}}]""" self.cmd_output_map[ - """{"caps": ["mon", "allow r, allow command quorum_status, allow command version", "mgr", "allow command config", "osd", "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index"], "entity": "client.healthchecker", "format": "json", "prefix": "auth get-or-create"}""" - ] = """[{"entity":"client.healthchecker","key":"AQDFkbNeft5bFRAATndLNUSEKruozxiZi3lrdA==","caps":{"mon": "allow r, allow command quorum_status, allow command version", "mgr": "allow command config", "osd": "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index"}}]""" + """{"caps": ["mon", "allow r, allow command quorum_status, allow command version", "mgr", "allow command config", "osd", "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index", "mds", "allow *"], "entity": "client.healthchecker", "format": "json", "prefix": "auth get-or-create"}""" + ] = """[{"entity":"client.healthchecker","key":"AQDFkbNeft5bFRAATndLNUSEKruozxiZi3lrdA==","caps":{"mon": "allow r, allow command quorum_status, allow command version", "mgr": "allow command config", "osd": "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index","mds":"allow *"}}]""" self.cmd_output_map[ - """{"caps": ["mon", "allow r, allow command quorum_status, allow command version", "mgr", "allow command config", "osd", "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index"], "entity": "client.healthchecker", "format": "json", "prefix": "auth caps"}""" - ] = """[{"entity":"client.healthchecker","key":"AQDFkbNeft5bFRAATndLNUSRKruozxiZi3lrdA==","caps":{"mon": "allow r, allow command quorum_status, allow command version", "mgr": "allow command config", "osd": "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index"}}]""" + """{"caps": ["mon", "allow r, allow command quorum_status, allow command version", "mgr", "allow command config", "osd", "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index", "mds", "allow *"], "entity": "client.healthchecker", "format": "json", "prefix": "auth caps"}""" + ] = """[{"entity":"client.healthchecker","key":"AQDFkbNeft5bFRAATndLNUSRKruozxiZi3lrdA==","caps":{"mon": "allow r, allow command quorum_status, allow command version", "mgr": "allow command config", "osd": "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index","mds":"allow *"}}]""" self.cmd_output_map["""{"format": "json", "prefix": "mgr services"}"""] = ( """{"dashboard": "http://rook-ceph-mgr-a-57cf9f84bc-f4jnl:7000/", "prometheus": "http://rook-ceph-mgr-a-57cf9f84bc-f4jnl:9283/"}""" ) @@ -130,7 +130,7 @@ def _init_cmd_output_map(self): ] = """{"dashboard": "http://rook-ceph-mgr-a-57cf9f84bc-f4jnl:7000/", "prometheus": "http://rook-ceph-mgr-a-57cf9f84bc-f4jnl:9283/"}""" self.cmd_output_map[ """{"entity": "client.healthchecker", "format": "json", "prefix": "auth get"}""" - ] = """[{"entity":"client.healthchecker","key":"AQDFkbNeft5bFRAATndLNUSEKruozxiZi3lrdA==","caps":{"mon": "allow r, allow command quorum_status, allow command version", "mgr": "allow command config", "osd": "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index"}}]""" + ] = """[{"entity":"client.healthchecker","key":"AQDFkbNeft5bFRAATndLNUSEKruozxiZi3lrdA==","caps":{"mon": "allow r, allow command quorum_status, allow command version", "mgr": "allow command config", "osd": "profile rbd-read-only, allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index","mds":"allow *"}}]""" self.cmd_output_map[ """{"entity": "client.csi-cephfs-node", "format": "json", "prefix": "auth get"}""" ] = """[]""" @@ -151,10 +151,10 @@ def _init_cmd_output_map(self): ] = """[]""" self.cmd_output_map[ """{"entity": "client.csi-cephfs-provisioner", "format": "json", "prefix": "auth get"}""" - ] = """[{"entity":"client.csi-cephfs-provisioner","key":"AQDFkbNeft5bFRAATndLNUSEKruozxiZi3lrdA==","caps":{"mon":"allow r", "mgr":"allow rw", "osd":"allow rw tag cephfs metadata=*"}}]""" + ] = """[{"entity":"client.csi-cephfs-provisioner","key":"AQDFkbNeft5bFRAATndLNUSEKruozxiZi3lrdA==","caps":{"mon":"allow r", "mgr":"allow rw", "osd":"allow rw tag cephfs metadata=*","mds":"allow *"}}]""" self.cmd_output_map[ - """{"caps": ["mon", "allow r, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "allow rw tag cephfs metadata=*"], "entity": "client.csi-cephfs-provisioner", "format": "json", "prefix": "auth caps"}""" - ] = """[{"entity":"client.csi-cephfs-provisioner","key":"AQDFkbNeft5bFRAATndLNUSEKruozxiZi3lrdA==","caps":{"mon":"allow r, allow command 'osd blocklist'", "mgr":"allow rw", "osd":"allow rw tag cephfs metadata=*"}}]""" + """{"caps": ["mon", "allow r, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "allow rw tag cephfs metadata=*", "mds", "allow *"], "entity": "client.csi-cephfs-provisioner", "format": "json", "prefix": "auth caps"}""" + ] = """[{"entity":"client.csi-cephfs-provisioner","key":"AQDFkbNeft5bFRAATndLNUSEKruozxiZi3lrdA==","caps":{"mon":"allow r, allow command 'osd blocklist'", "mgr":"allow rw", "osd":"allow rw tag cephfs metadata=*","mds":"allow *"}}]""" self.cmd_output_map['{"format": "json", "prefix": "status"}'] = ceph_status_str def shutdown(self): @@ -868,6 +868,7 @@ def get_cephfs_provisioner_caps_and_entity(self): "mon": "allow r, allow command 'osd blocklist'", "mgr": "allow rw", "osd": "allow rw tag cephfs metadata=*", + "mds": "allow *", } if self._arg_parser.restricted_auth_permission: k8s_cluster_name = self._arg_parser.k8s_cluster_name @@ -1017,6 +1018,7 @@ def get_defaultUser_caps_and_entity(self): "mon": "allow r, allow command quorum_status, allow command version", "mgr": "allow command config", "osd": f"profile rbd-read-only, allow rwx pool={self._arg_parser.rgw_pool_prefix}.rgw.meta, allow r pool=.rgw.root, allow rw pool={self._arg_parser.rgw_pool_prefix}.rgw.control, allow rx pool={self._arg_parser.rgw_pool_prefix}.rgw.log, allow x pool={self._arg_parser.rgw_pool_prefix}.rgw.buckets.index", + "mds": "allow *", } return caps, entity From fa2941d098f98fafc9529ee6c6f989ad29fce27e Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Tue, 17 Sep 2024 14:24:40 -0600 Subject: [PATCH 04/13] core: enable annotations on crash collector The crash collector daemon had missed the ability to add custom annotations via the cephcluster CR, as already supported for all the other daemons. Signed-off-by: Travis Nielsen --- pkg/apis/ceph.rook.io/v1/annotations.go | 5 +++++ pkg/apis/ceph.rook.io/v1/annotations_test.go | 11 ++++++++--- pkg/operator/ceph/cluster/nodedaemon/crash.go | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pkg/apis/ceph.rook.io/v1/annotations.go b/pkg/apis/ceph.rook.io/v1/annotations.go index 9610420be28c..efd40793f01f 100644 --- a/pkg/apis/ceph.rook.io/v1/annotations.go +++ b/pkg/apis/ceph.rook.io/v1/annotations.go @@ -77,6 +77,11 @@ func GetCmdReporterAnnotations(a AnnotationsSpec) Annotations { return mergeAllAnnotationsWithKey(a, KeyCmdReporter) } +// GetCrashCollectorAnnotations returns the Annotations for the crash collector +func GetCrashCollectorAnnotations(a AnnotationsSpec) Annotations { + return mergeAllAnnotationsWithKey(a, KeyCrashCollector) +} + func GetClusterMetadataAnnotations(a AnnotationsSpec) Annotations { return a[KeyClusterMetadata] } diff --git a/pkg/apis/ceph.rook.io/v1/annotations_test.go b/pkg/apis/ceph.rook.io/v1/annotations_test.go index b832690c3567..c3137d8ed549 100644 --- a/pkg/apis/ceph.rook.io/v1/annotations_test.go +++ b/pkg/apis/ceph.rook.io/v1/annotations_test.go @@ -58,9 +58,10 @@ func TestCephAnnotationsMerge(t *testing.T) { // Merge with "all" testAnnotations = AnnotationsSpec{ - "all": {"allkey1": "allval1", "allkey2": "allval2"}, - "mgr": {"mgrkey": "mgrval"}, - "cmdreporter": {"myversions": "detect"}, + "all": {"allkey1": "allval1", "allkey2": "allval2"}, + "mgr": {"mgrkey": "mgrval"}, + "cmdreporter": {"myversions": "detect"}, + "crashcollector": {"crash": "crashval"}, } a = GetMonAnnotations(testAnnotations) assert.Equal(t, "allval1", a["allkey1"]) @@ -75,6 +76,10 @@ func TestCephAnnotationsMerge(t *testing.T) { assert.Equal(t, "detect", b["myversions"]) assert.Equal(t, "allval1", b["allkey1"]) assert.Equal(t, "allval2", b["allkey2"]) + c := GetCrashCollectorAnnotations(testAnnotations) + assert.Equal(t, "crashval", c["crash"]) + assert.Equal(t, "allval1", c["allkey1"]) + assert.Equal(t, "allval2", c["allkey2"]) } func TestAnnotationsSpec(t *testing.T) { diff --git a/pkg/operator/ceph/cluster/nodedaemon/crash.go b/pkg/operator/ceph/cluster/nodedaemon/crash.go index 97abb34a3f9d..87ed94fb7ee8 100644 --- a/pkg/operator/ceph/cluster/nodedaemon/crash.go +++ b/pkg/operator/ceph/cluster/nodedaemon/crash.go @@ -124,6 +124,7 @@ func (r *ReconcileNode) createOrUpdateCephCrash(node corev1.Node, tolerations [] ServiceAccountName: k8sutil.DefaultServiceAccount, }, } + cephv1.GetCrashCollectorAnnotations(cephCluster.Spec.Annotations).ApplyToObjectMeta(&deploy.Spec.Template.ObjectMeta) return nil } From afad40e404ae2af7ab0419fc6923a31fe59a2383 Mon Sep 17 00:00:00 2001 From: Praveen M Date: Wed, 18 Sep 2024 11:40:07 +0530 Subject: [PATCH 05/13] csi: update csi-addons to v0.10.0 The csi-addons v0.10.0 release is now available. Ref: https://github.com/csi-addons/kubernetes-csi-addons/releases/tag/v0.10.0 Signed-off-by: Praveen M --- Documentation/Helm-Charts/operator-chart.md | 2 +- .../Ceph-CSI/ceph-csi-drivers.md | 32 +++++++++---------- .../Ceph-CSI/custom-images.md | 2 +- deploy/charts/rook-ceph/values.yaml | 2 +- deploy/examples/images.txt | 2 +- deploy/examples/operator-openshift.yaml | 2 +- deploy/examples/operator.yaml | 2 +- go.mod | 6 ++-- go.sum | 16 +++++----- pkg/apis/go.mod | 6 ++-- pkg/apis/go.sum | 14 ++++---- pkg/operator/ceph/csi/spec.go | 2 +- tests/scripts/csiaddons.sh | 2 +- 13 files changed, 45 insertions(+), 45 deletions(-) diff --git a/Documentation/Helm-Charts/operator-chart.md b/Documentation/Helm-Charts/operator-chart.md index 7ff471e7df16..ebb42204fb1f 100644 --- a/Documentation/Helm-Charts/operator-chart.md +++ b/Documentation/Helm-Charts/operator-chart.md @@ -67,7 +67,7 @@ The following table lists the configurable parameters of the rook-operator chart | `csi.clusterName` | Cluster name identifier to set as metadata on the CephFS subvolume and RBD images. This will be useful in cases like for example, when two container orchestrator clusters (Kubernetes/OCP) are using a single ceph cluster | `nil` | | `csi.csiAddons.enabled` | Enable CSIAddons | `false` | | `csi.csiAddons.repository` | CSIAddons sidecar image repository | `"quay.io/csiaddons/k8s-sidecar"` | -| `csi.csiAddons.tag` | CSIAddons sidecar image tag | `"v0.9.1"` | +| `csi.csiAddons.tag` | CSIAddons sidecar image tag | `"v0.10.0"` | | `csi.csiAddonsPort` | CSI Addons server port | `9070` | | `csi.csiCephFSPluginResource` | CEPH CSI CephFS plugin resource requirement list | see values.yaml | | `csi.csiCephFSPluginVolume` | The volume of the CephCSI CephFS plugin DaemonSet | `nil` | diff --git a/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md b/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md index dc5df80b8847..d06bb58ae9d4 100644 --- a/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md +++ b/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md @@ -166,9 +166,9 @@ that the controller inspects and forwards to one or more CSI-Addons sidecars for Deploy the controller by running the following commands: ```console -kubectl create -f https://github.com/csi-addons/kubernetes-csi-addons/releases/download/v0.9.1/crds.yaml -kubectl create -f https://github.com/csi-addons/kubernetes-csi-addons/releases/download/v0.9.1/rbac.yaml -kubectl create -f https://github.com/csi-addons/kubernetes-csi-addons/releases/download/v0.9.1/setup-controller.yaml +kubectl create -f https://github.com/csi-addons/kubernetes-csi-addons/releases/download/v0.10.0/crds.yaml +kubectl create -f https://github.com/csi-addons/kubernetes-csi-addons/releases/download/v0.10.0/rbac.yaml +kubectl create -f https://github.com/csi-addons/kubernetes-csi-addons/releases/download/v0.10.0/setup-controller.yaml ``` This creates the required CRDs and configures permissions. @@ -196,22 +196,22 @@ Execute the following to enable the CSI-Addons sidecars: CSI-Addons supports the following operations: * Reclaim Space - * [Creating a ReclaimSpaceJob](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/reclaimspace.md#reclaimspacejob) - * [Creating a ReclaimSpaceCronJob](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/reclaimspace.md#reclaimspacecronjob) - * [Annotating PersistentVolumeClaims](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/reclaimspace.md#annotating-perstentvolumeclaims) - * [Annotating Namespace](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/reclaimspace.md#annotating-namespace) - * [Annotating StorageClass](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/reclaimspace.md#annotating-storageclass) + * [Creating a ReclaimSpaceJob](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/reclaimspace.md#reclaimspacejob) + * [Creating a ReclaimSpaceCronJob](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/reclaimspace.md#reclaimspacecronjob) + * [Annotating PersistentVolumeClaims](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/reclaimspace.md#annotating-perstentvolumeclaims) + * [Annotating Namespace](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/reclaimspace.md#annotating-namespace) + * [Annotating StorageClass](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/reclaimspace.md#annotating-storageclass) * Network Fencing - * [Creating a NetworkFence](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/networkfence.md) + * [Creating a NetworkFence](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/networkfence.md) * Volume Replication - * [Creating VolumeReplicationClass](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/volumereplicationclass.md) - * [Creating VolumeReplication CR](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/volumereplication.md) + * [Creating VolumeReplicationClass](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/volumereplicationclass.md) + * [Creating VolumeReplication CR](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/volumereplication.md) * Key Rotation Job for PV encryption - * [Creating EncryptionKeyRotationJob](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/encryptionkeyrotation.md#encryptionkeyrotationjob) - * [Creating EncryptionKeyRotationCronJob](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/encryptionkeyrotation.md#encryptionkeyrotationcronjob) - * [Annotating PersistentVolumeClaims](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/encryptionkeyrotation.md#annotating-persistentvolumeclaims) - * [Annotating Namespace](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/encryptionkeyrotation.md#annotating-namespace) - * [Annotating StorageClass](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.9.1/docs/encryptionkeyrotation.md#annotating-storageclass) + * [Creating EncryptionKeyRotationJob](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/encryptionkeyrotation.md#encryptionkeyrotationjob) + * [Creating EncryptionKeyRotationCronJob](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/encryptionkeyrotation.md#encryptionkeyrotationcronjob) + * [Annotating PersistentVolumeClaims](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/encryptionkeyrotation.md#annotating-persistentvolumeclaims) + * [Annotating Namespace](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/encryptionkeyrotation.md#annotating-namespace) + * [Annotating StorageClass](https://github.com/csi-addons/kubernetes-csi-addons/blob/v0.10.0/docs/encryptionkeyrotation.md#annotating-storageclass) ## Enable RBD and CephFS Encryption Support diff --git a/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md b/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md index 8629bbcc1b55..86beab48d9a1 100644 --- a/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md +++ b/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md @@ -24,7 +24,7 @@ ROOK_CSI_PROVISIONER_IMAGE: "registry.k8s.io/sig-storage/csi-provisioner:v5.0.1" ROOK_CSI_ATTACHER_IMAGE: "registry.k8s.io/sig-storage/csi-attacher:v4.6.1" ROOK_CSI_RESIZER_IMAGE: "registry.k8s.io/sig-storage/csi-resizer:v1.11.1" ROOK_CSI_SNAPSHOTTER_IMAGE: "registry.k8s.io/sig-storage/csi-snapshotter:v8.0.1" -ROOK_CSIADDONS_IMAGE: "quay.io/csiaddons/k8s-sidecar:v0.9.1" +ROOK_CSIADDONS_IMAGE: "quay.io/csiaddons/k8s-sidecar:v0.10.0" ``` ### **Use private repository** diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml index 387712a37e2f..4cf7c298d6a4 100644 --- a/deploy/charts/rook-ceph/values.yaml +++ b/deploy/charts/rook-ceph/values.yaml @@ -537,7 +537,7 @@ csi: # -- CSIAddons sidecar image repository repository: quay.io/csiaddons/k8s-sidecar # -- CSIAddons sidecar image tag - tag: v0.9.1 + tag: v0.10.0 nfs: # -- Enable the nfs csi driver diff --git a/deploy/examples/images.txt b/deploy/examples/images.txt index faab1198c12c..b84f8adbdd97 100644 --- a/deploy/examples/images.txt +++ b/deploy/examples/images.txt @@ -3,7 +3,7 @@ quay.io/ceph/ceph:v18.2.4 quay.io/ceph/cosi:v0.1.2 quay.io/cephcsi/cephcsi:v3.12.2 - quay.io/csiaddons/k8s-sidecar:v0.9.1 + quay.io/csiaddons/k8s-sidecar:v0.10.0 registry.k8s.io/sig-storage/csi-attacher:v4.6.1 registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.11.1 registry.k8s.io/sig-storage/csi-provisioner:v5.0.1 diff --git a/deploy/examples/operator-openshift.yaml b/deploy/examples/operator-openshift.yaml index 396f022dd420..82ed8f14f141 100644 --- a/deploy/examples/operator-openshift.yaml +++ b/deploy/examples/operator-openshift.yaml @@ -558,7 +558,7 @@ data: CSI_ENABLE_CSIADDONS: "false" # Enable watch for faster recovery from rbd rwo node loss ROOK_WATCH_FOR_NODE_FAILURE: "true" - # ROOK_CSIADDONS_IMAGE: "quay.io/csiaddons/k8s-sidecar:v0.9.1" + # ROOK_CSIADDONS_IMAGE: "quay.io/csiaddons/k8s-sidecar:v0.10.0" # The GCSI RPC timeout value (in seconds). It should be >= 120. If this variable is not set or is an invalid value, it's default to 150. CSI_GRPC_TIMEOUT_SECONDS: "150" diff --git a/deploy/examples/operator.yaml b/deploy/examples/operator.yaml index 1d60f5638559..e0faa4d2a6b4 100644 --- a/deploy/examples/operator.yaml +++ b/deploy/examples/operator.yaml @@ -508,7 +508,7 @@ data: CSI_ENABLE_CSIADDONS: "false" # Enable watch for faster recovery from rbd rwo node loss ROOK_WATCH_FOR_NODE_FAILURE: "true" - # ROOK_CSIADDONS_IMAGE: "quay.io/csiaddons/k8s-sidecar:v0.9.1" + # ROOK_CSIADDONS_IMAGE: "quay.io/csiaddons/k8s-sidecar:v0.10.0" # The CSI GRPC timeout value (in seconds). It should be >= 120. If this variable is not set or is an invalid value, it's default to 150. CSI_GRPC_TIMEOUT_SECONDS: "150" diff --git a/go.mod b/go.mod index bc4e4229b027..add877c686ef 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/rook/rook -go 1.22.0 +go 1.22.6 -toolchain go1.22.5 +toolchain go1.22.7 replace ( github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1 @@ -21,7 +21,7 @@ require ( github.com/ceph/ceph-csi-operator/api v0.0.0-20240819112305-88e6db254d6c github.com/ceph/go-ceph v0.29.0 github.com/coreos/pkg v0.0.0-20230601102743-20bbbf26f4d8 - github.com/csi-addons/kubernetes-csi-addons v0.9.1 + github.com/csi-addons/kubernetes-csi-addons v0.10.0 github.com/gemalto/kmip-go v0.0.10 github.com/go-ini/ini v1.67.0 github.com/google/go-cmp v0.6.0 diff --git a/go.sum b/go.sum index f52f6da23a6c..b58bb5fb030f 100644 --- a/go.sum +++ b/go.sum @@ -214,8 +214,8 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/csi-addons/kubernetes-csi-addons v0.9.1 h1:2m8/Pls7Ws3ld1zr/w6lL6BWwsXqqLg2JnW0jP8AX6I= -github.com/csi-addons/kubernetes-csi-addons v0.9.1/go.mod h1:32kTa/Ngp7hMK2GEjx+Zk8yfKupR5WG4JG+oRzkM1TM= +github.com/csi-addons/kubernetes-csi-addons v0.10.0 h1:bBc6nb1oROz4RLhqoLFNeGymk2jIRXcx7LvAup9+3Jg= +github.com/csi-addons/kubernetes-csi-addons v0.10.0/go.mod h1:nqi369YuYMIdysBbHjtYJcWFpcxujPot1HS6tnNWBV4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -465,8 +465,8 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -724,8 +724,8 @@ github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8Ay github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= -github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= -github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= +github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= +github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -740,8 +740,8 @@ github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= -github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/openshift/api v0.0.0-20210105115604-44119421ec6b/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg= github.com/openshift/api v0.0.0-20240301093301-ce10821dc999 h1:+S998xHiJApsJZjRAO8wyedU9GfqFd8mtwWly6LqHDo= github.com/openshift/api v0.0.0-20240301093301-ce10821dc999/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4= diff --git a/pkg/apis/go.mod b/pkg/apis/go.mod index 495151118d30..0230510aa324 100644 --- a/pkg/apis/go.mod +++ b/pkg/apis/go.mod @@ -1,8 +1,8 @@ module github.com/rook/rook/pkg/apis -go 1.22.0 +go 1.22.6 -toolchain go1.22.5 +toolchain go1.22.7 replace ( github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1 @@ -32,6 +32,8 @@ require ( github.com/go-jose/go-jose/v4 v4.0.1 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/onsi/ginkgo/v2 v2.20.2 // indirect + github.com/onsi/gomega v1.34.2 // indirect github.com/x448/float16 v0.8.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/client-go v0.31.1 // indirect diff --git a/pkg/apis/go.sum b/pkg/apis/go.sum index 0e8f95c6872e..f0be261e2938 100644 --- a/pkg/apis/go.sum +++ b/pkg/apis/go.sum @@ -388,8 +388,8 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -610,8 +610,8 @@ github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8Ay github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= -github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= -github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= +github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= +github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -625,8 +625,8 @@ github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= -github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/openshift/api v0.0.0-20210105115604-44119421ec6b/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg= github.com/openshift/api v0.0.0-20240301093301-ce10821dc999 h1:+S998xHiJApsJZjRAO8wyedU9GfqFd8mtwWly6LqHDo= github.com/openshift/api v0.0.0-20240301093301-ce10821dc999/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4= @@ -820,8 +820,6 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/pkg/operator/ceph/csi/spec.go b/pkg/operator/ceph/csi/spec.go index ab029bce5ec4..de30e74a87c0 100644 --- a/pkg/operator/ceph/csi/spec.go +++ b/pkg/operator/ceph/csi/spec.go @@ -156,7 +156,7 @@ var ( DefaultAttacherImage = "registry.k8s.io/sig-storage/csi-attacher:v4.6.1" DefaultSnapshotterImage = "registry.k8s.io/sig-storage/csi-snapshotter:v8.0.1" DefaultResizerImage = "registry.k8s.io/sig-storage/csi-resizer:v1.11.1" - DefaultCSIAddonsImage = "quay.io/csiaddons/k8s-sidecar:v0.9.1" + DefaultCSIAddonsImage = "quay.io/csiaddons/k8s-sidecar:v0.10.0" // image pull policy DefaultCSIImagePullPolicy = string(corev1.PullIfNotPresent) diff --git a/tests/scripts/csiaddons.sh b/tests/scripts/csiaddons.sh index 60daf61e217e..6b91a847b289 100755 --- a/tests/scripts/csiaddons.sh +++ b/tests/scripts/csiaddons.sh @@ -16,7 +16,7 @@ set -xEo pipefail -CSIADDONS_VERSION="v0.9.1" +CSIADDONS_VERSION="v0.10.0" CSIADDONS_CRD_NAME="csiaddonsnodes.csiaddons.openshift.io" CSIADDONS_CONTAINER_NAME="csi-addons" From f6474445152822ff1635fe33cb84565b254031e0 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Thu, 19 Sep 2024 15:03:59 +0530 Subject: [PATCH 06/13] ci: fix ci permission issue with minikube start this commit upgrade the minikube, k8s, crictl versions in CI and also fix permission error in the github runner. Signed-off-by: subhamkrai --- .github/workflows/canary-test-config/action.yaml | 2 +- tests/scripts/github-action-helper.sh | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/canary-test-config/action.yaml b/.github/workflows/canary-test-config/action.yaml index e38c6f8c3484..358e08c02eb1 100644 --- a/.github/workflows/canary-test-config/action.yaml +++ b/.github/workflows/canary-test-config/action.yaml @@ -19,7 +19,7 @@ runs: - name: Setup Minikube shell: bash --noprofile --norc -eo pipefail -x {0} run: | - tests/scripts/github-action-helper.sh install_minikube_with_none_driver v1.30.0 + tests/scripts/github-action-helper.sh install_minikube_with_none_driver v1.31.0 - name: install deps shell: bash --noprofile --norc -eo pipefail -x {0} diff --git a/tests/scripts/github-action-helper.sh b/tests/scripts/github-action-helper.sh index cd10c8bb1a14..277a6f5f5739 100755 --- a/tests/scripts/github-action-helper.sh +++ b/tests/scripts/github-action-helper.sh @@ -707,8 +707,8 @@ function test_csi_nfs_workload { } function install_minikube_with_none_driver() { - CRICTL_VERSION="v1.30.0" - MINIKUBE_VERSION="v1.32.0" + CRICTL_VERSION="v1.31.1" + MINIKUBE_VERSION="v1.34.0" sudo apt update sudo apt install -y conntrack socat @@ -716,16 +716,16 @@ function install_minikube_with_none_driver() { sudo dpkg -i minikube_latest_amd64.deb rm -f minikube_latest_amd64.deb - curl -LO https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.9/cri-dockerd_0.3.9.3-0.ubuntu-focal_amd64.deb - sudo dpkg -i cri-dockerd_0.3.9.3-0.ubuntu-focal_amd64.deb - rm -f cri-dockerd_0.3.9.3-0.ubuntu-focal_amd64.deb + curl -LO https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.15/cri-dockerd_0.3.15.3-0.ubuntu-focal_amd64.deb + sudo dpkg -i cri-dockerd_0.3.15.3-0.ubuntu-focal_amd64.deb + rm -f cri-dockerd_0.3.15.3-0.ubuntu-focal_amd64.deb wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$CRICTL_VERSION/crictl-$CRICTL_VERSION-linux-amd64.tar.gz sudo tar zxvf crictl-$CRICTL_VERSION-linux-amd64.tar.gz -C /usr/local/bin rm -f crictl-$CRICTL_VERSION-linux-amd64.tar.gz sudo sysctl fs.protected_regular=0 - CNI_PLUGIN_VERSION="v1.4.0" + CNI_PLUGIN_VERSION="v1.5.1" CNI_PLUGIN_TAR="cni-plugins-linux-amd64-$CNI_PLUGIN_VERSION.tgz" # change arch if not on amd64 CNI_PLUGIN_INSTALL_DIR="/opt/cni/bin" @@ -735,7 +735,7 @@ function install_minikube_with_none_driver() { rm "$CNI_PLUGIN_TAR" export MINIKUBE_HOME=$HOME CHANGE_MINIKUBE_NONE_USER=true KUBECONFIG=$HOME/.kube/config - sudo -E minikube start --kubernetes-version="$1" --driver=none --memory 6g --cpus=2 --addons ingress --cni=calico + minikube start --kubernetes-version="$1" --driver=none --memory 6g --cpus=2 --addons ingress --cni=calico } FUNCTION="$1" From 99337b648d61d65d354324ba1d9d584cef52e908 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Fri, 20 Sep 2024 17:03:37 +0530 Subject: [PATCH 07/13] build: update toolchain to latest version this commits update the toolchain version to go v1.22.7 Signed-off-by: subhamkrai --- go.mod | 2 +- pkg/apis/go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 789a8464d54b..a46e225edce7 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/rook/rook go 1.22.0 -toolchain go1.22.5 +toolchain go1.22.7 replace ( github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1 diff --git a/pkg/apis/go.mod b/pkg/apis/go.mod index 27790be77987..b1670dd52b88 100644 --- a/pkg/apis/go.mod +++ b/pkg/apis/go.mod @@ -2,7 +2,7 @@ module github.com/rook/rook/pkg/apis go 1.22.0 -toolchain go1.22.5 +toolchain go1.22.7 replace ( github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1 From 467578d368763a9c0964b6a669407747881eee7b Mon Sep 17 00:00:00 2001 From: parth-gr Date: Thu, 12 Sep 2024 13:33:52 +0530 Subject: [PATCH 08/13] docs: update external docs with a better structure step1 to improve the external docs and make it more clear to end user Signed-off-by: parth-gr --- .../CRDs/Cluster/external-cluster/.pages | 4 + .../external-cluster/advance-external.md | 70 ++++ .../external-cluster/consumer-import.md | 76 ++++ .../external-cluster/external-cluster.md | 324 +----------------- .../external-cluster/provider-export.md | 125 +++++++ .../external-cluster/upgrade-external.md | 58 ++++ 6 files changed, 345 insertions(+), 312 deletions(-) create mode 100644 Documentation/CRDs/Cluster/external-cluster/advance-external.md create mode 100644 Documentation/CRDs/Cluster/external-cluster/consumer-import.md create mode 100644 Documentation/CRDs/Cluster/external-cluster/provider-export.md create mode 100644 Documentation/CRDs/Cluster/external-cluster/upgrade-external.md diff --git a/Documentation/CRDs/Cluster/external-cluster/.pages b/Documentation/CRDs/Cluster/external-cluster/.pages index 5a3a6ca9e41c..a225b612db12 100644 --- a/Documentation/CRDs/Cluster/external-cluster/.pages +++ b/Documentation/CRDs/Cluster/external-cluster/.pages @@ -1,3 +1,7 @@ nav: - external-cluster.md + - provider-export.md + - consumer-import.md + - upgrade-external.md + - advance-external.md - topology-for-external-mode.md diff --git a/Documentation/CRDs/Cluster/external-cluster/advance-external.md b/Documentation/CRDs/Cluster/external-cluster/advance-external.md new file mode 100644 index 000000000000..5034b0da9a69 --- /dev/null +++ b/Documentation/CRDs/Cluster/external-cluster/advance-external.md @@ -0,0 +1,70 @@ +# External Cluster Options + +## NFS storage + +Rook suggests a different mechanism for making use of an [NFS service running on the external Ceph standalone cluster](../../../Storage-Configuration/NFS/nfs-csi-driver.md#consuming-nfs-from-an-external-source), if desired. + +## Exporting Rook to another cluster + +If you have multiple K8s clusters running, and want to use the local `rook-ceph` cluster as the central storage, +you can export the settings from this cluster with the following steps. + +1. Copy create-external-cluster-resources.py into the directory `/etc/ceph/` of the toolbox. + + ```console + toolbox=$(kubectl get pod -l app=rook-ceph-tools -n rook-ceph -o jsonpath='{.items[*].metadata.name}') + kubectl -n rook-ceph cp deploy/examples/external/create-external-cluster-resources.py $toolbox:/etc/ceph + ``` + +2. Exec to the toolbox pod and execute create-external-cluster-resources.py with needed options to create required [users and keys](/Documentation/CRDs/Cluster/external-cluster/provider-export.md#1-create-all-users-and-keys). + +!!! important + For other clusters to connect to storage in this cluster, Rook must be configured with a networking configuration that is accessible from other clusters. Most commonly this is done by enabling host networking in the CephCluster CR so the Ceph daemons will be addressable by their host IPs. + +## Admin privileges + +If in case the cluster needs the admin keyring to configure, update the admin key `rook-ceph-mon` secret with client.admin keyring + +!!! note + Sharing the admin key with the external cluster is not generally recommended + +1. Get the `client.admin` keyring from the ceph cluster + + ```console + ceph auth get client.admin + ``` + +2. Update two values in the `rook-ceph-mon` secret: + - `ceph-username`: Set to `client.admin` + - `ceph-secret`: Set the client.admin keyring + +After restarting the rook operator (and the toolbox if in use), rook will configure ceph with admin privileges. + +## Connect to an External Object Store + +Create the [external object store CR](https://github.com/rook/rook/blob/master/deploy/examples/external/object-external.yaml) to configure connection to external gateways. + +```console +cd deploy/examples/external +kubectl create -f object-external.yaml +``` + +Consume the S3 Storage, in two different ways: + +1. Create an [Object store user](https://github.com/rook/rook/blob/master/deploy/examples/object-user.yaml) for credentials to access the S3 endpoint. + + ```console + cd deploy/examples + kubectl create -f object-user.yaml + ``` + +2. Create a [bucket storage class](https://github.com/rook/rook/blob/master/deploy/examples/external/storageclass-bucket-delete.yaml) where a client can request creating buckets and then create the [Object Bucket Claim](https://github.com/rook/rook/blob/master/deploy/examples/external/object-bucket-claim-delete.yaml), which will create an individual bucket for reading and writing objects. + + ```console + cd deploy/examples/external + kubectl create -f storageclass-bucket-delete.yaml + kubectl create -f object-bucket-claim-delete.yaml + ``` + +!!! hint + For more details see the [Object Store topic](../../../Storage-Configuration/Object-Storage-RGW/object-storage.md#connect-to-an-external-object-store) diff --git a/Documentation/CRDs/Cluster/external-cluster/consumer-import.md b/Documentation/CRDs/Cluster/external-cluster/consumer-import.md new file mode 100644 index 000000000000..3a8a5f352b47 --- /dev/null +++ b/Documentation/CRDs/Cluster/external-cluster/consumer-import.md @@ -0,0 +1,76 @@ +# Import Ceph configuration to the Rook consumer cluster + +## Installation types + +Install Rook in the the consumer cluster, either with [Helm](#helm-installation) +or the [manifests](#manifest-installation). + +### Helm Installation + +To install with Helm, the rook cluster helm chart will configure the necessary resources for the external cluster with the example `values-external.yaml`. + +```console +clusterNamespace=rook-ceph +operatorNamespace=rook-ceph +cd deploy/examples/charts/rook-ceph-cluster +helm repo add rook-release https://charts.rook.io/release +helm install --create-namespace --namespace $clusterNamespace rook-ceph rook-release/rook-ceph -f values.yaml +helm install --create-namespace --namespace $clusterNamespace rook-ceph-cluster \ +--set operatorNamespace=$operatorNamespace rook-release/rook-ceph-cluster -f values-external.yaml +``` + +### Manifest Installation + +If not installing with Helm, here are the steps to install with manifests. + +1. Deploy Rook, create [common.yaml](https://github.com/rook/rook/blob/master/deploy/examples/common.yaml), [crds.yaml](https://github.com/rook/rook/blob/master/deploy/examples/crds.yaml) and [operator.yaml](https://github.com/rook/rook/blob/master/deploy/examples/operator.yaml) manifests. + +2. Create [common-external.yaml](https://github.com/rook/rook/blob/master/deploy/examples/external/common-external.yaml) and [cluster-external.yaml](https://github.com/rook/rook/blob/master/deploy/examples/external/cluster-external.yaml) + +## Import the Provider Data + +1. Paste the above output from `create-external-cluster-resources.py` into your current shell to allow importing the provider data. + +2. The import script in the next step uses the current kubeconfig context by + default. If you want to specify the kubernetes cluster to use without + changing the current context, you can specify the cluster name by setting + the KUBECONTEXT environment variable. + + ```console + export KUBECONTEXT= + ``` + +3. Here is the link for [import](https://github.com/rook/rook/blob/master/deploy/examples/external/import-external-cluster.sh) script. The script has used the `rook-ceph` namespace and few parameters that also have referenced from namespace variable. If user's external cluster has a different namespace, change the namespace parameter in the script according to their external cluster. For example with `new-namespace` namespace, this change is needed on the namespace parameter in the script. + + ```console + NAMESPACE=${NAMESPACE:="new-namespace"} + ``` + +4. Run the import script. + + !!! note + If your Rook cluster nodes are running a kernel earlier than or equivalent to 5.4, remove + `fast-diff, object-map, deep-flatten,exclusive-lock` from the `imageFeatures` line. + + ```console + . import-external-cluster.sh + ``` + +## Cluster Verification + +1. Verify the consumer cluster is connected to the provider ceph cluster: + + ```console + $ kubectl -n rook-ceph get CephCluster + NAME DATADIRHOSTPATH MONCOUNT AGE STATE HEALTH + rook-ceph-external /var/lib/rook 162m Connected HEALTH_OK + ``` + +2. Verify the creation of the storage class depending on the rbd pools and filesystem provided. + `ceph-rbd` and `cephfs` would be the respective names for the RBD and CephFS storage classes. + + ```console + kubectl -n rook-ceph get sc + ``` + +3. Create a [persistent volume](https://github.com/rook/rook/tree/master/deploy/examples/csi) based on these StorageClass. diff --git a/Documentation/CRDs/Cluster/external-cluster/external-cluster.md b/Documentation/CRDs/Cluster/external-cluster/external-cluster.md index adc7405f2545..28dd279bfbf1 100644 --- a/Documentation/CRDs/Cluster/external-cluster/external-cluster.md +++ b/Documentation/CRDs/Cluster/external-cluster/external-cluster.md @@ -8,9 +8,9 @@ In external mode, Rook will provide the configuration for the CSI driver and oth ## External configuration -* Source cluster: The cluster providing the data, usually configured by [cephadm](https://docs.ceph.com/en/pacific/cephadm/#cephadm) +* Provider cluster: The cluster providing the data, usually configured by [cephadm](https://docs.ceph.com/en/pacific/cephadm/#cephadm) -* Consumer cluster: The K8s cluster that will be consuming the external source cluster +* Consumer cluster: The K8s cluster that will be consuming the external provider cluster ## Prerequisites @@ -19,324 +19,24 @@ Create the desired types of storage in the provider Ceph cluster: * [RBD pools](https://docs.ceph.com/en/latest/rados/operations/pools/#create-a-pool) * [CephFS filesystem](https://docs.ceph.com/en/quincy/cephfs/createfs/) -## Commands on the source Ceph cluster +## Connect the external Ceph Provider cluster to the Rook consumer cluster -In order to configure an external Ceph cluster with Rook, we need to extract some information in order to connect to that cluster. +1) [Export config from the Provider Ceph cluster](/Documentation/CRDs/Cluster/external-cluster/provider-export.md). Configuration must be exported by the Ceph admin, such as a Ceph keyring and mon endpoints, that allows connection to the Ceph cluster. -### 1. Create all users and keys +2) [Import config to the Rook consumer cluster](/Documentation/CRDs/Cluster/external-cluster/consumer-import.md). The configuration exported from the Ceph cluster is imported to Rook to provide the needed connection details. -Run the python script [create-external-cluster-resources.py](https://github.com/rook/rook/blob/master/deploy/examples/external/create-external-cluster-resources.py) for creating all users and keys. +## Advance Options -```console -python3 create-external-cluster-resources.py --rbd-data-pool-name --cephfs-filesystem-name --rgw-endpoint --namespace --format bash -``` +* [NFS storage](/Documentation/CRDs/Cluster/external-cluster/advance-external.md#nfs-storage) -* `--namespace`: Namespace where CephCluster will run, for example `rook-ceph` -* `--format bash`: The format of the output -* `--rbd-data-pool-name`: The name of the RBD data pool -* `--alias-rbd-data-pool-name`: Provides an alias for the RBD data pool name, necessary if a special character is present in the pool name such as a period or underscore -* `--rgw-endpoint`: (optional) The RADOS Gateway endpoint in the format `:` or `:`. -* `--rgw-pool-prefix`: (optional) The prefix of the RGW pools. If not specified, the default prefix is `default` -* `--rgw-tls-cert-path`: (optional) RADOS Gateway endpoint TLS certificate file path -* `--rgw-skip-tls`: (optional) Ignore TLS certification validation when a self-signed certificate is provided (NOT RECOMMENDED) -* `--rbd-metadata-ec-pool-name`: (optional) Provides the name of erasure coded RBD metadata pool, used for creating ECRBDStorageClass. -* `--monitoring-endpoint`: (optional) Ceph Manager prometheus exporter endpoints (comma separated list of IP entries of active and standby mgrs) -* `--monitoring-endpoint-port`: (optional) Ceph Manager prometheus exporter port -* `--skip-monitoring-endpoint`: (optional) Skip prometheus exporter endpoints, even if they are available. Useful if the prometheus module is not enabled -* `--ceph-conf`: (optional) Provide a Ceph conf file -* `--keyring`: (optional) Path to Ceph keyring file, to be used with `--ceph-conf` -* `--k8s-cluster-name`: (optional) Kubernetes cluster name -* `--output`: (optional) Output will be stored into the provided file -* `--dry-run`: (optional) Prints the executed commands without running them -* `--run-as-user`: (optional) Provides a user name to check the cluster's health status, must be prefixed by `client`. -* `--cephfs-metadata-pool-name`: (optional) Provides the name of the cephfs metadata pool -* `--cephfs-filesystem-name`: (optional) The name of the filesystem, used for creating CephFS StorageClass -* `--cephfs-data-pool-name`: (optional) Provides the name of the CephFS data pool, used for creating CephFS StorageClass -* `--rados-namespace`: (optional) Divides a pool into separate logical namespaces, used for creating RBD PVC in a CephBlockPoolRadosNamespace (should be lower case) -* `--subvolume-group`: (optional) Provides the name of the subvolume group, used for creating CephFS PVC in a subvolumeGroup -* `--rgw-realm-name`: (optional) Provides the name of the rgw-realm -* `--rgw-zone-name`: (optional) Provides the name of the rgw-zone -* `--rgw-zonegroup-name`: (optional) Provides the name of the rgw-zone-group -* `--upgrade`: (optional) Upgrades the cephCSIKeyrings(For example: client.csi-cephfs-provisioner) and client.healthchecker ceph users with new permissions needed for the new cluster version and older permission will still be applied. -* `--restricted-auth-permission`: (optional) Restrict cephCSIKeyrings auth permissions to specific pools, and cluster. Mandatory flags that need to be set are `--rbd-data-pool-name`, and `--k8s-cluster-name`. `--cephfs-filesystem-name` flag can also be passed in case of CephFS user restriction, so it can restrict users to particular CephFS filesystem. -* `--v2-port-enable`: (optional) Enables the v2 mon port (3300) for mons. -* `--topology-pools`: (optional) Comma-separated list of topology-constrained rbd pools -* `--topology-failure-domain-label`: (optional) K8s cluster failure domain label (example: zone, rack, or host) for the topology-pools that match the ceph domain -* `--topology-failure-domain-values`: (optional) Comma-separated list of the k8s cluster failure domain values corresponding to each of the pools in the `topology-pools` list -* `--config-file`: Path to the configuration file, Priority: command-line-args > config.ini values > default values +* [Exporting Rook to another cluster](/Documentation/CRDs/Cluster/external-cluster/advance-external.md#exporting-rook-to-another-cluster) -### Config-file +* [Run consumer Rook cluster with Admin privileges](/Documentation/CRDs/Cluster/external-cluster/advance-external.md#admin-privileges) -Use the config file to set the user configuration file, add the flag `--config-file` to set the file path. - -Example: - -`/config.ini` - -```console -[Configurations] -format = bash -cephfs-filesystem-name = -rbd-data-pool-name = -... -``` - -```console -python3 create-external-cluster-resources.py --config-file /config.ini -``` - -!!! note - You can use both config file and other arguments at the same time - Priority: command-line-args > config.ini file values > default values - - -### Multi-tenancy - -To enable multi-tenancy, run the script with the `--restricted-auth-permission` flag and pass the mandatory flags with it, -It will generate the secrets which you can use for creating new `Consumer cluster` deployment using the same `Source cluster`(ceph cluster). -So you would be running different isolated consumer clusters on top of single `Source cluster`. - -!!! note - Restricting the csi-users per pool, and per cluster will require creating new csi-users and new secrets for that csi-users. - So apply these secrets only to new `Consumer cluster` deployment while using the same `Source cluster`. - -```console -python3 create-external-cluster-resources.py --cephfs-filesystem-name --rbd-data-pool-name --k8s-cluster-name --restricted-auth-permission true --format --rgw-endpoint --namespace -``` - -### RGW Multisite - -Pass the `--rgw-realm-name`, `--rgw-zonegroup-name` and `--rgw-zone-name` flags to create the admin ops user in a master zone, zonegroup and realm. -See the [Multisite doc](https://docs.ceph.com/en/quincy/radosgw/multisite/#configuring-a-master-zone) for creating a zone, zonegroup and realm. - -```console -python3 create-external-cluster-resources.py --rbd-data-pool-name --format bash --rgw-endpoint --rgw-realm-name > --rgw-zonegroup-name --rgw-zone-name > -``` - -### Topology Based Provisioning - -Enable Topology Based Provisioning for RBD pools by passing `--topology-pools`, `--topology-failure-domain-label` and `--topology-failure-domain-values` flags. -A new storageclass named `ceph-rbd-topology` will be created by the import script with `volumeBindingMode: WaitForFirstConsumer`. -The storageclass is used to create a volume in the pool matching the topology where a pod is scheduled. - -For more details, see the [Topology-Based Provisioning](topology-for-external-mode.md) - -### Admin privileges - -If in case the cluster needs the admin keyring to configure, update the admin key `rook-ceph-mon` secret with client.admin keyring - -!!! note - Sharing the admin key with the external cluster is not generally recommended - -1. Get the `client.admin` keyring from the ceph cluster - - ```console - ceph auth get client.admin - ``` - -2. Update two values in the `rook-ceph-mon` secret: - - `ceph-username`: Set to `client.admin` - - `ceph-secret`: Set the client.admin keyring - -After restarting the rook operator (and the toolbox if in use), rook will configure ceph with admin privileges. - -### 2. Copy the bash output - -Example Output: - -```console -export ROOK_EXTERNAL_FSID=797f411a-aafe-11ec-a254-fa163e1539f5 -export ROOK_EXTERNAL_USERNAME=client.healthchecker -export ROOK_EXTERNAL_CEPH_MON_DATA=ceph-rados-upstream-w4pdvq-node1-installer=10.0.210.83:6789 -export ROOK_EXTERNAL_USER_SECRET=AQAdm0FilZDSJxAAMucfuu/j0ZYYP4Bia8Us+w== -export ROOK_EXTERNAL_DASHBOARD_LINK=https://10.0.210.83:8443/ -export CSI_RBD_NODE_SECRET=AQC1iDxip45JDRAAVahaBhKz1z0WW98+ACLqMQ== -export CSI_RBD_PROVISIONER_SECRET=AQC1iDxiMM+LLhAA0PucjNZI8sG9Eh+pcvnWhQ== -export MONITORING_ENDPOINT=10.0.210.83 -export MONITORING_ENDPOINT_PORT=9283 -export RBD_POOL_NAME=replicated_2g -export RGW_POOL_PREFIX=default -``` - -## Commands on the K8s consumer cluster - -### Helm Installation - -To install with Helm, the rook cluster helm chart will configure the necessary resources for the external cluster with the example `values-external.yaml`. - -```console -clusterNamespace=rook-ceph -operatorNamespace=rook-ceph -cd deploy/examples/charts/rook-ceph-cluster -helm repo add rook-release https://charts.rook.io/release -helm install --create-namespace --namespace $clusterNamespace rook-ceph rook-release/rook-ceph -f values.yaml -helm install --create-namespace --namespace $clusterNamespace rook-ceph-cluster \ ---set operatorNamespace=$operatorNamespace rook-release/rook-ceph-cluster -f values-external.yaml -``` - -Skip the manifest installation section and continue with [Cluster Verification](#cluster-verification). - -### Manifest Installation - -If not installing with Helm, here are the steps to install with manifests. - -1. Deploy Rook, create [common.yaml](https://github.com/rook/rook/blob/master/deploy/examples/common.yaml), [crds.yaml](https://github.com/rook/rook/blob/master/deploy/examples/crds.yaml) and [operator.yaml](https://github.com/rook/rook/blob/master/deploy/examples/operator.yaml) manifests. - -2. Create [common-external.yaml](https://github.com/rook/rook/blob/master/deploy/examples/external/common-external.yaml) and [cluster-external.yaml](https://github.com/rook/rook/blob/master/deploy/examples/external/cluster-external.yaml) - -### Import the Source Data - -1. Paste the above output from `create-external-cluster-resources.py` into your current shell to allow importing the source data. - -2. The import script in the next step uses the current kubeconfig context by - default. If you want to specify the kubernetes cluster to use without - changing the current context, you can specify the cluster name by setting - the KUBECONTEXT environment variable. - - ```console - export KUBECONTEXT= - ``` - -3. Here is the link for [import](https://github.com/rook/rook/blob/master/deploy/examples/external/import-external-cluster.sh) script. The script has used the `rook-ceph` namespace and few parameters that also have referenced from namespace variable. If user's external cluster has a different namespace, change the namespace parameter in the script according to their external cluster. For example with `new-namespace` namespace, this change is needed on the namespace parameter in the script. - - ```console - NAMESPACE=${NAMESPACE:="new-namespace"} - ``` - -4. Run the import script. - - !!! note - If your Rook cluster nodes are running a kernel earlier than or equivalent to 5.4, remove - `fast-diff, object-map, deep-flatten,exclusive-lock` from the `imageFeatures` line. - - ```console - . import-external-cluster.sh - ``` - -### Cluster Verification - -1. Verify the consumer cluster is connected to the source ceph cluster: - - ```console - $ kubectl -n rook-ceph get CephCluster - NAME DATADIRHOSTPATH MONCOUNT AGE STATE HEALTH - rook-ceph-external /var/lib/rook 162m Connected HEALTH_OK - ``` - -2. Verify the creation of the storage class depending on the rbd pools and filesystem provided. - `ceph-rbd` and `cephfs` would be the respective names for the RBD and CephFS storage classes. - - ```console - kubectl -n rook-ceph get sc - ``` - -3. Then you can now create a [persistent volume](https://github.com/rook/rook/tree/master/deploy/examples/csi) based on these StorageClass. - -### Connect to an External Object Store - -Create the [external object store CR](https://github.com/rook/rook/blob/master/deploy/examples/external/object-external.yaml) to configure connection to external gateways. - -```console -cd deploy/examples/external -kubectl create -f object-external.yaml -``` - -Consume the S3 Storage, in two different ways: - -1. Create an [Object store user](https://github.com/rook/rook/blob/master/deploy/examples/object-user.yaml) for credentials to access the S3 endpoint. - - ```console - cd deploy/examples - kubectl create -f object-user.yaml - ``` - -2. Create a [bucket storage class](https://github.com/rook/rook/blob/master/deploy/examples/external/storageclass-bucket-delete.yaml) where a client can request creating buckets and then create the [Object Bucket Claim](https://github.com/rook/rook/blob/master/deploy/examples/external/object-bucket-claim-delete.yaml), which will create an individual bucket for reading and writing objects. - - ```console - cd deploy/examples/external - kubectl create -f storageclass-bucket-delete.yaml - kubectl create -f object-bucket-claim-delete.yaml - ``` - -!!! hint - For more details see the [Object Store topic](../../../Storage-Configuration/Object-Storage-RGW/object-storage.md#connect-to-an-external-object-store) - -### Connect to v2 mon port - -If encryption or compression on the wire is needed, specify the `--v2-port-enable` flag. -If the v2 address type is present in the `ceph quorum_status`, then the output of 'ceph mon data' i.e, `ROOK_EXTERNAL_CEPH_MON_DATA` will use the v2 port(`3300`). - -### NFS storage - -Rook suggests a different mechanism for making use of an [NFS service running on the external Ceph standalone cluster](../../../Storage-Configuration/NFS/nfs-csi-driver.md#consuming-nfs-from-an-external-source), if desired. - -## Exporting Rook to another cluster - -If you have multiple K8s clusters running, and want to use the local `rook-ceph` cluster as the central storage, -you can export the settings from this cluster with the following steps. - -1. Copy create-external-cluster-resources.py into the directory `/etc/ceph/` of the toolbox. - - ```console - toolbox=$(kubectl get pod -l app=rook-ceph-tools -n rook-ceph -o jsonpath='{.items[*].metadata.name}') - kubectl -n rook-ceph cp deploy/examples/external/create-external-cluster-resources.py $toolbox:/etc/ceph - ``` - -2. Exec to the toolbox pod and execute create-external-cluster-resources.py with needed options to create required [users and keys](#1-create-all-users-and-keys). - -!!! important - For other clusters to connect to storage in this cluster, Rook must be configured with a networking configuration that is accessible from other clusters. Most commonly this is done by enabling host networking in the CephCluster CR so the Ceph daemons will be addressable by their host IPs. +* [Connect to an External Object Store](/Documentation/CRDs/Cluster/external-cluster/advance-external.md#connect-to-an-external-object-store) ## Upgrades -Upgrading the cluster would be different for restricted caps and non-restricted caps, - -1. If consumer cluster doesn't have restricted caps, this will upgrade all the default CSI users (non-restricted) - - ```console - python3 create-external-cluster-resources.py --upgrade - ``` - -2. If the consumer cluster has restricted caps - - Restricted users created using `--restricted-auth-permission` flag need to pass mandatory flags: '`--rbd-data-pool-name`(if it is a rbd user), `--k8s-cluster-name` and `--run-as-user`' flags while upgrading, in case of cephfs users if you have passed `--cephfs-filesystem-name` flag while creating CSI users then while upgrading it will be mandatory too. In this example the user would be `client.csi-rbd-node-rookstorage-replicapool` (following the pattern `csi-user-clusterName-poolName`) - - ```console - python3 create-external-cluster-resources.py --upgrade --rbd-data-pool-name replicapool --k8s-cluster-name rookstorage --run-as-user client.csi-rbd-node-rookstorage-replicapool - ``` - - !!! note - 1) An existing non-restricted user cannot be converted to a restricted user by upgrading. - 2) The upgrade flag should only be used to append new permissions to users. It shouldn't be used for changing a CSI user already applied permissions. For example, be careful not to change pools(s) that a user has access to. - -### Upgrade cluster to utilize new feature - -Some Rook upgrades may require re-running the import steps, or may introduce new external cluster features that can be most easily enabled by re-running the import steps. - -To re-run the import steps with new options, the python script should be re-run using the same configuration options that were used for past invocations, plus the configurations that are being added or modified. - -Starting with Rook v1.15, the script stores the configuration in the external-cluster-user-command configmap for easy future reference. - -* arg: Exact arguments that were used for for processing the script. Argument that are decided using the Priority: command-line-args > config.ini file values > default values. - -#### Example `external-cluster-user-command` ConfigMap: - -1. Get the last-applied config, if its available - - ```console - $ kubectl get configmap -namespace rook-ceph external-cluster-user-command --output jsonpath='{.data.args}' - ``` - -2. Copy the output to config.ini - -3. Make any desired modifications and additions to `config.ini`` - -4. Run the python script again using the [config file](#config-file) - -5. [Copy the bash output](#2-copy-the-bash-output) - -6. Run the steps under [import-the-source-data](#import-the-source-data) +* [Upgrade external cluster](/Documentation/CRDs/Cluster/external-cluster/upgrade-external.md#upgrade-external-cluster) -!!! warning - If the last-applied config is unavailable, run the current version of the script again using previously-applied config and CLI flags. - Failure to reuse the same configuration options when re-invoking the python script can result in unexpected changes when re-running the import script. +* [Utilize new features in upgrade](/Documentation/CRDs/Cluster/external-cluster/upgrade-external.md#upgrade-cluster-to-utilize-new-feature) diff --git a/Documentation/CRDs/Cluster/external-cluster/provider-export.md b/Documentation/CRDs/Cluster/external-cluster/provider-export.md new file mode 100644 index 000000000000..7f3b3e8e7abf --- /dev/null +++ b/Documentation/CRDs/Cluster/external-cluster/provider-export.md @@ -0,0 +1,125 @@ +# Export config from the Ceph provider cluster + +In order to configure an external Ceph cluster with Rook, we need to extract some information in order to connect to that cluster. + +## 1. Create all users and keys + +Run the python script [create-external-cluster-resources.py](https://github.com/rook/rook/blob/master/deploy/examples/external/create-external-cluster-resources.py) for creating all users and keys. + +```console +python3 create-external-cluster-resources.py --rbd-data-pool-name --cephfs-filesystem-name --rgw-endpoint --namespace --format bash +``` + +* `--namespace`: Namespace where CephCluster will run, for example `rook-ceph` +* `--format bash`: The format of the output +* `--rbd-data-pool-name`: The name of the RBD data pool +* `--alias-rbd-data-pool-name`: Provides an alias for the RBD data pool name, necessary if a special character is present in the pool name such as a period or underscore +* `--rgw-endpoint`: (optional) The RADOS Gateway endpoint in the format `:` or `:`. +* `--rgw-pool-prefix`: (optional) The prefix of the RGW pools. If not specified, the default prefix is `default` +* `--rgw-tls-cert-path`: (optional) RADOS Gateway endpoint TLS certificate file path +* `--rgw-skip-tls`: (optional) Ignore TLS certification validation when a self-signed certificate is provided (NOT RECOMMENDED) +* `--rbd-metadata-ec-pool-name`: (optional) Provides the name of erasure coded RBD metadata pool, used for creating ECRBDStorageClass. +* `--monitoring-endpoint`: (optional) Ceph Manager prometheus exporter endpoints (comma separated list of IP entries of active and standby mgrs) +* `--monitoring-endpoint-port`: (optional) Ceph Manager prometheus exporter port +* `--skip-monitoring-endpoint`: (optional) Skip prometheus exporter endpoints, even if they are available. Useful if the prometheus module is not enabled +* `--ceph-conf`: (optional) Provide a Ceph conf file +* `--keyring`: (optional) Path to Ceph keyring file, to be used with `--ceph-conf` +* `--k8s-cluster-name`: (optional) Kubernetes cluster name +* `--output`: (optional) Output will be stored into the provided file +* `--dry-run`: (optional) Prints the executed commands without running them +* `--run-as-user`: (optional) Provides a user name to check the cluster's health status, must be prefixed by `client`. +* `--cephfs-metadata-pool-name`: (optional) Provides the name of the cephfs metadata pool +* `--cephfs-filesystem-name`: (optional) The name of the filesystem, used for creating CephFS StorageClass +* `--cephfs-data-pool-name`: (optional) Provides the name of the CephFS data pool, used for creating CephFS StorageClass +* `--rados-namespace`: (optional) Divides a pool into separate logical namespaces, used for creating RBD PVC in a CephBlockPoolRadosNamespace (should be lower case) +* `--subvolume-group`: (optional) Provides the name of the subvolume group, used for creating CephFS PVC in a subvolumeGroup +* `--rgw-realm-name`: (optional) Provides the name of the rgw-realm +* `--rgw-zone-name`: (optional) Provides the name of the rgw-zone +* `--rgw-zonegroup-name`: (optional) Provides the name of the rgw-zone-group +* `--upgrade`: (optional) Upgrades the cephCSIKeyrings(For example: client.csi-cephfs-provisioner) and client.healthchecker ceph users with new permissions needed for the new cluster version and older permission will still be applied. +* `--restricted-auth-permission`: (optional) Restrict cephCSIKeyrings auth permissions to specific pools, and cluster. Mandatory flags that need to be set are `--rbd-data-pool-name`, and `--k8s-cluster-name`. `--cephfs-filesystem-name` flag can also be passed in case of CephFS user restriction, so it can restrict users to particular CephFS filesystem. +* `--v2-port-enable`: (optional) Enables the v2 mon port (3300) for mons. +* `--topology-pools`: (optional) Comma-separated list of topology-constrained rbd pools +* `--topology-failure-domain-label`: (optional) K8s cluster failure domain label (example: zone, rack, or host) for the topology-pools that match the ceph domain +* `--topology-failure-domain-values`: (optional) Comma-separated list of the k8s cluster failure domain values corresponding to each of the pools in the `topology-pools` list +* `--config-file`: Path to the configuration file, Priority: command-line-args > config.ini values > default values + +## 2. Copy the bash output + +Example Output: + +```console +export ROOK_EXTERNAL_FSID=797f411a-aafe-11ec-a254-fa163e1539f5 +export ROOK_EXTERNAL_USERNAME=client.healthchecker +export ROOK_EXTERNAL_CEPH_MON_DATA=ceph-rados-upstream-w4pdvq-node1-installer=10.0.210.83:6789 +export ROOK_EXTERNAL_USER_SECRET=AQAdm0FilZDSJxAAMucfuu/j0ZYYP4Bia8Us+w== +export ROOK_EXTERNAL_DASHBOARD_LINK=https://10.0.210.83:8443/ +export CSI_RBD_NODE_SECRET=AQC1iDxip45JDRAAVahaBhKz1z0WW98+ACLqMQ== +export CSI_RBD_PROVISIONER_SECRET=AQC1iDxiMM+LLhAA0PucjNZI8sG9Eh+pcvnWhQ== +export MONITORING_ENDPOINT=10.0.210.83 +export MONITORING_ENDPOINT_PORT=9283 +export RBD_POOL_NAME=replicated_2g +export RGW_POOL_PREFIX=default +``` + +## Examples on utilizing Advance flags + +### Config-file + +Use the config file to set the user configuration file, add the flag `--config-file` to set the file path. + +Example: + +`/config.ini` + +```console +[Configurations] +format = bash +cephfs-filesystem-name = +rbd-data-pool-name = +... +``` + +```console +python3 create-external-cluster-resources.py --config-file /config.ini +``` + +!!! note + You can use both config file and other arguments at the same time + Priority: command-line-args has more priority than config.ini file values, and config.ini file values have more priority than default values. + +### Multi-tenancy + +To enable multi-tenancy, run the script with the `--restricted-auth-permission` flag and pass the mandatory flags with it, +It will generate the secrets which you can use for creating new `Consumer cluster` deployment using the same `Provider cluster`(ceph cluster). +So you would be running different isolated consumer clusters on top of single `Provider cluster`. + +!!! note + Restricting the csi-users per pool, and per cluster will require creating new csi-users and new secrets for that csi-users. + So apply these secrets only to new `Consumer cluster` deployment while using the same `Provider cluster`. + +```console +python3 create-external-cluster-resources.py --cephfs-filesystem-name --rbd-data-pool-name --k8s-cluster-name --restricted-auth-permission true --format --rgw-endpoint --namespace +``` + +### RGW Multisite + +Pass the `--rgw-realm-name`, `--rgw-zonegroup-name` and `--rgw-zone-name` flags to create the admin ops user in a master zone, zonegroup and realm. +See the [Multisite doc](https://docs.ceph.com/en/quincy/radosgw/multisite/#configuring-a-master-zone) for creating a zone, zonegroup and realm. + +```console +python3 create-external-cluster-resources.py --rbd-data-pool-name --format bash --rgw-endpoint --rgw-realm-name > --rgw-zonegroup-name --rgw-zone-name > +``` + +### Topology Based Provisioning + +Enable Topology Based Provisioning for RBD pools by passing `--topology-pools`, `--topology-failure-domain-label` and `--topology-failure-domain-values` flags. +A new storageclass named `ceph-rbd-topology` will be created by the import script with `volumeBindingMode: WaitForFirstConsumer`. +The storageclass is used to create a volume in the pool matching the topology where a pod is scheduled. + +For more details, see the [Topology-Based Provisioning](topology-for-external-mode.md) + +### Connect to v2 mon port + +If encryption or compression on the wire is needed, specify the `--v2-port-enable` flag. +If the v2 address type is present in the `ceph quorum_status`, then the output of 'ceph mon data' i.e, `ROOK_EXTERNAL_CEPH_MON_DATA` will use the v2 port(`3300`). diff --git a/Documentation/CRDs/Cluster/external-cluster/upgrade-external.md b/Documentation/CRDs/Cluster/external-cluster/upgrade-external.md new file mode 100644 index 000000000000..7ee3110ca525 --- /dev/null +++ b/Documentation/CRDs/Cluster/external-cluster/upgrade-external.md @@ -0,0 +1,58 @@ +# External Cluster Upgrades + +When upgrading an external cluster, Ceph and Rook versions will be updated independently. During the Rook update, the external provider cluster connection also needs to be updated with any settings and permissions for new features. + +## Upgrade the cluster to consume latest ceph user caps (mandatory) + +Upgrading the cluster would be different for restricted caps and non-restricted caps, + +1. If consumer cluster doesn't have restricted caps, this will upgrade all the default CSI users (non-restricted) + + ```console + python3 create-external-cluster-resources.py --upgrade + ``` + +2. If the consumer cluster has restricted caps + + Restricted users created using `--restricted-auth-permission` flag need to pass mandatory flags: '`--rbd-data-pool-name`(if it is a rbd user), `--k8s-cluster-name` and `--run-as-user`' flags while upgrading, in case of cephfs users if you have passed `--cephfs-filesystem-name` flag while creating CSI users then while upgrading it will be mandatory too. In this example the user would be `client.csi-rbd-node-rookstorage-replicapool` (following the pattern `csi-user-clusterName-poolName`) + + ```console + python3 create-external-cluster-resources.py --upgrade --rbd-data-pool-name replicapool --k8s-cluster-name rookstorage --run-as-user client.csi-rbd-node-rookstorage-replicapool + ``` + + !!! note + 1) An existing non-restricted user cannot be converted to a restricted user by upgrading. + 2) The upgrade flag should only be used to append new permissions to users. It shouldn't be used for changing a CSI user already applied permissions. For example, be careful not to change pools(s) that a user has access to. + +## Upgrade cluster to utilize a new feature (optional) + +Some Rook upgrades may require re-running the import steps, or may introduce new external cluster features that can be most easily enabled by re-running the import steps. + +To re-run the import steps with new options, the python script should be re-run using the same configuration options that were used for past invocations, plus the configurations that are being added or modified. + +Starting with Rook v1.15, the script stores the configuration in the external-cluster-user-command configmap for easy future reference. + +* arg: Exact arguments that were used for for processing the script. +Argument that are decided using the Priority: command-line-args has more priority than config.ini file values, and config.ini file values have more priority than default values. + +### Example `external-cluster-user-command` ConfigMap: + +1. Get the last-applied config, if its available + + ```console + $ kubectl get configmap -namespace rook-ceph external-cluster-user-command --output jsonpath='{.data.args}' + ``` + +2. Copy the output to config.ini + +3. Make any desired modifications and additions to `config.ini`` + +4. Run the python script again using the [config file](/Documentation/CRDs/Cluster/external-cluster/provider-export.md#config-file) + +5. [Copy the bash output](/Documentation/CRDs/Cluster/external-cluster/provider-export.md#2-copy-the-bash-output) + +6. [Import-the-provider-data](/Documentation/CRDs/Cluster/external-cluster/consumer-import.md#import-the-provider-data) + +!!! warning + If the last-applied config is unavailable, run the current version of the script again using previously-applied config and CLI flags. + Failure to reuse the same configuration options when re-invoking the python script can result in unexpected changes when re-running the import script. From 166e4f35b2364121403b1c5a2d55e02e06482056 Mon Sep 17 00:00:00 2001 From: parth-gr Date: Fri, 20 Sep 2024 15:27:12 +0530 Subject: [PATCH 09/13] csi: fix the disable driver flag in the csi driver reconcile ROOK_CSI_DISABLE_DRIVER was not working accurate from https://github.com/rook/rook/pull/14489 The csi driver was installed even if its not expected Signed-off-by: parth-gr --- pkg/operator/ceph/csi/controller.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/operator/ceph/csi/controller.go b/pkg/operator/ceph/csi/controller.go index b93fe7a09bb8..31c9d7924a0f 100644 --- a/pkg/operator/ceph/csi/controller.go +++ b/pkg/operator/ceph/csi/controller.go @@ -332,8 +332,7 @@ func (r *ReconcileCSI) reconcile(request reconcile.Request) (reconcile.Result, e } } - if !EnableCSIOperator() { - + if !disableCSI && !EnableCSIOperator() { err = r.validateAndConfigureDrivers(serverVersion, ownerInfo) if err != nil { return opcontroller.ImmediateRetryResult, errors.Wrap(err, "failed to configure ceph csi") From 33c9bdf652d02b8d9013c16fa0e8dc51c0fe7236 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:24:01 +0000 Subject: [PATCH 10/13] build(deps): bump github/codeql-action from 3.26.7 to 3.26.8 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.7 to 3.26.8. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/8214744c546c1e5c8f03dde8fab3a7353211988d...294a9d92911152fe08befb9ec03e240add280cb3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/scorecards.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 2a8dca108edb..3e68e8d803cb 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -64,6 +64,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard (optional). # Commenting out will disable upload of results to your repo's Code Scanning dashboard - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7 + uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8 with: sarif_file: results.sarif From 9ecd6a250003eec0f127409ae43b8cd872790ad9 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 20 Sep 2024 13:52:42 +0200 Subject: [PATCH 11/13] build: support golang 1.23 Signed-off-by: Michael Adam --- .github/workflows/build.yml | 2 +- build/makelib/golang.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d7b9462dd49..844c71b7cb0e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,7 +71,7 @@ jobs: strategy: fail-fast: false matrix: - go-version: ["1.22"] + go-version: ["1.22", "1.23"] steps: - name: checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/build/makelib/golang.mk b/build/makelib/golang.mk index e1ae8468e0af..44814e2b577a 100644 --- a/build/makelib/golang.mk +++ b/build/makelib/golang.mk @@ -48,7 +48,7 @@ GO_TEST_FLAGS ?= # ==================================================================================== # Setup go environment -GO_SUPPORTED_VERSIONS ?= 1.22 +GO_SUPPORTED_VERSIONS ?= 1.22|1.23 GO_PACKAGES := $(foreach t,$(GO_SUBDIRS),$(GO_PROJECT)/$(t)/...) GO_INTEGRATION_TEST_PACKAGES := $(foreach t,$(GO_INTEGRATION_TESTS_SUBDIRS),$(GO_PROJECT)/$(t)/integration) From b818dd1c7d3fdf90532d23e23dd401c4bb5be172 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Tue, 24 Sep 2024 16:59:13 +0530 Subject: [PATCH 12/13] build: keep specific z version in go mod 1.22.5 let's keep specific z version in go.mod 1.22.5. Signed-off-by: subhamkrai --- go.mod | 6 +++--- go.sum | 8 ++++---- pkg/apis/go.mod | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index add877c686ef..306f52aff40f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/rook/rook -go 1.22.6 +go 1.22.5 toolchain go1.22.7 @@ -18,10 +18,10 @@ require ( github.com/IBM/keyprotect-go-client v0.15.1 github.com/aws/aws-sdk-go v1.55.5 github.com/banzaicloud/k8s-objectmatcher v1.8.0 - github.com/ceph/ceph-csi-operator/api v0.0.0-20240819112305-88e6db254d6c + github.com/ceph/ceph-csi-operator/api v0.0.0-20240918113437-f3030b0ac9f4 github.com/ceph/go-ceph v0.29.0 github.com/coreos/pkg v0.0.0-20230601102743-20bbbf26f4d8 - github.com/csi-addons/kubernetes-csi-addons v0.10.0 + github.com/csi-addons/kubernetes-csi-addons v0.10.1-0.20240924092040-c11db0b867a1 github.com/gemalto/kmip-go v0.0.10 github.com/go-ini/ini v1.67.0 github.com/google/go-cmp v0.6.0 diff --git a/go.sum b/go.sum index b58bb5fb030f..35c658de2e3a 100644 --- a/go.sum +++ b/go.sum @@ -165,8 +165,8 @@ github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4r github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/ceph/ceph-csi-operator/api v0.0.0-20240819112305-88e6db254d6c h1:JOhwt7+iM18pm9s9zAhAKGRJm615AdIaKklbUd7Z8So= -github.com/ceph/ceph-csi-operator/api v0.0.0-20240819112305-88e6db254d6c/go.mod h1:odEUoarG26wXBCC2l4O4nMWhAz6VTKr2FRkv9yELgi8= +github.com/ceph/ceph-csi-operator/api v0.0.0-20240918113437-f3030b0ac9f4 h1:VYmHuPxEeiZ9jusRzgGybte2ByOUxAD0btQ0Wvac4VA= +github.com/ceph/ceph-csi-operator/api v0.0.0-20240918113437-f3030b0ac9f4/go.mod h1:odEUoarG26wXBCC2l4O4nMWhAz6VTKr2FRkv9yELgi8= github.com/ceph/ceph-csi/api v0.0.0-20231227104434-06f9a98b7a83 h1:xWhLO5MR+diAsZoOcPe0zVe+JcJrqMaVbScShye6pXw= github.com/ceph/ceph-csi/api v0.0.0-20231227104434-06f9a98b7a83/go.mod h1:ZSvtS90FCB/becFi/rjy85sSw1igchaWZfUigxN9FxY= github.com/ceph/go-ceph v0.29.0 h1:pJQY+++PyY2FMP0ffVaE7FbIdivemBPCu4MWr4S8CtI= @@ -214,8 +214,8 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/csi-addons/kubernetes-csi-addons v0.10.0 h1:bBc6nb1oROz4RLhqoLFNeGymk2jIRXcx7LvAup9+3Jg= -github.com/csi-addons/kubernetes-csi-addons v0.10.0/go.mod h1:nqi369YuYMIdysBbHjtYJcWFpcxujPot1HS6tnNWBV4= +github.com/csi-addons/kubernetes-csi-addons v0.10.1-0.20240924092040-c11db0b867a1 h1:9mh79gS8O8uO5okZ2DhFO0LSrhpVXd9R9DLvbnh2He4= +github.com/csi-addons/kubernetes-csi-addons v0.10.1-0.20240924092040-c11db0b867a1/go.mod h1:LeY7UYm8nEBCG1RcJG0DHmJbva0ILmtp+kcegxRuHhc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= diff --git a/pkg/apis/go.mod b/pkg/apis/go.mod index 0230510aa324..2626abd58642 100644 --- a/pkg/apis/go.mod +++ b/pkg/apis/go.mod @@ -1,6 +1,6 @@ module github.com/rook/rook/pkg/apis -go 1.22.6 +go 1.22.5 toolchain go1.22.7 From f7cb8a2e081cb6c90f67a8364a59e811d9df0943 Mon Sep 17 00:00:00 2001 From: Ceph Jenkins Date: Tue, 24 Sep 2024 09:30:59 -0400 Subject: [PATCH 13/13] csv: add additional csv changes that other commits bring add generated csv changes Signed-off-by: Ceph Jenkins --- build/csv/ceph/ceph.rook.io_cephclusters.yaml | 11 + ...al-cluster-script-config_v1_configmap.yaml | 3189 +++++++++-------- ...k-ceph-operator.clusterserviceversion.yaml | 3189 +++++++++-------- 3 files changed, 3205 insertions(+), 3184 deletions(-) diff --git a/build/csv/ceph/ceph.rook.io_cephclusters.yaml b/build/csv/ceph/ceph.rook.io_cephclusters.yaml index db2978259122..862a6f38ace2 100644 --- a/build/csv/ceph/ceph.rook.io_cephclusters.yaml +++ b/build/csv/ceph/ceph.rook.io_cephclusters.yaml @@ -843,6 +843,17 @@ spec: properties: enabled: type: boolean + exporter: + properties: + perfCountersPrioLimit: + default: 5 + format: int64 + type: integer + statsPeriodSeconds: + default: 5 + format: int64 + type: integer + type: object externalMgrEndpoints: items: properties: diff --git a/build/csv/ceph/rook-ceph-external-cluster-script-config_v1_configmap.yaml b/build/csv/ceph/rook-ceph-external-cluster-script-config_v1_configmap.yaml index f1e95f9061d1..6a28b767f694 100644 --- a/build/csv/ceph/rook-ceph-external-cluster-script-config_v1_configmap.yaml +++ b/build/csv/ceph/rook-ceph-external-cluster-script-config_v1_configmap.yaml @@ -74,1473 +74,1466 @@ data: bGxvdyByLCBhbGxvdyBjb21tYW5kIHF1b3J1bV9zdGF0dXMiLCAib3NkIiwgInByb2ZpbGUgcmJk LXJlYWQtb25seSwgYWxsb3cgcnd4IHBvb2w9ZGVmYXVsdC5yZ3cubWV0YSwgYWxsb3cgciBwb29s PS5yZ3cucm9vdCwgYWxsb3cgcncgcG9vbD1kZWZhdWx0LnJndy5jb250cm9sLCBhbGxvdyB4IHBv - b2w9ZGVmYXVsdC5yZ3cuYnVja2V0cy5pbmRleCJdLCAiZW50aXR5IjogImNsaWVudC5oZWFsdGhj - aGVja2VyIiwgImZvcm1hdCI6ICJqc29uIiwgInByZWZpeCI6ICJhdXRoIGdldC1vci1jcmVhdGUi - fSIiIgogICAgICAgIF0gPSAiIiJbeyJlbnRpdHkiOiJjbGllbnQuaGVhbHRoY2hlY2tlciIsImtl - eSI6IkFRREZrYk5lZnQ1YkZSQUFUbmRMTlVTRUtydW96eGlaaTNscmRBPT0iLCJjYXBzIjp7Im1v - biI6ImFsbG93IHIsIGFsbG93IGNvbW1hbmQgcXVvcnVtX3N0YXR1cyIsIm9zZCI6InByb2ZpbGUg - cmJkLXJlYWQtb25seSwgYWxsb3cgcnd4IHBvb2w9ZGVmYXVsdC5yZ3cubWV0YSwgYWxsb3cgciBw - b29sPS5yZ3cucm9vdCwgYWxsb3cgcncgcG9vbD1kZWZhdWx0LnJndy5jb250cm9sLCBhbGxvdyB4 - IHBvb2w9ZGVmYXVsdC5yZ3cuYnVja2V0cy5pbmRleCJ9fV0iIiIKICAgICAgICBzZWxmLmNtZF9v - dXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7ImNhcHMiOiBbIm1vbiIsICJwcm9maWxlIHJiZCwg - YWxsb3cgY29tb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UifSIiIgogICAgICAgIF0gPSAiIiJbeyJlbnRpdHkiOiJj + bGllbnQuY3NpLXJiZC1wcm92aXNpb25lciIsImtleSI6IkFRQk5nck5lMWdleUt4QUE4ZWtWaVJk + RStoc3M1T3dlWUJrd05nPT0iLCJjYXBzIjp7Im1nciI6ImFsbG93IHJ3IiwibW9uIjoicHJvZmls + ZSByYmQsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xpc3QnIiwib3NkIjoicHJvZmlsZSByYmQi + fX1dIiIiCiAgICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsKICAgICAgICAgICAgIiIieyJjYXBz + IjogWyJtb24iLCAiYWxsb3cgciwgYWxsb3cgY29tbWFuZCAnb3NkIGJsb2NrbGlzdCciLCAibWdy + IiwgImFsbG93IHJ3IiwgIm9zZCIsICJhbGxvdyBydyB0YWcgY2VwaGZzICo9KiIsICJtZHMiLCAi + YWxsb3cgcnciXSwgImVudGl0eSI6ICJjbGllbnQuY3NpLWNlcGhmcy1ub2RlIiwgImZvcm1hdCI6 + ICJqc29uIiwgInByZWZpeCI6ICJhdXRoIGdldC1vci1jcmVhdGUifSIiIgogICAgICAgIF0gPSAi + IiJbeyJlbnRpdHkiOiJjbGllbnQuY3NpLWNlcGhmcy1ub2RlIiwia2V5IjoiQVFCT2dyTmVFTnVu + S3hBQVBDbWdFN1I2RzhEY1huYUoxRjMycWc9PSIsImNhcHMiOnsibWRzIjoiYWxsb3cgcnciLCJt + Z3IiOiJhbGxvdyBydyIsIm1vbiI6ImFsbG93IHIsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xp + c3QnIiwib3NkIjoiYWxsb3cgcncgdGFnIGNlcGhmcyAqPSoifX1dIiIiCiAgICAgICAgc2VsZi5j + bWRfb3V0cHV0X21hcFsKICAgICAgICAgICAgIiIieyJjYXBzIjogWyJtb24iLCAiYWxsb3cgciwg + YWxsb3cgY29tbWFuZCAnb3NkIGJsb2NrbGlzdCciLCAibWdyIiwgImFsbG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0LnJndy5tZXRhLCBhbGxvdyByIHBvb2w9LnJndy5yb290LCBhbGxvdyBydyBw - b29sPWRlZmF1bHQucmd3LmNvbnRyb2wsIGFsbG93IHJ4IHBvb2w9ZGVmYXVsdC5yZ3cubG9nLCBh - bGxvdyB4IHBvb2w9ZGVmYXVsdC5yZ3cuYnVja2V0cy5pbmRleCJ9fV0iIiIKICAgICAgICBzZWxm - LmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7ImVudGl0eSI6ICJjbGllbnQuY3NpLWNl - cGhmcy1ub2RlIiwgImZvcm1hdCI6ICJqc29uIiwgInByZWZpeCI6ICJhdXRoIGdldCJ9IiIiCiAg - ICAgICAgXSA9ICIiIltdIiIiCiAgICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsKICAgICAgICAg - ICAgIiIieyJlbnRpdHkiOiAiY2xpZW50LmNzaS1yYmQtbm9kZSIsICJmb3JtYXQiOiAianNvbiIs - ICJwcmVmaXgiOiAiYXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJbXSIiIgogICAgICAgIHNl - bGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiZW50aXR5IjogImNsaWVudC5jc2kt - cmJkLXByb3Zpc2lvbmVyIiwgImZvcm1hdCI6ICJqc29uIiwgInByZWZpeCI6ICJhdXRoIGdldCJ9 - IiIiCiAgICAgICAgXSA9ICIiIltdIiIiCiAgICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsKICAg - ICAgICAgICAgIiIieyJlbnRpdHkiOiAiY2xpZW50LmNzaS1jZXBoZnMtcHJvdmlzaW9uZXIiLCAi - Zm9ybWF0IjogImpzb24iLCAicHJlZml4IjogImF1dGggZ2V0In0iIiIKICAgICAgICBdID0gIiIi - W10iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7ImVudGl0 - eSI6ICJjbGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lci1vcGVuc2hpZnQtc3RvcmFnZSIsICJm - b3JtYXQiOiAianNvbiIsICJwcmVmaXgiOiAiYXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJb - XSIiIgogICAgICAgIHNlbGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiZW50aXR5 - IjogImNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lvbmVyLW9wZW5zaGlmdC1zdG9yYWdlLW15ZnMi - LCAiZm9ybWF0IjogImpzb24iLCAicHJlZml4IjogImF1dGggZ2V0In0iIiIKICAgICAgICBdID0g - IiIiW10iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7ImVu - dGl0eSI6ICJjbGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciIsICJmb3JtYXQiOiAianNvbiIs - ICJwcmVmaXgiOiAiYXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJbeyJlbnRpdHkiOiJjbGll - bnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciIsImtleSI6IkFRREZrYk5lZnQ1YkZSQUFUbmRMTlVT - RUtydW96eGlaaTNscmRBPT0iLCJjYXBzIjp7Im1vbiI6ImFsbG93IHIiLCAibWdyIjoiYWxsb3cg - cnciLCAib3NkIjoiYWxsb3cgcncgdGFnIGNlcGhmcyBtZXRhZGF0YT0qIn19XSIiIgogICAgICAg - IHNlbGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiY2FwcyI6IFsibW9uIiwgImFs - bG93IHIsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xpc3QnIiwgIm1nciIsICJhbGxvdyBydyIs - ICJvc2QiLCAiYWxsb3cgcncgdGFnIGNlcGhmcyBtZXRhZGF0YT0qIl0sICJlbnRpdHkiOiAiY2xp - ZW50LmNzaS1jZXBoZnMtcHJvdmlzaW9uZXIiLCAiZm9ybWF0IjogImpzb24iLCAicHJlZml4Ijog - ImF1dGggY2FwcyJ9IiIiCiAgICAgICAgXSA9ICIiIlt7ImVudGl0eSI6ImNsaWVudC5jc2ktY2Vw - aGZzLXByb3Zpc2lvbmVyIiwia2V5IjoiQVFERmtiTmVmdDViRlJBQVRuZExOVVNFS3J1b3p4aVpp - M2xyZEE9PSIsImNhcHMiOnsibW9uIjoiYWxsb3cgciwgIGFsbG93IGNvbW1hbmQgJ29zZCBibG9j - a2xpc3QnIiwgIm1nciI6ImFsbG93IHJ3IiwgIm9zZCI6ImFsbG93IHJ3IHRhZyBjZXBoZnMgbWV0 - YWRhdGE9KiJ9fV0iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWyd7ImZvcm1hdCI6ICJq - c29uIiwgInByZWZpeCI6ICJzdGF0dXMifSddID0gY2VwaF9zdGF0dXNfc3RyCgogICAgZGVmIHNo - dXRkb3duKHNlbGYpOgogICAgICAgIHBhc3MKCiAgICBkZWYgZ2V0X2ZzaWQoc2VsZik6CiAgICAg - ICAgcmV0dXJuICJhZjRlMTY3My0wYjcyLTQwMmQtOTkwYS0yMmQyOTE5ZDBmMWMiCgogICAgZGVm - IGNvbmZfcmVhZF9maWxlKHNlbGYpOgogICAgICAgIHBhc3MKCiAgICBkZWYgY29ubmVjdChzZWxm - KToKICAgICAgICBwYXNzCgogICAgZGVmIHBvb2xfZXhpc3RzKHNlbGYsIHBvb2xfbmFtZSk6CiAg - ICAgICAgcmV0dXJuIFRydWUKCiAgICBkZWYgbW9uX2NvbW1hbmQoc2VsZiwgY21kLCBvdXQpOgog - ICAgICAgIGpzb25fY21kID0ganNvbi5sb2FkcyhjbWQpCiAgICAgICAganNvbl9jbWRfc3RyID0g - anNvbi5kdW1wcyhqc29uX2NtZCwgc29ydF9rZXlzPVRydWUpCiAgICAgICAgY21kX291dHB1dCA9 - IHNlbGYuY21kX291dHB1dF9tYXBbanNvbl9jbWRfc3RyXQogICAgICAgIHJldHVybiBzZWxmLnJl - dHVybl92YWwsIGNtZF9vdXRwdXQsIHN0cihz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aW5nLmVuY29kZSgi - dXRmLTgiKQogICAgICAgIGggPSBobWFjLm5ldyhrZXksIG1zZywgZGlnZXN0bW9kPXNoYSkKICAg - ICAgICByZXR1cm4gZW5jb2Rlc3RyaW5nKGguZGlnZXN0KCkpLnN0cmlwKCkKCiAgICBkZWYgZ2V0 - X2Nhbm9uaWNhbF9zdHJpbmcoc2VsZiwgdXJsLCBoZWFkZXJzLCBtZXRob2QpOgogICAgICAgIHBh - cnNlZHVybCA9IHVybHBhcnNlKHVybCkKICAgICAgICBvYmplY3RrZXkgPSBwYXJzZWR1cmwucGF0 - aFsxOl0KCiAgICAgICAgYnVja2V0ID0gcGFyc2VkdXJsLm5ldGxvY1s6IC1sZW4oc2VsZi5zZXJ2 - aWNlX2Jhc2VfdXJsKV0KICAgICAgICBpZiBsZW4oYnVja2V0KSA+IDE6CiAgICAgICAgICAgICMg - cmVtb3ZlIGxhc3QgZG90CiAgICAgICAgICAgIGJ1Y2tldCA9IGJ1Y2tldFs6LTFdCgogICAgICAg - IGludGVyZXN0aW5nX2hlYWRlcnMgPSB7ImNvbnRlbnQtbWQ1IjogIiIsICJjb250ZW50LXR5cGUi - OiAiIiwgImRhdGUiOiAiIn0KICAgICAgICBmb3Iga2V5IGluIGhlYWRlcnM6CiAgICAgICAgICAg - IGxrID0ga2V5Lmxvd2VyKCkKICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgbGsgPSBs - ay5kZWNvZGUoInV0Zi04IikKICAgICAgICAgICAgZXhjZXB0OgogICAgICAgICAgICAgICAgcGFz - cwogICAgICAgICAgICBpZiBoZWFkZXJzW2tleV0gYW5kICgKICAgICAgICAgICAgICAgIGxrIGlu - IGludGVyZXN0aW5nX2hlYWRlcnMua2V5cygpIG9yIGxrLnN0YXJ0c3dpdGgoIngtYW16LSIpCiAg - ICAgICAgICAgICk6CiAgICAgICAgICAgICAgICBpbnRlcmVzdGluZ19oZWFkZXJzW2xrXSA9IGhl - YWRlcnNba2V5XS5zdHJpcCgpCgogICAgICAgICMgSWYgeC1hbXotZGF0ZSBpcyB1c2VkIGl0IHN1 - cGVyc2VkZXMgdGhlIGRhdGUgaGVhZGVyLgogICAgICAgIGlmICJ4LWFtei1kYXRlIiBpbiBpbnRl - cmVzdGluZ19oZWFkZXJzOgogICAgICAgICAgICBpbnRlcmVzdGluZ19oZWFkZXJzWyJkYXRlIl0g - PSAiIgoKICAgICAgICBidWYgPSBmInttZXRob2R9XG4iCiAgICAgICAgZm9yIGtleSBpbiBzb3J0 - ZWQoaW50ZXJlc3RpbmdfaGVhZGVycy5rZXlzKCkpOgogICAgICAgICAgICB2YWwgPSBpbnRlcmVz - dGluZ19oZWFkZXJzW2tleV0KICAgICAgICAgICAgaWYga2V5LnN0YXJ0c3dpdGgoIngtYW16LSIp - OgogICAgICAgICAgICAgICAgYnVmICs9IGYie2tleX06e3ZhbH1cbiIKICAgICAgICAgICAgZWxz - ZToKICAgICAgICAgICAgICAgIGJ1ZiArPSBmInt2YWx9XG4iCgogICAgICAgICMgYXBwZW5kIHRo - ZSBidWNrZXQgaWYgaXQgZXhpc3RzCiAgICAgICAgaWYgYnVja2V0ICE9ICIiOgogICAgICAgICAg - ICBidWYgKz0gZiIve2J1Y2tldH0iCgogICAgICAgICMgYWRkIHRoZSBvYmplY3RrZXkuIGV2ZW4g - aWYgaXQgZG9lc24ndCBleGlzdCwgYWRkIHRoZSBzbGFzaAogICAgICAgIGJ1ZiArPSBmIi97b2Jq - ZWN0a2V5fSIKCiAgICAgICAgcmV0dXJuIGJ1ZgoKCmNsYXNzIFJhZG9zSlNPTjoKICAgIEVYVEVS - TkFMX1VTRVJfTkFNRSA9ICJjbGllbnQuaGVhbHRoY2hlY2tlciIKICAgIEVYVEVSTkFMX1JHV19B - RE1JTl9PUFNfVVNFUl9OQU1FID0gInJndy1hZG1pbi1vcHMtdXNlciIKICAgIEVNUFRZX09VVFBV - VF9MSVNUID0gIkVtcHR5IG91dHB1dCBsaXN0IgogICAgREVGQVVMVF9SR1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Xhl - ZCBieSAnY2xpZW50LiciLAogICAgICAgICkKICAgICAgICBjb21tb25fZ3JvdXAuYWRkX2FyZ3Vt - ZW50KAogICAgICAgICAgICAiLS1jbHVzdGVyLW5hbWUiLAogICAgICAgICAgICBkZWZhdWx0PSIi - LAogICAgICAgICAgICBoZWxwPSJLdWJlcm5ldGVzIGNsdXN0ZXIgbmFtZShsZWdhY3kgZmxhZyks - IE5vdGU6IEVpdGhlciB1c2UgdGhpcyBvciAtLWs4cy1jbHVzdGVyLW5hbWUiLAogICAgICAgICkK - ICAgICAgICBjb21tb25fZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1rOHMtY2x1 - c3Rlci1uYW1lIiwgZGVmYXVsdD0iIiwgaGVscD0iS3ViZXJuZXRlcyBjbHVzdGVyIG5hbWUiCiAg - ICAgICAgKQogICAgICAgIGNvbW1vbl9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICIt - LW5hbWVzcGFjZSIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIGhlbHA9Ik5h - bWVzcGFjZSB3aGVyZSBDZXBoQ2x1c3RlciBpcyBydW5uaW5nIiwKICAgICAgICApCiAgICAgICAg - Y29tbW9uX2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmd3LXBvb2wtcHJlZml4 - IiwgZGVmYXVsdD0iIiwgaGVscD0iUkdXIFBvb2wgcHJlZml4IgogICAgICAgICkKICAgICAgICBj - b21tb25fZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1yZXN0cmljdGVkLWF1dGgt - cGVybWlzc2lvbiIsCiAgICAgICAgICAgIGRlZmF1bHQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9 - IlJlc3RyaWN0IGNlcGhDU0lLZXlyaW5ncyBhdXRoIHBlcm1pc3Npb25zIHRvIHNwZWNpZmljIHBv - b2xzLCBjbHVzdGVyLiIKICAgICAgICAg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ICItLXYyLXBvcnQtZW5hYmxlIiwKICAgICAgICAgICAgYWN0aW9uPSJzdG9y - ZV90cnVlIiwKICAgICAgICAgICAgZGVmYXVsdD1GYWxzZSwKICAgICAgICAgICAgaGVscD0iRW5h - YmxlIHYyIG1vbiBwb3J0KDMzMDApIGZvciBtb25zIiwKICAgICAgICApCgogICAgICAgIG91dHB1 - dF9ncm91cCA9IGFyZ1AuYWRkX2FyZ3VtZW50X2dyb3VwKCJvdXRwdXQiKQogICAgICAgIG91dHB1 - dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLWZvcm1hdCIsCiAgICAgICAgICAg - ICItdCIsCiAgICAgICAgICAgIGNob2ljZXM9WyJqc29uIiwgImJhc2giXSwKICAgICAgICAgICAg - ZGVmYXVsdD0ianNvbiIsCiAgICAgICAgICAgIGhlbHA9IlByb3ZpZGVzIHRoZSBvdXRwdXQgZm9y - bWF0IChqc29uIHwgYmFzaCkiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2Fy - Z3VtZW50KAogICAgICAgICAgICAiLS1vdXRwdXQiLAogICAgICAgICAgICAiLW8iLAogICAgICAg - ICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICBoZWxwPSJPdXRwdXQgd2lsbCBiZSBzdG9yZWQg - aW50byB0aGUgcHJvdmlkZWQgZmlsZSIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5h - ZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLWNlcGhmcy1maWxlc3lzdGVtLW5hbWUiLAogICAg - ICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyB0aGUgbmFtZSBv - ZiB0aGUgQ2VwaCBmaWxlc3lzdGVtIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFk - ZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tY2VwaGZzLW1ldGFkYXRhLXBvb2wtbmFtZSIsCiAg - ICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIGhlbHA9IlByb3ZpZGVzIHRoZSBuYW1l - IG9mIHRoZSBjZXBoZnMgbWV0YWRhdGEgcG9vbCIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9n - cm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLWNlcGhmcy1kYXRhLXBvb2wtbmFtZSIs - CiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIGhlbHA9IlByb3ZpZGVzIHRoZSBu - YW1lIG9mIHRoZSBjZXBoZnMgZGF0YSBwb29sIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dy - b3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmJkLWRhdGEtcG9vbC1uYW1lIiwKICAg - ICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAgICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAg - ICAgIGhlbHA9IlByb3ZpZGVzIHRoZSBuYW1lIG9mIHRoZSBSQkQgZGF0YXBvb2wiLAogICAgICAg - ICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1hbGlh - cy1yYmQtZGF0YS1wb29sLW5hbWUiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAg - ICByZXF1aXJlZD1GYWxzZSwKICAgICAgICAgICAgaGVscD0iUHJvdmlkZXMgYW4gYWxpYXMgZm9y - IHRoZSAgUkJEIGRhdGEgcG9vbCBuYW1lLCBuZWNlc3NhcnkgaWYgYSBzcGVjaWFsIGNoYXJhY3Rl - ciBpcyBwcmVzZW50IGluIHRoZSBwb29sIG5hbWUgc3VjaCBhcyBhIHBlcmlvZCBvciB1bmRlcnNj - b3JlIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAg - ICAgICAgIi0tcmd3LWVuZHBvaW50IiwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAg - ICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9IlJBRE9TIEdhdGV3YXkgZW5kcG9p - bnQgKGluIGA8SVB2ND46PFBPUlQ+YCBvciBgPFtJUHY2XT46PFBPUlQ+YCBvciBgPEZRRE4+OjxQ - T1JUPmAgZm9ybWF0KSIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1l - bnQoCiAgICAgICAgICAgICItLXJndy10bHMtY2VydC1wYXRoIiwKICAgICAgICAgICAgZGVmYXVs - dD0iIiwKICAgICAgICAgICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9IlJBRE9T - IEdhdGV3YXkgZW5kcG9pbnQgVExTIGNlcnRpZmljYXRlIiwKICAgICAgICApCiAgICAgICAgb3V0 - cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmd3LXNraXAtdGxzIiwKICAg - ICAgICAgICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAgICAgIGRlZmF1bHQ9RmFsc2UsCiAgICAg - ICAgICAgIGhlbHA9Iklnbm9yZSBUTFMgY2VydGlmaWNhdGlvbiB2YWxpZGF0aW9uIHdoZW4gYSBz - ZWxmLXNpZ25lZCBjZXJ0aWZpY2F0ZSBpcyBwcm92aWRlZCAoTk9UIFJFQ09NTUVOREVEIiwKICAg - ICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0t - bW9uaXRvcmluZy1lbmRwb2ludCIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAg - IHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJDZXBoIE1hbmFnZXIgcHJvbWV0aGV1 - cyBleHBvcnRlciBlbmRwb2ludHMgKGNvbW1hIHNlcGFyYXRlZCBsaXN0IG9mIChmb3JtYXQgYDxJ - UHY0PmAgb3IgYDxbSVB2Nl0+YCBvciBgPEZRRE4+YCkgZW50cmllcyBvZiBhY3RpdmUgYW5kIHN0 - YW5kYnkgbWdycykiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50 - KAogICAgICAgICAgICAiLS1tb25pdG9yaW5nLWVuZHBvaW50LXBvcnQiLAogICAgICAgICAgICBk - ZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxzZSwKICAgICAgICAgICAgaGVscD0i - Q2VwaCBNYW5hZ2VyIHByb21ldGhldXMgZXhwb3J0ZXIgcG9ydCIsCiAgICAgICAgKQogICAgICAg - IG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXNraXAtbW9uaXRvcmlu - Zy1lbmRwb2ludCIsCiAgICAgICAgICAgIGRlZmF1bHQ9RmFsc2UsCiAgICAgICAgICAgIGFjdGlv - bj0ic3RvcmVfdHJ1ZSIsCiAgICAgICAgICAgIGhlbHA9IkRvIG5vdCBjaGVjayBmb3IgYSBtb25p - dG9yaW5nIGVuZHBvaW50IGZvciB0aGUgQ2VwaCBjbHVzdGVyIiwKICAgICAgICApCiAgICAgICAg - b3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmJkLW1ldGFkYXRhLWVj - LXBvb2wtbmFtZSIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVk - PUZhbHNlLAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyB0aGUgbmFtZSBvZiBlcmFzdXJlIGNv - ZGVkIFJCRCBtZXRhZGF0YSBwb29sIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFk - ZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tZHJ5LXJ1biIsCiAgICAgICAgICAgIGRlZmF1bHQ9 - RmFsc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3IHBvb2w9ZGVmYXVsdC5yZ3cuY29udHJvbCwgYWxsb3cgcnggcG9vbD1kZWZhdWx0 + LnJndy5sb2csIGFsbG93IHggcG9vbD1kZWZhdWx0LnJndy5idWNrZXRzLmluZGV4IiwibWRzIjoi + YWxsb3cgKiJ9fV0iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWyIiInsiZm9ybWF0Ijog + Impzb24iLCAicHJlZml4IjogIm1nciBzZXJ2aWNlcyJ9IiIiXSA9ICgKICAgICAgICAgICAgIiIi + eyJkYXNoYm9hcmQiOiAiaHR0cDovL3Jvb2stY2VwaC1tZ3ItYS01N2NmOWY4NGJjLWY0am5sOjcw + MDAvIiwgInByb21ldGhldXMiOiAiaHR0cDovL3Jvb2stY2VwaC1tZ3ItYS01N2NmOWY4NGJjLWY0 + am5sOjkyODMvIn0iIiIKICAgICAgICApCiAgICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsKICAg + ICAgICAgICAgIiIieyJlbnRpdHkiOiAiY2xpZW50LmhlYWx0aGNoZWNrZXIiLCAiZm9ybWF0Ijog + Impzb24iLCAicHJlZml4IjogImF1dGggZ2V0In0iIiIKICAgICAgICBdID0gIiIieyJkYXNoYm9h + cmQiOiAiaHR0cDovL3Jvb2stY2VwaC1tZ3ItYS01N2NmOWY4NGJjLWY0am5sOjcwMDAvIiwgInBy + b21ldGhldXMiOiAiaHR0cDovL3Jvb2stY2VwaC1tZ3ItYS01N2NmOWY4NGJjLWY0am5sOjkyODMv + In0iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7ImVudGl0 + eSI6ICJjbGllbnQuaGVhbHRoY2hlY2tlciIsICJmb3JtYXQiOiAianNvbiIsICJwcmVmaXgiOiAi + YXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJbeyJlbnRpdHkiOiJjbGllbnQuaGVhbHRoY2hl + Y2tlciIsImtleSI6IkFRREZrYk5lZnQ1YkZSQUFUbmRMTlVTRUtydW96eGlaaTNscmRBPT0iLCJj + YXBzIjp7Im1vbiI6ICJhbGxvdyByLCBhbGxvdyBjb21tYW5kIHF1b3J1bV9zdGF0dXMsIGFsbG93 + IGNvbW1hbmQgdmVyc2lvbiIsICJtZ3IiOiAiYWxsb3cgY29tbWFuZCBjb25maWciLCAib3NkIjog + InByb2ZpbGUgcmJkLXJlYWQtb25seSwgYWxsb3cgcnd4IHBvb2w9ZGVmYXVsdC5yZ3cubWV0YSwg + YWxsb3cgciBwb29sPS5yZ3cucm9vdCwgYWxsb3cgcncgcG9vbD1kZWZhdWx0LnJndy5jb250cm9s + LCBhbGxvdyByeCBwb29sPWRlZmF1bHQucmd3LmxvZywgYWxsb3cgeCBwb29sPWRlZmF1bHQucmd3 + LmJ1Y2tldHMuaW5kZXgiLCJtZHMiOiJhbGxvdyAqIn19XSIiIgogICAgICAgIHNlbGYuY21kX291 + dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiZW50aXR5IjogImNsaWVudC5jc2ktY2VwaGZzLW5v + ZGUiLCAiZm9ybWF0IjogImpzb24iLCAicHJlZml4IjogImF1dGggZ2V0In0iIiIKICAgICAgICBd + ID0gIiIiW10iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7 + ImVudGl0eSI6ICJjbGllbnQuY3NpLXJiZC1ub2RlIiwgImZvcm1hdCI6ICJqc29uIiwgInByZWZp + eCI6ICJhdXRoIGdldCJ9IiIiCiAgICAgICAgXSA9ICIiIltdIiIiCiAgICAgICAgc2VsZi5jbWRf + b3V0cHV0X21hcFsKICAgICAgICAgICAgIiIieyJlbnRpdHkiOiAiY2xpZW50LmNzaS1yYmQtcHJv + dmlzaW9uZXIiLCAiZm9ybWF0IjogImpzb24iLCAicHJlZml4IjogImF1dGggZ2V0In0iIiIKICAg + ICAgICBdID0gIiIiW10iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAg + ICAiIiJ7ImVudGl0eSI6ICJjbGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciIsICJmb3JtYXQi + OiAianNvbiIsICJwcmVmaXgiOiAiYXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJbXSIiIgog + ICAgICAgIHNlbGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiZW50aXR5IjogImNs + aWVudC5jc2ktY2VwaGZzLXByb3Zpc2lvbmVyLW9wZW5zaGlmdC1zdG9yYWdlIiwgImZvcm1hdCI6 + ICJqc29uIiwgInByZWZpeCI6ICJhdXRoIGdldCJ9IiIiCiAgICAgICAgXSA9ICIiIltdIiIiCiAg + ICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsKICAgICAgICAgICAgIiIieyJlbnRpdHkiOiAiY2xp + ZW50LmNzaS1jZXBoZnMtcHJvdmlzaW9uZXItb3BlbnNoaWZ0LXN0b3JhZ2UtbXlmcyIsICJmb3Jt + YXQiOiAianNvbiIsICJwcmVmaXgiOiAiYXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJbXSIi + IgogICAgICAgIHNlbGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiZW50aXR5Ijog + ImNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lvbmVyIiwgImZvcm1hdCI6ICJqc29uIiwgInByZWZp + eCI6ICJhdXRoIGdldCJ9IiIiCiAgICAgICAgXSA9ICIiIlt7ImVudGl0eSI6ImNsaWVudC5jc2kt + Y2VwaGZzLXByb3Zpc2lvbmVyIiwia2V5IjoiQVFERmtiTmVmdDViRlJBQVRuZExOVVNFS3J1b3p4 + aVppM2xyZEE9PSIsImNhcHMiOnsibW9uIjoiYWxsb3cgciIsICJtZ3IiOiJhbGxvdyBydyIsICJv + c2QiOiJhbGxvdyBydyB0YWcgY2VwaGZzIG1ldGFkYXRhPSoiLCJtZHMiOiJhbGxvdyAqIn19XSIi + IgogICAgICAgIHNlbGYuY21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b29sX25hbWUpOgogICAgICAgIHJldHVybiBU + cnVlCgogICAgZGVmIG1vbl9jb21tYW5kKHNlbGYsIGNtZCwgb3V0KToKICAgICAgICBqc29uX2Nt + ZCA9IGpzb24ubG9hZHMoY21kKQogICAgICAgIGpzb25fY21kX3N0ciA9IGpzb24uZHVtcHMoanNv + bl9jbWQsIHNvcnRfa2V5cz1UcnVlKQogICAgICAgIGNtZF9vdXRwdXQgPSBzZWxmLmNtZF9vdXRw + dXRfbWFwW2pzb25fY21kX3N0cl0KICAgICAgICByZXR1cm4gc2VsZi5yZXR1cm5fdmFsLCBjbWRf + b3V0cHV0LCBzdHIoc2VsZi5lcnJfbWVzc2FnZS5lbmNvZGUoInV0Zi04IikpCgogICAgZGVmIF9j + b252ZXJ0X2hvc3RuYW1lX3RvX2lwKHNlbGYsIGhvc3RfbmFtZSk6CiAgICAgICAgaXBfcmVnX3gg + PSByZS5jb21waWxlKHIiXGR7MSwzfS5cZHsxLDN9LlxkezEsM30uXGR7MSwzfSIpCiAgICAgICAg + IyBpZiBwcm92aWRlZCBob3N0IGlzIGRpcmVjdGx5IGFuIElQIGFkZHJlc3MsIHJldHVybiB0aGUg + c2FtZQogICAgICAgIGlmIGlwX3JlZ194Lm1hdGNoKGhvc3RfbmFtZSk6CiAgICAgICAgICAgIHJl + dHVybiBob3N0X25hbWUKICAgICAgICBpbXBvcnQgcmFuZG9tCgogICAgICAgIGhvc3RfaXAgPSBz + ZWxmLmR1bW15X2hvc3RfaXBfbWFwLmdldChob3N0X25hbWUsICIiKQogICAgICAgIGlmIG5vdCBo + b3N0X2lwOgogICAgICAgICAgICBob3N0X2lwID0gZiIxNzIuOS57cmFuZG9tLnJhbmRpbnQoMCwg + MjU0KX0ue3JhbmRvbS5yYW5kaW50KDAsIDI1NCl9IgogICAgICAgICAgICBzZWxmLmR1bW15X2hv + c3RfaXBfbWFwW2hvc3RfbmFtZV0gPSBob3N0X2lwCiAgICAgICAgZGVsIHJhbmRvbQogICAgICAg + IH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aXphdGlvbiJdID0gZiJBV1Mge3NlbGYuYWNjZXNzX2tleX06e3NpZ25hdHVyZX0iCiAg + ICAgICAgcmV0dXJuIHIKCiAgICBkZWYgZ2V0X3NpZ25hdHVyZShzZWxmLCByKToKICAgICAgICBj + YW5vbmljYWxfc3RyaW5nID0gc2VsZi5nZXRfY2Fub25pY2FsX3N0cmluZyhyLnVybCwgci5oZWFk + ZXJzLCByLm1ldGhvZCkKICAgICAgICBrZXkgPSBzZWxmLnNlY3JldF9rZXkuZW5jb2RlKCJ1dGYt + OCIpCiAgICAgICAgbXNnID0gY2Fub25pY2FsX3N0cmluZy5lbmNvZGUoInV0Zi04IikKICAgICAg + ICBoID0gaG1hYy5uZXcoa2V5LCBtc2csIGRpZ2VzdG1vZD1zaGEpCiAgICAgICAgcmV0dXJuIGVu + Y29kZXN0cmluZyhoLmRpZ2VzdCgpKS5zdHJpcCgpCgogICAgZGVmIGdldF9jYW5vbmljYWxfc3Ry + aW5nKHNlbGYsIHVybCwgaGVhZGVycywgbWV0aG9kKToKICAgICAgICBwYXJzZWR1cmwgPSB1cmxw + YXJzZSh1cmwpCiAgICAgICAgb2JqZWN0a2V5ID0gcGFyc2VkdXJsLnBhdGhbMTpdCgogICAgICAg + IGJ1Y2tldCA9IHBhcnNlZHVybC5uZXRsb2NbOiAtbGVuKHNlbGYuc2VydmljZV9iYXNlX3VybCld + CiAgICAgICAgaWYgbGVuKGJ1Y2tldCkgPiAxOgogICAgICAgICAgICAjIHJlbW92ZSBsYXN0IGRv + dAogICAgICAgICAgICBidWNrZXQgPSBidWNrZXRbOi0xXQoKICAgICAgICBpbnRlcmVzdGluZ19o + ZWFkZXJzID0geyJjb250ZW50LW1kNSI6ICIiLCAiY29udGVudC10eXBlIjogIiIsICJkYXRlIjog + IiJ9CiAgICAgICAgZm9yIGtleSBpbiBoZWFkZXJzOgogICAgICAgICAgICBsayA9IGtleS5sb3dl + cigpCiAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgIGxrID0gbGsuZGVjb2RlKCJ1dGYt + OCIpCiAgICAgICAgICAgIGV4Y2VwdDoKICAgICAgICAgICAgICAgIHBhc3MKICAgICAgICAgICAg + aWYgaGVhZGVyc1trZXldIGFuZCAoCiAgICAgICAgICAgICAgICBsayBpbiBpbnRlcmVzdGluZ19o + ZWFkZXJzLmtleXMoKSBvciBsay5zdGFydHN3aXRoKCJ4LWFtei0iKQogICAgICAgICAgICApOgog + ICAgICAgICAgICAgICAgaW50ZXJlc3RpbmdfaGVhZGVyc1tsa10gPSBoZWFkZXJzW2tleV0uc3Ry + aXAoKQoKICAgICAgICAjIElmIHgtYW16LWRhdGUgaXMgdXNlZCBpdCBzdXBlcnNlZGVzIHRoZSBk + YXRlIGhlYWRlci4KICAgICAgICBpZiAieC1hbXotZGF0ZSIgaW4gaW50ZXJlc3RpbmdfaGVhZGVy + czoKICAgICAgICAgICAgaW50ZXJlc3RpbmdfaGVhZGVyc1siZGF0ZSJdID0gIiIKCiAgICAgICAg + YnVmID0gZiJ7bWV0aG9kfVxuIgogICAgICAgIGZvciBrZXkgaW4gc29ydGVkKGludGVyZXN0aW5n + X2hlYWRlcnMua2V5cygpKToKICAgICAgICAgICAgdmFsID0gaW50ZXJlc3RpbmdfaGVhZGVyc1tr + ZXldCiAgICAgICAgICAgIGlmIGtleS5zdGFydHN3aXRoKCJ4LWFtei0iKToKICAgICAgICAgICAg + ICAgIGJ1ZiArPSBmIntrZXl9Ont2YWx9XG4iCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAg + ICAgICBidWYgKz0gZiJ7dmFsfVxuIgoKICAgICAgICAjIGFwcGVuZCB0aGUgYnVja2V0IGlmIGl0 + IGV4aXN0cwogICAgICAgIGlmIGJ1Y2tldCAhPSAiIjoKICAgICAgICAgICAgYnVmICs9IGYiL3ti + dWNrZXR9IgoKICAgICAgICAjIGFkZCB0aGUgb2JqZWN0a2V5LiBldmVuIGlmIGl0IGRvZXNuJ3Qg + ZXhpc3QsIGFkZCB0aGUgc2xhc2gKICAgICAgICBidWYgKz0gZiIve29iamVjdGtleX0iCgogICAg + ICAgIHJldHVybiBidWYKCgpjbGFzcyBSYWRvc0pTT046CiAgICBFWFRFUk5BTF9VU0VSX05BTUUg + PSAiY2xpZW50LmhlYWx0aGNoZWNrZXIiCiAgICBFWFRFUk5BTF9SR1dfQURNSU5fT1BTX1VTRVJf + TkFNRSA9ICJyZ3ctYWRtaW4tb3BzLXVzZXIiCiAgICBFTVBUWV9PVVRQVVRfTElTVCA9ICJFbXB0 + eSBvdXRwdXQgbGlzdCIKICAgIERFRkFVTFRfUkdXX1BPT0xfUFJFRklYID0gImRlZmF1bHQiCiAg + ICBERUZBVUxUX01PTklUT1JJTkdfRU5EUE9JTlRfUE9SVCA9ICI5MjgzIgoKICAgIEBjbGFzc21l + dGhvZAogICAgZGVmIGdlbl9hcmdfcGFyc2VyKGNscywgYXJnc190b19wYXJzZT1Ob25lKToKICAg + ICAgICBhcmdQID0gYXJncGFyc2UuQXJndW1lbnRQYXJzZXIoKQoKICAgICAgICBjb21tb25fZ3Jv + dXAgPSBhcmdQLmFkZF9hcmd1bWVudF9ncm91cCgiY29tbW9uIikKICAgICAgICBjb21tb25fZ3Jv + dXAuYWRkX2FyZ3VtZW50KCItLXZlcmJvc2UiLCAiLXYiLCBhY3Rpb249InN0b3JlX3RydWUiLCBk + ZWZhdWx0PUZhbHNlKQogICAgICAgIGNvbW1vbl9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAg + ICAgICItLWNlcGgtY29uZiIsICItYyIsIGhlbHA9IlByb3ZpZGUgYSBjZXBoIGNvbmYgZmlsZS4i + LCB0eXBlPXN0ciwgZGVmYXVsdD0iIgogICAgICAgICkKICAgICAgICBjb21tb25fZ3JvdXAuYWRk + X2FyZ3VtZW50KAogICAgICAgICAgICAiLS1rZXlyaW5nIiwgIi1rIiwgaGVscD0iUGF0aCB0byBj + ZXBoIGtleXJpbmcgZmlsZS4iLCB0eXBlPXN0ciwgZGVmYXVsdD0iIgogICAgICAgICkKICAgICAg + ICBjb21tb25fZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1ydW4tYXMtdXNlciIs + CiAgICAgICAgICAgICItdSIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHR5 + cGU9c3RyLAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyBhIHVzZXIgbmFtZSB0byBjaGVjayB0 + aGUgY2x1c3RlcidzIGhlYWx0aCBzdGF0dXMsIG11c3QgYmUgcHJlZml4ZWQgYnkgJ2NsaWVudC4n + IiwKICAgICAgICApCiAgICAgICAgY29tbW9uX2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAg + ICAgIi0tY2x1c3Rlci1uYW1lIiwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAgICAg + aGVscD0iS3ViZXJuZXRlcyBjbHVzdGVyIG5hbWUobGVnYWN5IGZsYWcpLCBOb3RlOiBFaXRoZXIg + dXNlIHRoaXMgb3IgLS1rOHMtY2x1c3Rlci1uYW1lIiwKICAgICAgICApCiAgICAgICAgY29tbW9u + X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tazhzLWNsdXN0ZXItbmFtZSIsIGRl + ZmF1bHQ9IiIsIGhlbHA9Ikt1YmVybmV0ZXMgY2x1c3RlciBuYW1lIgogICAgICAgICkKICAgICAg + ICBjb21tb25fZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1uYW1lc3BhY2UiLAog + ICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICBoZWxwPSJOYW1lc3BhY2Ugd2hlcmUg + Q2VwaENsdXN0ZXIgaXMgcnVubmluZyIsCiAgICAgICAgKQogICAgICAgIGNvbW1vbl9ncm91cC5h + ZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXJndy1wb29sLXByZWZpeCIsIGRlZmF1bHQ9IiIs + IGhlbHA9IlJ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lcnMgYW5kIG5ldyBzZWNyZXRzIGZvciB0aGF0IGNzaS11c2Vycy4iCiAgICAgICAg + ICAgICsgIlNvIGFwcGx5IHRoZXNlIHNlY3JldHMgb25seSB0byBuZXcgYENvbnN1bWVyIGNsdXN0 + ZXJgIGRlcGxveW1lbnQgd2hpbGUgdXNpbmcgdGhlIHNhbWUgYFNvdXJjZSBjbHVzdGVyYC4iLAog + ICAgICAgICkKICAgICAgICBjb21tb25fZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAi + LS12Mi1wb3J0LWVuYWJsZSIsCiAgICAgICAgICAgIGFjdGlvbj0ic3RvcmVfdHJ1ZSIsCiAgICAg + ICAgICAgIGRlZmF1bHQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9IkVuYWJsZSB2MiBtb24gcG9y + dCgzMzAwKSBmb3IgbW9ucyIsCiAgICAgICAgKQoKICAgICAgICBvdXRwdXRfZ3JvdXAgPSBhcmdQ + LmFkZF9hcmd1bWVudF9ncm91cCgib3V0cHV0IikKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2Fy + Z3VtZW50KAogICAgICAgICAgICAiLS1mb3JtYXQiLAogICAgICAgICAgICAiLXQiLAogICAgICAg + ICAgICBjaG9pY2VzPVsianNvbiIsICJiYXNoIl0sCiAgICAgICAgICAgIGRlZmF1bHQ9Impzb24i + LAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyB0aGUgb3V0cHV0IGZvcm1hdCAoanNvbiB8IGJh + c2gpIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAg + ICAgICAgIi0tb3V0cHV0IiwKICAgICAgICAgICAgIi1vIiwKICAgICAgICAgICAgZGVmYXVsdD0i + IiwKICAgICAgICAgICAgaGVscD0iT3V0cHV0IHdpbGwgYmUgc3RvcmVkIGludG8gdGhlIHByb3Zp + ZGVkIGZpbGUiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAog + ICAgICAgICAgICAiLS1jZXBoZnMtZmlsZXN5c3RlbS1uYW1lIiwKICAgICAgICAgICAgZGVmYXVs + dD0iIiwKICAgICAgICAgICAgaGVscD0iUHJvdmlkZXMgdGhlIG5hbWUgb2YgdGhlIENlcGggZmls + ZXN5c3RlbSIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAg + ICAgICAgICAgICItLWNlcGhmcy1tZXRhZGF0YS1wb29sLW5hbWUiLAogICAgICAgICAgICBkZWZh + dWx0PSIiLAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyB0aGUgbmFtZSBvZiB0aGUgY2VwaGZz + IG1ldGFkYXRhIHBvb2wiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3Vt + ZW50KAogICAgICAgICAgICAiLS1jZXBoZnMtZGF0YS1wb29sLW5hbWUiLAogICAgICAgICAgICBk + ZWZhdWx0PSIiLAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyB0aGUgbmFtZSBvZiB0aGUgY2Vw + aGZzIGRhdGEgcG9vbCIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1l + bnQoCiAgICAgICAgICAgICItLXJiZC1kYXRhLXBvb2wtbmFtZSIsCiAgICAgICAgICAgIGRlZmF1 + bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJQcm92 + aWRlcyB0aGUgbmFtZSBvZiB0aGUgUkJEIGRhdGFwb29sIiwKICAgICAgICApCiAgICAgICAgb3V0 + cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tYWxpYXMtcmJkLWRhdGEtcG9v + bC1uYW1lIiwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAgICAgcmVxdWlyZWQ9RmFs + c2UsCiAgICAgICAgICAgIGhlbHA9IlByb3ZpZGVzIGFuIGFsaWFzIGZvciB0aGUgIFJCRCBkYXRh + IHBvb2wgbmFtZSwgbmVjZXNzYXJ5IGlmIGEgc3BlY2lhbCBjaGFyYWN0ZXIgaXMgcHJlc2VudCBp + biB0aGUgcG9vbCBuYW1lIHN1Y2ggYXMgYSBwZXJpb2Qgb3IgdW5kZXJzY29yZSIsCiAgICAgICAg + KQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXJndy1l + bmRwb2ludCIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVkPUZh + bHNlLAogICAgICAgICAgICBoZWxwPSJSQURPUyBHYXRld2F5IGVuZHBvaW50IChpbiBgPElQdjQ+ + OjxQT1JUPmAgb3IgYDxbSVB2Nl0+OjxQT1JUPmAgb3IgYDxGUUROPjo8UE9SVD5gIGZvcm1hdCki + LAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAg + ICAiLS1yZ3ctdGxzLWNlcnQtcGF0aCIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAg + ICAgIHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJSQURPUyBHYXRld2F5IGVuZHBv + aW50IFRMUyBjZXJ0aWZpY2F0ZSIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRf + YXJndW1lbnQoCiAgICAgICAgICAgICItLXJndy1za2lwLXRscyIsCiAgICAgICAgICAgIHJlcXVp + cmVkPUZhbHNlLAogICAgICAgICAgICBkZWZhdWx0PUZhbHNlLAogICAgICAgICAgICBoZWxwPSJJ + Z25vcmUgVExTIGNlcnRpZmljYXRpb24gdmFsaWRhdGlvbiB3aGVuIGEgc2VsZi1zaWduZWQgY2Vy + dGlmaWNhdGUgaXMgcHJvdmlkZWQgKE5PVCBSRUNPTU1FTkRFRCIsCiAgICAgICAgKQogICAgICAg + IG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLW1vbml0b3JpbmctZW5k + cG9pbnQiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxz + ZSwKICAgICAgICAgICAgaGVscD0iQ2VwaCBNYW5hZ2VyIHByb21ldGhldXMgZXhwb3J0ZXIgZW5k + cG9pbnRzIChjb21tYSBzZXBhcmF0ZWQgbGlzdCBvZiAoZm9ybWF0IGA8SVB2ND5gIG9yIGA8W0lQ + djZdPmAgb3IgYDxGUUROPmApIGVudHJpZXMgb2YgYWN0aXZlIGFuZCBzdGFuZGJ5IG1ncnMpIiwK ICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAg - Ii0tc3Vidm9sdW1lLWdyb3VwIiwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAgICAg - cmVxdWlyZWQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9InByb3ZpZGVzIHRoZSBuYW1lIG9mIHRo - ZSBzdWJ2b2x1bWUgZ3JvdXAiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2Fy - Z3VtZW50KAogICAgICAgICAgICAiLS1yZ3ctcmVhbG0tbmFtZSIsCiAgICAgICAgICAgIGRlZmF1 - bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJwcm92 - aWRlcyB0aGUgbmFtZSBvZiB0aGUgcmd3LXJlYWxtIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0 - X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmd3LXpvbmUtbmFtZSIsCiAgICAg - ICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAg - ICBoZWxwPSJwcm92aWRlcyB0aGUgbmFtZSBvZiB0aGUgcmd3LXpvbmUiLAogICAgICAgICkKICAg - ICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1yZ3ctem9uZWdy - b3VwLW5hbWUiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1G - YWxzZSwKICAgICAgICAgICAgaGVscD0icHJvdmlkZXMgdGhlIG5hbWUgb2YgdGhlIHJndy16b25l - Z3JvdXAiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAg - ICAgICAgICAiLS10b3BvbG9neS1wb29scyIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAg - ICAgICAgIHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJjb21tYS1zZXBhcmF0ZWQg - bGlzdCBvZiB0b3BvbG9neS1jb25zdHJhaW5lZCByYmQgcG9vbHMiLAogICAgICAgICkKICAgICAg - ICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS10b3BvbG9neS1mYWls - dXJlLWRvbWFpbi1sYWJlbCIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHJl - cXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJrOHMgY2x1c3RlciBmYWlsdXJlIGRvbWFp - biBsYWJlbCAoZXhhbXBsZTogem9uZSwgcmFjaywgb3IgaG9zdCkgZm9yIHRoZSB0b3BvbG9neS1w - b29scyB0aGF0IG1hdGNoIHRoZSBjZXBoIGRvbWFpbiIsCiAgICAgICAgKQogICAgICAgIG91dHB1 - dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXRvcG9sb2d5LWZhaWx1cmUtZG9t - YWluLXZhbHVlcyIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsC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vIGFwcGVuZCBuZXcgcGVybWlzc2lvbnMgdG8gdXNlcnMs - IGl0IHNob3VsZG4ndCBiZSB1c2VkIGZvciBjaGFuZ2luZyB1c2VyIGFscmVhZHkgYXBwbGllZCBw - ZXJtaXNzaW9uLCBmb3IgZXhhbXBsZSB5b3Ugc2hvdWxkbid0IGNoYW5nZSBpbiB3aGljaCBwb29s - IHVzZXIgaGFzIGFjY2VzcyIsCiAgICAgICAgKQoKICAgICAgICAjIEFkZCBjb21tYW5kLWxpbmUg - YXJndW1lbnRzCiAgICAgICAgY29uZmlnX2dyb3VwID0gYXJnUC5hZGRfYXJndW1lbnRfZ3JvdXAo - ImNvbmZpZyIpCiAgICAgICAgY29uZmlnX2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAg - Ii0tY29uZmlnLWZpbGUiLAogICAgICAgICAgICB0eXBlPXN0ciwKICAgICAgICAgICAgaGVscD0i - UGF0aCB0byB0aGUgY29uZmlndXJhdGlvbiBmaWxlLCBQcmlvcml0eTogY29tbWFuZC1saW5lLWFy - Z3MgPiBjb25maWcuaW5pIGZpbGUgdmFsdWVzID4gZGVmYXVsdCB2YWx1ZXMiLAogICAgICAgICAg - ICByZXF1aXJlZD1GYWxzZSwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICApCgogICAg - ICAgIGlmIGFyZ3NfdG9fcGFyc2U6CiAgICAgICAgICAgIGFzc2VydCAoCiAgICAgICAgICAgICAg - ICB0eXBlKGFyZ3NfdG9fcGFyc2UpID09IGxpc3QKICAgICAgICAgICAgKSwgIkFyZ3VtZW50IHRv - ICdnZW5fYXJnX3BhcnNlcicgc2hvdWxkIGJlIGEgbGlzdCIKICAgICAgICBlbHNlOgogICAgICAg - ICAgICBhcmdzX3RvX3BhcnNlID0gc3lzLmFyZ3ZbMTpdCiAgICAgICAgcmV0dXJuIGFyZ1AucGFy - c2VfYXJncyhhcmdzX3RvX3BhcnNlKQoKICAgIGRlZiB2YWxpZGF0ZV9yYmRfbWV0YWRhdGFfZWNf - cG9vbF9uYW1lKHNlbGYpOgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIucmJkX21ldGFkYXRh - X2VjX3Bvb2xfbmFtZToKICAgICAgICAgICAgcmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZSA9IHNl - bGYuX2FyZ19wYXJzZXIucmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZQogICAgICAgICAgICByYmRf - cG9vbF9uYW1lID0gc2VsZi5fYXJnX3BhcnNlci5yYmRfZGF0YV9wb29sX25hbWUKCiAgICAgICAg - ICAgIGlmIHJiZF9wb29sX25hbWUgPT0gIiI6CiAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRp - b25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgICJGbGFnICctLXJiZC1kYXRh - LXBvb2wtbmFtZScgc2hvdWxkIG5vdCBiZSBlbXB0eSIKICAgICAgICAgICAgICAgICkKCiAgICAg - ICAgICAgIGlmIHJiZF9tZXRhZGF0YV9lY19wb29sX25hbWUgPT0gIiI6CiAgICAgICAgICAgICAg - ICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgICJG - bGFnICctLXJiZC1tZXRhZGF0YS1lYy1wb29sLW5hbWUnIHNob3VsZCBub3QgYmUgZW1wdHkiCiAg - ICAgICAgICAgICAgICApCgogICAgICAgICAgICBjbWRfanNvbiA9IHsicHJlZml4IjogIm9zZCBk - dW1wIiwgImZvcm1hdCI6ICJqc29uIn0KICAgICAgICAgICAgcmV0X3ZhbCwganNvbl9vdXQsIGVy - cl9tc2cgPSBzZWxmLl9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAgICAgICBp - ZiByZXRfdmFsICE9IDAgb3IgbGVuKGpzb25fb3V0KSA9PSAwOgogICAgICAgICAgICAgICAgcmFp - c2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICBmIntjbWRf - anNvblsncHJlZml4J119IGNvbW1hbmQgZmFpbGVkLlxuIgogICAgICAgICAgICAgICAgICAgIGYi - RXJyb3I6IHtlcnJfbXNnIGlmIHJldF92YWwgIT0gMCBlbHNlIHNlbGYuRU1QVFlfT1VUUFVUX0xJ - U1R9IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBtZXRhZGF0YV9wb29sX2V4aXN0LCBw - b29sX2V4aXN0ID0gRmFsc2UsIEZhbHNlCgogICAgICAgICAgICBmb3Iga2V5IGluIGpzb25fb3V0 - WyJwb29scyJdOgogICAgICAgICAgICAgICAgIyBpZiBlcmFzdXJlX2NvZGVfcHJvZmlsZSBpcyBl - bXB0eSBhbmQgcG9vbCBuYW1lIGV4aXN0cyB0aGVuIGl0IHJlcGxpY2EgcG9vbAogICAgICAgICAg - ICAgICAgaWYgKAogICAgICAgICAgICAgICAgICAgIGtleVsiZXJhc3VyZV9jb2RlX3Byb2ZpbGUi - XSA9PSAiIgogICAgICAgICAgICAgICAgICAgIGFuZCBrZXlbInBvb2xfbmFtZSJdID09IHJiZF9t - ZXRhZGF0YV9lY19wb29sX25hbWUKICAgICAgICAgICAgICAgICk6CiAgICAgICAgICAgICAgICAg - ICAgbWV0YWRhdGFfcG9vbF9leGlzdCA9IFRydWUKICAgICAgICAgICAgICAgICMgaWYgZXJhc3Vy - ZV9jb2RlX3Byb2ZpbGUgaXMgbm90IGVtcHR5IGFuZCBwb29sIG5hbWUgZXhpc3RzIHRoZW4gaXQg - aXMgZWMgcG9vbAogICAgICAgICAgICAgICAgaWYga2V5WyJlcmFzdXJlX2NvZGVfcHJvZmlsZSJd - IGFuZCBrZXlbInBvb2xfbmFtZSJdID09IHJiZF9wb29sX25hbWU6CiAgICAgICAgICAgICAgICAg - ICAgcG9vbF9leGlzdCA9IFRydWUKCiAgICAgICAgICAgIGlmIG5vdCBtZXRhZGF0YV9wb29sX2V4 - aXN0OgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAg - ICAgICAgICAgICAgICAgICAiUHJvdmlkZWQgcmJkX2VjX21ldGFkYXRhX3Bvb2wgbmFtZSwiCiAg - ICAgICAgICAgICAgICAgICAgZiIge3JiZF9tZXRhZGF0YV9lY19wb29sX25hbWV9LCBkb2VzIG5v - dCBleGlzdCIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgbm90IHBvb2xfZXhpc3Q6 - CiAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAg - ICAgICAgICAgICAgIGYiUHJvdmlkZWQgcmJkX2RhdGFfcG9vbCBuYW1lLCB7cmJkX3Bvb2xfbmFt - ZX0sIGRvZXMgbm90IGV4aXN0IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICByZXR1cm4g - cmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZQoKICAgIGRlZiBkcnlfcnVuKHNlbGYsIG1zZyk6CiAg - ICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICBwcmludCgiRXhl - Y3V0ZTogIiArICInIiArIG1zZyArICInIikKCiAgICBkZWYgdmFsaWRhdGVfcmd3X2VuZHBvaW50 - X3Rsc19jZXJ0KHNlbGYpOgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIucmd3X3Rsc19jZXJ0 - X3BhdGg6CiAgICAgICAgICAgIHdpdGggb3BlbihzZWxmLl9hcmdfcGFyc2VyLnJnd190bHNfY2Vy - dF9wYXRoLCBlbmNvZGluZz0idXRmOCIpIGFzIGY6CiAgICAgICAgICAgICAgICBjb250ZW50cyA9 - IGYucmVhZCgpCiAgICAgICAgICAgICAgICByZXR1cm4gY29udGVudHMucnN0cmlwKCkKCiAgICBk - ZWYgX2NoZWNrX2NvbmZsaWN0aW5nX29wdGlvbnMoc2VsZik6CiAgICAgICAgaWYgbm90IHNlbGYu - X2FyZ19wYXJzZXIudXBncmFkZSBhbmQgbm90IHNlbGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9v - bF9uYW1lOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAg - ICAgICAgICAgICAgIkVpdGhlciAnLS11cGdyYWRlJyBvciAnLS1yYmQtZGF0YS1wb29sLW5hbWUg - PHBvb2xfbmFtZT4nIHNob3VsZCBiZSBzcGVjaWZpZWQiCiAgICAgICAgICAgICkKCiAgICBkZWYg - X2ludmFsaWRfZW5kcG9pbnQoc2VsZiwgZW5kcG9pbnRfc3RyKToKICAgICAgICAjIGV4dHJhY3Qg - dGhlIHBvcnQgYnkgZ2V0dGluZyB0aGUgbGFzdCBzcGxpdCBvbiBgOmAgZGVsaW1pdGVyCiAgICAg - ICAgdHJ5OgogICAgICAgICAgICBlbmRwb2ludF9zdHJfaXAsIHBvcnQgPSBlbmRwb2ludF9zdHIu - cnNwbGl0KCI6IiwgMSkKICAgICAgICBleGNlcHQgVmFsdWVFcnJvcjoKICAgICAgICAgICAgcmFp - c2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbihmIk5vdCBhIHByb3BlciBlbmRwb2ludDoge2Vu - ZHBvaW50X3N0cn0iKQoKICAgICAgICB0cnk6CiAgICAgICAgICAgIGlmIGVuZHBvaW50X3N0cl9p - cFswXSA9PSAiWyI6CiAgICAgICAgICAgICAgICBlbmRwb2ludF9zdHJfaXAgPSBlbmRwb2ludF9z - dHJfaXBbMSA6IGxlbihlbmRwb2ludF9zdHJfaXApIC0gMV0KICAgICAgICAgICAgaXBfdHlwZSA9 - ICgKICAgICAgICAgICAgICAgICJJUHY0IiBpZiB0eXBlKGlwX2FkZHJlc3MoZW5kcG9pbnRfc3Ry - X2lwKSkgaXMgSVB2NEFkZHJlc3MgZWxzZSAiSVB2NiIKICAgICAgICAgICAgKQogICAgICAgIGV4 - Y2VwdCBWYWx1ZUVycm9yOgogICAgICAgICAgICBpcF90eXBlID0gIkZRRE4iCiAgICAgICAgaWYg - bm90IHBvcnQuaXNkaWdpdCgpOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhj - ZXB0aW9uKGYiUG9ydCBub3QgdmFsaWQ6IHtwb3J0fSIpCiAgICAgICAgaW50UG9ydCA9IGludChw - b3J0KQogICAgICAgIGlmIGludFBvcnQgPCAxIG9yIGludFBvcnQgPiAyKioxNiAtIDE6CiAgICAg - ICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oZiJPdXQgb2YgcmFuZ2UgcG9y - dCBudW1iZXI6IHtwb3J0fSIpCgogICAgICAgIHJldHVybiBpcF90eXBlCgogICAgZGVmIGVuZHBv - aW50X2RpYWwoc2VsZiwgZW5kcG9pbnRfc3RyLCBpcF90eXBlLCB0aW1lb3V0PTMsIGNlcnQ9Tm9u - ZSk6CiAgICAgICAgIyBpZiB0aGUgJ2NsdXN0ZXInIGluc3RhbmNlIGlzIGEgZHVtbXkgb25lLAog - ICAgICAgICMgZG9uJ3QgdHJ5IHRvIHJlYWNoIG91dCB0byB0aGUgZW5kcG9pbnQKICAgICAgICBp - ZiBpc2luc3RhbmNlKHNlbGYuY2x1c3RlciwgRHVtbXlSYWRvcyk6CiAgICAgICAgICAgIHJldHVy - biAiIiwgIiIsICIiCiAgICAgICAgaWYgaXBfdHlwZSA9PSAiSVB2NiI6CiAgICAgICAgICAgIHRy - eToKICAgICAgICAgICAgICAgIGVuZHBvaW50X3N0cl9pcCwgZW5kcG9pbnRfc3RyX3BvcnQgPSBl - bmRwb2ludF9zdHIucnNwbGl0KCI6IiwgMSkKICAgICAgICAgICAgZXhjZXB0IFZhbHVlRXJyb3I6 - CiAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAg - ICAgICAgICAgICAgIGYiTm90IGEgcHJvcGVyIGVuZHBvaW50OiB7ZW5kcG9pbnRfc3RyfSIKICAg - ICAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgZW5kcG9pbnRfc3RyX2lwWzBdICE9ICJbIjoK - ICAgICAgICAgICAgICAgIGVuZHBvaW50X3N0cl9pcCA9ICJbIiArIGVuZHBvaW50X3N0cl9pcCAr - ICJdIgogICAgICAgICAgICBlbmRwb2ludF9zdHIgPSAiOiIuam9pbihbZW5kcG9pbnRfc3RyX2lw - LCBlbmRwb2ludF9zdHJfcG9ydF0pCgogICAgICAgIHByb3RvY29scyA9IFsiaHR0cCIsICJodHRw - cyJdCiAgICAgICAgcmVzcG9uc2VfZXJyb3IgPSBOb25lCiAgICAgICAgZm9yIHByZWZpeCBpbiBw - cm90b2NvbHM6CiAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgIGVwID0gZiJ7cHJlZml4 - fTovL3tlbmRwb2ludF9zdHJ9IgogICAgICAgICAgICAgICAgdmVyaWZ5ID0gTm9uZQogICAgICAg - ICAgICAgICAgIyBJZiB2ZXJpZnkgaXMgc2V0IHRvIGEgcGF0aCB0byBhIGRpcmVjdG9yeSwKICAg - ICAgICAgICAgICAgICMgdGhlIGRpcmVjdG9yeSBtdXN0IGhhdmUgYmVlbiBwcm9jZXNzZWQgdXNp - bmcgdGhlIGNfcmVoYXNoIHV0aWxpdHkgc3VwcGxpZWQgd2l0aCBPcGVuU1NMLgogICAgICAgICAg - ICAgICAgaWYgcHJlZml4ID09ICJodHRwcyIgYW5kIHNlbGYuX2FyZ19wYXJzZXIucmd3X3NraXBf - dGxzOgogICAgICAgICAgICAgICAgICAgIHZlcmlmeSA9IEZhbHNlCiAgICAgICAgICAgICAgICAg - ICAgciA9IHJlcXVlc3RzLmhlYWQoZXAsIHRpbWVvdXQ9dGltZW91dCwgdmVyaWZ5PUZhbHNlKQog - ICAgICAgICAgICAgICAgZWxpZiBwcmVmaXggPT0gImh0dHBzIiBhbmQgY2VydDoKICAgICAgICAg - ICAgICAgICAgICB2ZXJpZnkgPSBjZXJ0CiAgICAgICAgICAgICAgICAgICAgciA9IHJlcXVlc3Rz - LmhlYWQoZXAsIHRpbWVvdXQ9dGltZW91dCwgdmVyaWZ5PWNlcnQpCiAgICAgICAgICAgICAgICBl - bHNlOgogICAgICAgICAgICAgICAgICAgIHIgPSByZXF1ZXN0cy5oZWFkKGVwLCB0aW1lb3V0PXRp - bWVvdXQpCiAgICAgICAgICAgICAgICBpZiByLnN0YXR1c19jb2RlID09IDIwMDoKICAgICAgICAg - ICAgICAgICAgICByZXR1cm4gcHJlZml4LCB2ZXJpZnksICIiCiAgICAgICAgICAgIGV4Y2VwdCBF - eGNlcHRpb24gYXMgZXJyOgogICAgICAgICAgICAgICAgcmVzcG9uc2VfZXJyb3IgPSBlcnIKICAg - ICAgICAgICAgICAgIGNvbnRpbnVlCiAgICAgICAgc3lzLnN0ZGVyci53cml0ZSgKICAgICAgICAg - ICAgZiJ1bmFibGUgdG8gY29ubmVjdCB0byBlbmRwb2ludDoge2VuZHBvaW50X3N0cn0sIGZhaWxl - ZCBlcnJvcjoge3Jlc3BvbnNlX2Vycm9yfSIKICAgICAgICApCiAgICAgICAgcmV0dXJuICgKICAg - ICAgICAgICAgIiIsCiAgICAgICAgICAgICIiLAogICAgICAgICAgICAoIi0xIiksCiAgICAgICAg - KQoKICAgIGRlZiBwYXJzZV9jb25maWdfZmlsZShzZWxmLCBjb25maWdfZmlsZSk6CiAgICAgICAg - Y29uZmlnID0gY29uZmlncGFyc2VyLkNvbmZpZ1BhcnNlcigpCiAgICAgICAgY29uZmlnLnJlYWQo - Y29uZmlnX2ZpbGUpCiAgICAgICAgZm9yIGFyZyBpbiBsaXN0KHZhcnMoc2VsZi5fYXJnX3BhcnNl - cikpOgogICAgICAgICAgICAjIHB5dGhvbiB0cmVhdHMgZmxhZy1uYW1lIGFzIGZsYWdfbmFtZSBp - bnRlcm5hbGx5LCBzbyBjb252ZXJ0aW5nIGJhY2sgdG8gZmxhZy1uYW1lLAogICAgICAgICAgICAj - IHNvIHdlIGNhbiBnZXQgdGhvc2UgdmFsdWVzIGZyb20gY29uZmlnIGZpbGUKICAgICAgICAgICAg - YXJndW1lbnQgPSBhcmcucmVwbGFjZSgiXyIsICItIikKICAgICAgICAgICAgYXJndW1lbnRWYWx1 - ZSA9IHN0cihnZXRhdHRyKHNlbGYuX2FyZ19wYXJzZXIsIGFyZykpCiAgICAgICAgICAgIGNvbmZp - Z192YWx1ZSA9IGNvbmZpZy5nZXQoIkNvbmZpZ3VyYXRpb25zIiwgYXJndW1lbnQsIGZhbGxiYWNr - PU5vbmUpCiAgICAgICAgICAgICMgZ2l2ZSBwcmlvcml0eSB0byBjb21tYW5kIGxpbmUgYXJndW1l - bnQsIGlmIGNvbW1hbmQgbGluZSBhcmd1bWVudCBpcyBub3QgcHJlc2VudCB1c2UgY29uZmlnLmlu - aSB2YWx1ZSwKICAgICAgICAgICAgaWYgKHN0cihzeXMuYXJndikuZmluZChhcmd1bWVudCkgPT0g - LTEpIGFuZCAoCiAgICAgICAgICAgICAgICAoY29uZmlnX3ZhbHVlICE9IE5vbmUpIGFuZCAoY29u - ZmlnX3ZhbHVlICE9ICIiKQogICAgICAgICAgICApOgogICAgICAgICAgICAgICAgc2VsZi5fYXJn - X3BhcnNlci5fX3NldGF0dHJfXyhhcmcsIGNvbmZpZ192YWx1ZSkKCiAgICAgICAgcmV0dXJuIGNv - bmZpZwoKICAgIGRlZiBfX2luaXRfXyhzZWxmLCBhcmdfbGlzdD1Ob25lKToKICAgICAgICBzZWxm - Lm91dF9tYXAgPSB7fQogICAgICAgIHNlbGYuX2V4Y2x1ZGVkX2tleXMgPSBzZXQoKQogICAgICAg - IHNlbGYuX2FyZ19wYXJzZXIgPSBzZWxmLmdlbl9hcmdfcGFyc2VyKGFyZ3NfdG9fcGFyc2U9YXJn - X2xpc3QpCiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5jb25maWdfZmlsZToKICAgICAgICAg - ICAgc2VsZi5jb25maWcgPSB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bHVzdGVyID0gcmFkb3MuUmFkb3MoY29uZmZpbGU9c2Vs - Zi5jZXBoX2NvbmYsICoqa3dhcmdzKQogICAgICAgIGVsc2U6CiAgICAgICAgICAgIHNlbGYuY2x1 - c3RlciA9IHJhZG9zLlJhZG9zKCkKICAgICAgICAgICAgc2VsZi5jbHVzdGVyLmNvbmZfcmVhZF9m - aWxlKCkKICAgICAgICBzZWxmLmNsdXN0ZXIuY29ubmVjdCgpCgogICAgZGVmIHNodXRkb3duKHNl - bGYpOgogICAgICAgIGlmIHNlbGYuY2x1c3Rlci5zdGF0ZSA9PSAiY29ubmVjdGVkIjoKICAgICAg - ICAgICAgc2VsZi5jbHVzdGVyLnNodXRkb3duKCkKCiAgICBkZWYgZ2V0X2ZzaWQoc2VsZik6CiAg - ICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICByZXR1cm4gc2Vs - Zi5kcnlfcnVuKCJjZXBoIGZzaWQiKQogICAgICAgIHJldHVybiBzdHIoc2VsZi5jbHVzdGVyLmdl - dF9mc2lkKCkpCgogICAgZGVmIF9jb21tb25fY21kX2pzb25fZ2VuKHNlbGYsIGNtZF9qc29uKToK - ICAgICAgICBjbWQgPSBqc29uLmR1bXBzKGNtZF9qc29uLCBzb3J0X2tleXM9VHJ1ZSkKICAgICAg - ICByZXRfdmFsLCBjbWRfb3V0LCBlcnJfbXNnID0gc2VsZi5jbHVzdGVyLm1vbl9jb21tYW5kKGNt - ZCwgYiIiKQogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIudmVyYm9zZToKICAgICAgICAgICAg - cHJpbnQoZiJDb21tYW5kIElucHV0OiB7Y21kfSIpCiAgICAgICAgICAgIHByaW50KAogICAgICAg - ICAgICAgICAgZiJSZXR1cm4gVmFsOiB7cmV0X3ZhbH1cbkNvbW1hbmQgT3V0cHV0OiB7Y21kX291 - dH1cbiIKICAgICAgICAgICAgICAgIGYiRXJyb3IgTWVzc2FnZToge2Vycl9tc2d9XG4tLS0tLS0t - LS0tXG4iCiAgICAgICAgICAgICkKICAgICAgICBqc29uX291dCA9IHt9CiAgICAgICAgIyBpZiB0 - aGVyZSBpcyBubyBlcnJvciAoaS5lOyByZXRfdmFsIGlzIFpFUk8pIGFuZCAnY21kX291dCcgaXMg - bm90IGVtcHR5CiAgICAgICAgIyB0aGVuIGNvbnZlcnQgJ2NtZF9vdXQnIHRvIGEganNvbiBvdXRw - dXQKICAgICAgICBpZiByZXRfdmFsID09IDAgYW5kIGNtZF9vdXQ6CiAgICAgICAgICAgIGpzb25f - b3V0ID0ganNvbi5sb2FkcyhjbWRfb3V0KQogICAgICAgIHJldHVybiByZXRfdmFsLCBqc29uX291 - dCwgZXJyX21zZwoKICAgIGRlZiBnZXRfY2VwaF9leHRlcm5hbF9tb25fZGF0YShzZWxmKToKICAg - ICAgICBjbWRfanNvbiA9IHsicHJlZml4IjogInF1b3J1bV9zdGF0dXMiLCAiZm9ybWF0IjogImpz - b24ifQogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIuZHJ5X3J1bjoKICAgICAgICAgICAgcmV0 - dXJuIHNlbGYuZHJ5X3J1bigiY2VwaCAiICsgY21kX2pzb25bInByZWZpeCJdKQogICAgICAgIHJl - dF92YWwsIGpzb25fb3V0LCBlcnJfbXNnID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRf - anNvbikKICAgICAgICAjIGlmIHRoZXJlIGlzIGFuIHVuc3VjY2Vzc2Z1bCBhdHRlbXB0LAogICAg - ICAgIGlmIHJldF92YWwgIT0gMCBvciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHJh - aXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAiJ3F1b3J1bV9z - dGF0dXMnIGNvbW1hbmQgZmFpbGVkLlxuIgogICAgICAgICAgICAgICAgZiJFcnJvcjoge2Vycl9t - c2cgaWYgcmV0X3ZhbCAhPSAwI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YgbGVuKHFfbGVhZGVyX2FkZHJ2ZWMpID4gMSBh - bmQgcV9sZWFkZXJfYWRkcnZlY1sxXVsidHlwZSJdID09ICJ2MiI6CiAgICAgICAgICAgICAgICBp - cF9hZGRyID0gcV9sZWFkZXJfYWRkcnZlY1sxXVsiYWRkciJdCiAgICAgICAgICAgIGVsc2U6CiAg - ICAgICAgICAgICAgICBzeXMuc3RkZXJyLndyaXRlKAogICAgICAgICAgICAgICAgICAgICIndjIn - IGFkZHJlc3MgdHlwZSBub3QgcHJlc2VudCwgYW5kICd2Mi1wb3J0LWVuYWJsZScgZmxhZyBpcyBw - cm92aWRlZCIKICAgICAgICAgICAgICAgICkKCiAgICAgICAgcmV0dXJuIGYie3N0cihxX2xlYWRl - cl9uYW1lKX09e2lwX2FkZHJ9IgoKICAgIGRlZiBfY29udmVydF9ob3N0bmFtZV90b19pcChzZWxm - LCBob3N0X25hbWUsIHBvcnQsIGlwX3R5cGUpOgogICAgICAgICMgaWYgJ2NsdXN0ZXInIGluc3Rh - bmNlIGlzIGEgZHVtbXkgdHlwZSwKICAgICAgICAjIGNhbGwgdGhlIGR1bW15IGluc3RhbmNlJ3Mg - ImNvbnZlcnQiIG1ldGhvZAogICAgICAgIGlmIG5vdCBob3N0X25hbWU6CiAgICAgICAgICAgIHJh - aXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oIkVtcHR5IGhvc3RuYW1lIHByb3ZpZGVkIikK - ICAgICAgICBpZiBpc2luc3RhbmNlKHNlbGYuY2x1c3RlciwgRHVtbXlSYWRvcyk6CiAgICAgICAg - ICAgIHJldHVybiBzZWxmLmNsdXN0ZXIuX2NvbnZlcnRfaG9zdG5hbWVfdG9faXAoaG9zdF9uYW1l - KQoKICAgICAgICBpZiBpcF90eXBlID09ICJGUUROIjoKICAgICAgICAgICAgIyBjaGVjayB3aGlj - aCBpcCBGUUROIHNob3VsZCBiZSBjb252ZXJ0ZWQgdG8sIElQdjQgb3IgSVB2NgogICAgICAgICAg - ICAjIGNoZWNrIHRoZSBob3N0IGlwLCB0aGUgZW5kcG9pbnQgaXAgdHlwZSB3b3VsZCBiZSBzaW1p - bGFyIHRvIGhvc3QgaXAKICAgICAgICAgICAgY21kX2pzb24gPSB7InByZWZpeCI6ICJvcmNoIGhv - c3QgbHMiLCAiZm9ybWF0IjogImpzb24ifQogICAgICAgICAgICByZXRfdmFsLCBqc29uX291dCwg - ZXJyX21zZyA9IHNlbGYuX2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pzb24pCiAgICAgICAgICAg - ICMgaWYgdGhlcmUgaXMgYW4gdW5zdWNjZXNzZnVsIGF0dGVtcHQsCiAgICAgICAgICAgIGlmIHJl - dF92YWwgIT0gMCBvciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgICAgICByYWlzZSBF - eGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgICInb3JjaCBob3N0 - IGxzJyBjb21tYW5kIGZhaWxlZC5cbiIKICAgICAgICAgICAgICAgICAgICBmIkVycm9yOiB7ZXJy - X21zZyBpZiByZXRfdmFsICE9IDAgZWxzZSBzZWxmLkVNUFRZX09VVFBVVF9MSVNUfSIKICAgICAg - ICAgICAgICAgICkKICAgICAgICAgICAgaG9zdF9hZGRyID0ganNvbl9vdXRbMF1bImFkZHIiXQog - ICAgICAgICAgICAjIGFkZCA6ODAgc2FtcGxlIHBvcnQgaW4gaXBfdHlwZSwgYXMgX2ludmFsaWRf - ZW5kcG9pbnQgYWxzbyB2ZXJpZnkgcG9ydAogICAgICAgICAgICBob3N0X2lwX3R5cGUgPSBzZWxm - Ll9pbnZhbGlkX2VuZHBvaW50KGhvc3RfYWRkciArICI6ODAiKQogICAgICAgICAgICBpbXBvcnQg - c29ja2V0CgogICAgICAgICAgICBpcCA9IFtdCiAgICAgICAgICAgICMgZXhhbXBsZSBvdXRwdXQg - Wyg8QWRkcmVzc0ZhbWlseS5BRl9JTkVUOiAyPiwgPFNvY2tldEtpbmQuU09DS19TVFJFQU06IDE+ - LCA2LCAnJywgKCc5My4xODQuMjE2LjM0JywgODApKSwgLi4uXQogICAgICAgICAgICAjIHdlIG5l - ZWQgdG8gZ2V0IDkzLjE4NC4yMTYuMzQgc28gaXQgd291bGQgYmUgaXBbMF1bNF1bMF0KICAgICAg - ICAgICAgaWYgaG9zdF9pcF90eXBlID09ICJJUHY2IjoKICAgICAgICAgICAgICAgIGlwID0gc29j - a2V0LmdldGFkZHJpbmZvKAogICAgICAgICAgICAgICAgICAgIGhvc3RfbmFtZSwgcG9ydCwgZmFt - aWx5PXNvY2tldC5BRl9JTkVUNiwgcHJvdG89c29ja2V0LklQUFJPVE9fVENQCiAgICAgICAgICAg - ICAgICApCiAgICAgICAgICAgIGVsaWYgaG9zdF9pcF90eXBlID09ICJJUHY0IjoKICAgICAgICAg - ICAgICAgIGlwID0gc29ja2V0LmdldGFkZHJpbmZvKAogICAgICAgICAgICAgICAgICAgIGhvc3Rf - bmFtZSwgcG9ydCwgZmFtaWx5PXNvY2tldC5BRl9JTkVULCBwcm90bz1zb2NrZXQuSVBQUk9UT19U - Q1AKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgZGVsIHNvY2tldAogICAgICAgICAgICBy - ZXR1cm4gaXBbMF1bNF1bMF0KICAgICAgICByZXR1cm4gaG9zdF9uYW1lCgogICAgZGVmIGdldF9h - Y3RpdmVfYW5kX3N0YW5kYnlfbWdycyhzZWxmKToKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2Vy - LmRyeV9ydW46CiAgICAgICAgICAgIHJldHVybiAiIiwgc2VsZi5kcnlfcnVuKCJjZXBoIHN0YXR1 - cyIpCiAgICAgICAgbW9uaXRvcmluZ19lbmRwb2ludF9wb3J0ID0gc2VsZi5fYXJnX3BhcnNlci5t - b25pdG9yaW5nX2VuZHBvaW50X3BvcnQKICAgICAgICBtb25pdG9yaW5nX2VuZHBvaW50X2lwX2xp - c3QgPSBzZWxmLl9hcmdfcGFyc2VyLm1vbml0b3JpbmdfZW5kcG9pbnQKICAgICAgICBzdGFuZGJ5 - X21ncnMgPSBbXQogICAgICAgIGlmIG5vdCBtb25pdG9yaW5nX2VuZHBvaW50X2lwX2xpc3Q6CiAg - ICAgICAgICAgIGNtZF9qc29uID0geyJwcmVmaXgiOiAic3RhdHVzIiwgImZvcm1hdCI6ICJqc29u - In0KICAgICAgICAgICAgcmV0X3ZhbCwganNvbl9vdXQsIGVycl9tc2cgPSBzZWxmLl9jb21tb25f - Y21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAgICAgICAjIGlmIHRoZXJlIGlzIGFuIHVuc3Vj - Y2Vzc2Z1bCBhdHRlbXB0LAogICAgICAgICAgICBpZiByZXRfdmFsICE9IDAgb3IgbGVuKGpzb25f - b3V0KSA9PSAwOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlv - bigKICAgICAgICAgICAgICAgICAgICAiJ21nciBzZXJ2aWNlcycgY29tbWFuZCBmYWlsZWQuXG4i - CiAgICAgICAgICAgICAgICAgICAgZiJFcnJvcjoge2Vycl9tc2cgaWYgcmV0X3ZhbCAhPSAwIGVs - c2Ugc2VsZi5FTVBUWV9PVVRQVVRfTElTVH0iCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAg - IG1vbml0b3JpbmdfZW5kcG9pbnQgPSAoCiAgICAgICAgICAgICAgICBqc29uX291dC5nZXQoIm1n - cm1hcCIsIHt9KS5nZXQoInNlcnZpY2VzIiwge30pLmdldCgicHJvbWV0aGV1cyIsICIiKQogICAg - ICAgICAgICApCiAgICAgICAgICAgIGlmIG5vdCBtb25pdG9yaW5nX2VuZHBvaW50OgogICAgICAg + Ii0tbW9uaXRvcmluZy1lbmRwb2ludC1wb3J0IiwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAg + ICAgICAgICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9IkNlcGggTWFuYWdlciBw + cm9tZXRoZXVzIGV4cG9ydGVyIHBvcnQiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAu + YWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1za2lwLW1vbml0b3JpbmctZW5kcG9pbnQiLAog + ICAgICAgICAgICBkZWZhdWx0PUZhbHNlLAogICAgICAgICAgICBhY3Rpb249InN0b3JlX3RydWUi + LAogICAgICAgICAgICBoZWxwPSJEbyBub3QgY2hlY2sgZm9yIGEgbW9uaXRvcmluZyBlbmRwb2lu + dCBmb3IgdGhlIENlcGggY2x1c3RlciIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5h + ZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXJiZC1tZXRhZGF0YS1lYy1wb29sLW5hbWUiLAog + ICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxzZSwKICAgICAg + ICAgICAgaGVscD0iUHJvdmlkZXMgdGhlIG5hbWUgb2YgZXJhc3VyZSBjb2RlZCBSQkQgbWV0YWRh + dGEgcG9vbCIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAg + ICAgICAgICAgICItLWRyeS1ydW4iLAogICAgICAgICAgICBkZWZhdWx0PUZhbHNlLAogICAgICAg + ICAgICBhY3Rpb249InN0b3JlX3RydWUiLAogICAgICAgICAgICBoZWxwPSJEcnkgcnVuIHByaW50 + cyB0aGUgZXhlY3V0ZWQgY29tbWFuZHMgd2l0aG91dCBydW5uaW5nIHRoZW0iLAogICAgICAgICkK + ICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1yYWRvcy1u + YW1lc3BhY2UiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1G + YWxzZSwKICAgICAgICAgICAgaGVscD0iRGl2aWRlcyBhIHBvb2wgaW50byBzZXBhcmF0ZSBsb2dp + Y2FsIG5hbWVzcGFjZXMsIHVzZWQgZm9yIGNyZWF0aW5nIFJCRCBQVkMgaW4gYSBDZXBoQmxvY2tQ + b29sUmFkb3NOYW1lc3BhY2UgKHNob3VsZCBiZSBsb3dlciBjYXNlKSIsCiAgICAgICAgKQogICAg + ICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXN1YnZvbHVtZS1n + cm91cCIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVkPUZhbHNl + LAogICAgICAgICAgICBoZWxwPSJwcm92aWRlcyB0aGUgbmFtZSBvZiB0aGUgc3Vidm9sdW1lIGdy + b3VwIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAg + ICAgICAgIi0tcmd3LXJlYWxtLW5hbWUiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAg + ICAgICByZXF1aXJlZD1GYWxzZSwKICAgICAgICAgICAgaGVscD0icHJvdmlkZXMgdGhlIG5hbWUg + b2YgdGhlIHJndy1yZWFsbSIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJn + dW1lbnQoCiAgICAgICAgICAgICItLXJndy16b25lLW5hbWUiLAogICAgICAgICAgICBkZWZhdWx0 + PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxzZSwKICAgICAgICAgICAgaGVscD0icHJvdmlk + ZXMgdGhlIG5hbWUgb2YgdGhlIHJndy16b25lIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dy + b3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmd3LXpvbmVncm91cC1uYW1lIiwKICAg + ICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAgICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAg + ICAgIGhlbHA9InByb3ZpZGVzIHRoZSBuYW1lIG9mIHRoZSByZ3ctem9uZWdyb3VwIiwKICAgICAg + ICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tdG9w + b2xvZ3ktcG9vbHMiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJl + ZD1GYWxzZSwKICAgICAgICAgICAgaGVscD0iY29tbWEtc2VwYXJhdGVkIGxpc3Qgb2YgdG9wb2xv + Z3ktY29uc3RyYWluZWQgcmJkIHBvb2xzIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3Vw + LmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tdG9wb2xvZ3ktZmFpbHVyZS1kb21haW4tbGFi + ZWwiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxzZSwK + ICAgICAgICAgICAgaGVscD0iazhzIGNsdXN0ZXIgZmFpbHVyZSBkb21haW4gbGFiZWwgKGV4YW1w + bGU6IHpvbmUsIHJhY2ssIG9yIGhvc3QpIGZvciB0aGUgdG9wb2xvZ3ktcG9vbHMgdGhhdCBtYXRj + aCB0aGUgY2VwaCBkb21haW4iLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2Fy + Z3VtZW50KAogICAgICAgICAgICAiLS10b3BvbG9neS1mYWlsdXJlLWRvbWFpbi12YWx1ZXMiLAog + ICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxzZSwKICAgICAg + ICAgICAgaGVscD0iY29tbWEtc2VwYXJhdGVkIGxpc3Qgb2YgdGhlIGs4cyBjbHVzdGVyIGZhaWx1 + cmUgZG9tYWluIHZhbHVlcyBjb3JyZXNwb25kaW5nIHRvIGVhY2ggb2YgdGhlIHBvb2xzIGluIHRo + ZSBgdG9wb2xvZ3ktcG9vbHNgIGxpc3QiLAogICAgICAgICkKCiAgICAgICAgdXBncmFkZV9nc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saW5lIGFyZ3VtZW50cwogICAg + ICAgIGNvbmZpZ19ncm91cCA9IGFyZ1AuYWRkX2FyZ3VtZW50X2dyb3VwKCJjb25maWciKQogICAg + ICAgIGNvbmZpZ19ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLWNvbmZpZy1maWxl + IiwKICAgICAgICAgICAgdHlwZT1zdHIsCiAgICAgICAgICAgIGhlbHA9IlBhdGggdG8gdGhlIGNv + bmZpZ3VyYXRpb24gZmlsZSwgUHJpb3JpdHk6IGNvbW1hbmQtbGluZS1hcmdzID4gY29uZmlnLmlu + aSBmaWxlIHZhbHVlcyA+IGRlZmF1bHQgdmFsdWVzIiwKICAgICAgICAgICAgcmVxdWlyZWQ9RmFs + c2UsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgKQoKICAgICAgICBpZiBhcmdzX3Rv + X3BhcnNlOgogICAgICAgICAgICBhc3NlcnQgKAogICAgICAgICAgICAgICAgdHlwZShhcmdzX3Rv + X3BhcnNlKSA9PSBsaXN0CiAgICAgICAgICAgICksICJBcmd1bWVudCB0byAnZ2VuX2FyZ19wYXJz + ZXInIHNob3VsZCBiZSBhIGxpc3QiCiAgICAgICAgZWxzZToKICAgICAgICAgICAgYXJnc190b19w + YXJzZSA9IHN5cy5hcmd2WzE6XQogICAgICAgIHJldHVybiBhcmdQLnBhcnNlX2FyZ3MoYXJnc190 + b19wYXJzZSkKCiAgICBkZWYgdmFsaWRhdGVfcmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZShzZWxm + KToKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJiZF9tZXRhZGF0YV9lY19wb29sX25hbWU6 + CiAgICAgICAgICAgIHJiZF9tZXRhZGF0YV9lY19wb29sX25hbWUgPSBzZWxmLl9hcmdfcGFyc2Vy + LnJiZF9tZXRhZGF0YV9lY19wb29sX25hbWUKICAgICAgICAgICAgcmJkX3Bvb2xfbmFtZSA9IHNl + bGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9vbF9uYW1lCgogICAgICAgICAgICBpZiByYmRfcG9v + bF9uYW1lID09ICIiOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2Vw + dGlvbigKICAgICAgICAgICAgICAgICAgICAiRmxhZyAnLS1yYmQtZGF0YS1wb29sLW5hbWUnIHNo + b3VsZCBub3QgYmUgZW1wdHkiCiAgICAgICAgICAgICAgICApCgogICAgICAgICAgICBpZiByYmRf + bWV0YWRhdGFfZWNfcG9vbF9uYW1lID09ICIiOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0 + aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICAiRmxhZyAnLS1yYmQtbWV0 + YWRhdGEtZWMtcG9vbC1uYW1lJyBzaG91bGQgbm90IGJlIGVtcHR5IgogICAgICAgICAgICAgICAg + KQoKICAgICAgICAgICAgY21kX2pzb24gPSB7InByZWZpeCI6ICJvc2QgZHVtcCIsICJmb3JtYXQi + OiAianNvbiJ9CiAgICAgICAgICAgIHJldF92YWwsIGpzb25fb3V0LCBlcnJfbXNnID0gc2VsZi5f + Y29tbW9uX2NtZF9qc29uX2dlbihjbWRfanNvbikKICAgICAgICAgICAgaWYgcmV0X3ZhbCAhPSAw + IG9yIGxlbihqc29uX291dCkgPT0gMDoKICAgICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZh + aWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgZiJ7Y21kX2pzb25bJ3ByZWZpeCdd + fSBjb21tYW5kIGZhaWxlZC5cbiIKICAgICAgICAgICAgICAgICAgICBmIkVycm9yOiB7ZXJyX21z + ZyBpZiByZXRfdmFsICE9IDAgZWxzZSBzZWxmLkVNUFRZX09VVFBVVF9MSVNUfSIKICAgICAgICAg + ICAgICAgICkKICAgICAgICAgICAgbWV0YWRhdGFfcG9vbF9leGlzdCwgcG9vbF9leGlzdCA9IEZh + bHNlLCBGYWxzZQoKICAgICAgICAgICAgZm9yIGtleSBpbiBqc29uX291dFsicG9vbHMiXToKICAg + ICAgICAgICAgICAgICMgaWYgZXJhc3VyZV9jb2RlX3Byb2ZpbGUgaXMgZW1wdHkgYW5kIHBvb2wg + bmFtZSBleGlzdHMgdGhlbiBpdCByZXBsaWNhIHBvb2wKICAgICAgICAgICAgICAgIGlmICgKICAg + ICAgICAgICAgICAgICAgICBrZXlbImVyYXN1cmVfY29kZV9wcm9maWxlIl0gPT0gIiIKICAgICAg + ICAgICAgICAgICAgICBhbmQga2V5WyJwb29sX25hbWUiXSA9PSByYmRfbWV0YWRhdGFfZWNfcG9v + bF9uYW1lCiAgICAgICAgICAgICAgICApOgogICAgICAgICAgICAgICAgICAgIG1ldGFkYXRhX3Bv + b2xfZXhpc3QgPSBUcnVlCiAgICAgICAgICAgICAgICAjIGlmIGVyYXN1cmVfY29kZV9wcm9maWxl + IGlzIG5vdCBlbXB0eSBhbmQgcG9vbCBuYW1lIGV4aXN0cyB0aGVuIGl0IGlzIGVjIHBvb2wKICAg + ICAgICAgICAgICAgIGlmIGtleVsiZXJhc3VyZV9jb2RlX3Byb2ZpbGUiXSBhbmQga2V5WyJwb29s + X25hbWUiXSA9PSByYmRfcG9vbF9uYW1lOgogICAgICAgICAgICAgICAgICAgIHBvb2xfZXhpc3Qg + PSBUcnVlCgogICAgICAgICAgICBpZiBub3QgbWV0YWRhdGFfcG9vbF9leGlzdDoKICAgICAgICAg + ICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAg + ICAgIlByb3ZpZGVkIHJiZF9lY19tZXRhZGF0YV9wb29sIG5hbWUsIgogICAgICAgICAgICAgICAg + ICAgIGYiIHtyYmRfbWV0YWRhdGFfZWNfcG9vbF9uYW1lfSwgZG9lcyBub3QgZXhpc3QiCiAgICAg + ICAgICAgICAgICApCiAgICAgICAgICAgIGlmIG5vdCBwb29sX2V4aXN0OgogICAgICAgICAgICAg + ICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICBm + IlByb3ZpZGVkIHJiZF9kYXRhX3Bvb2wgbmFtZSwge3JiZF9wb29sX25hbWV9LCBkb2VzIG5vdCBl + eGlzdCIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgcmV0dXJuIHJiZF9tZXRhZGF0YV9l + Y19wb29sX25hbWUKCiAgICBkZWYgZHJ5X3J1bihzZWxmLCBtc2cpOgogICAgICAgIGlmIHNlbGYu + X2FyZ19wYXJzZXIuZHJ5X3J1bjoKICAgICAgICAgICAgcHJpbnQoIkV4ZWN1dGU6ICIgKyAiJyIg + KyBtc2cgKyAiJyIpCgogICAgZGVmIHZhbGlkYXRlX3Jnd19lbmRwb2ludF90bHNfY2VydChzZWxm + KToKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJnd190bHNfY2VydF9wYXRoOgogICAgICAg + ICAgICB3aXRoIG9wZW4oc2VsZi5fYXJnX3BhcnNlci5yZ3dfdGxzX2NlcnRfcGF0aCwgZW5jb2Rp + bmc9InV0ZjgiKSBhcyBmOgogICAgICAgICAgICAgICAgY29udGVudHMgPSBmLnJlYWQoKQogICAg + ICAgICAgICAgICAgcmV0dXJuIGNvbnRlbnRzLnJzdHJpcCgpCgogICAgZGVmIF9jaGVja19jb25m + bGljdGluZ19vcHRpb25zKHNlbGYpOgogICAgICAgIGlmIG5vdCBzZWxmLl9hcmdfcGFyc2VyLnVw + Z3JhZGUgYW5kIG5vdCBzZWxmLl9hcmdfcGFyc2VyLnJiZF9kYXRhX3Bvb2xfbmFtZToKICAgICAg + ICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICJF + aXRoZXIgJy0tdXBncmFkZScgb3IgJy0tcmJkLWRhdGEtcG9vbC1uYW1lIDxwb29sX25hbWU+JyBz + aG91bGQgYmUgc3BlY2lmaWVkIgogICAgICAgICAgICApCgogICAgZGVmIF9pbnZhbGlkX2VuZHBv + aW50KHNlbGYsIGVuZHBvaW50X3N0cik6CiAgICAgICAgIyBleHRyYWN0IHRoZSBwb3J0IGJ5IGdl + dHRpbmcgdGhlIGxhc3Qgc3BsaXQgb24gYDpgIGRlbGltaXRlcgogICAgICAgIHRyeToKICAgICAg + ICAgICAgZW5kcG9pbnRfc3RyX2lwLCBwb3J0ID0gZW5kcG9pbnRfc3RyLnJzcGxpdCgiOiIsIDEp + CiAgICAgICAgZXhjZXB0IFZhbHVlRXJyb3I6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZh + aWx1cmVFeGNlcHRpb24oZiJOb3QgYSBwcm9wZXIgZW5kcG9pbnQ6IHtlbmRwb2ludF9zdHJ9IikK + CiAgICAgICAgdHJ5OgogICAgICAgICAgICBpZiBlbmRwb2ludF9zdHJfaXBbMF0gPT0gIlsiOgog + ICAgICAgICAgICAgICAgZW5kcG9pbnRfc3RyX2lwID0gZW5kcG9pbnRfc3RyX2lwWzEgOiBsZW4o + ZW5kcG9pbnRfc3RyX2lwKSAtIDFdCiAgICAgICAgICAgIGlwX3R5cGUgPSAoCiAgICAgICAgICAg + ICAgICAiSVB2NCIgaWYgdHlwZShpcF9hZGRyZXNzKGVuZHBvaW50X3N0cl9pcCkpIGlzIElQdjRB + ZGRyZXNzIGVsc2UgIklQdjYiCiAgICAgICAgICAgICkKICAgICAgICBleGNlcHQgVmFsdWVFcnJv + cjoKICAgICAgICAgICAgaXBfdHlwZSA9ICJGUUROIgogICAgICAgIGlmIG5vdCBwb3J0LmlzZGln + aXQoKToKICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbihmIlBvcnQg + bm90IHZhbGlkOiB7cG9ydH0iKQogICAgICAgIGludFBvcnQgPSBpbnQocG9ydCkKICAgICAgICBp + ZiBpbnRQb3J0IDwgMSBvciBpbnRQb3J0ID4gMioqMTYgLSAxOgogICAgICAgICAgICByYWlzZSBF + eGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKGYiT3V0IG9mIHJhbmdlIHBvcnQgbnVtYmVyOiB7cG9y + dH0iKQoKICAgICAgICByZXR1cm4gaXBfdHlwZQoKICAgIGRlZiBlbmRwb2ludF9kaWFsKHNlbGYs + IGVuZHBvaW50X3N0ciwgaXBfdHlwZSwgdGltZW91dD0zLCBjZXJ0PU5vbmUpOgogICAgICAgICMg + aWYgdGhlICdjbHVzdGVyJyBpbnN0YW5jZSBpcyBhIGR1bW15IG9uZSwKICAgICAgICAjIGRvbid0 + IHRyeSB0byByZWFjaCBvdXQgdG8gdGhlIGVuZHBvaW50CiAgICAgICAgaWYgaXNpbnN0YW5jZShz + ZWxmLmNsdXN0ZXIsIER1bW15UmFkb3MpOgogICAgICAgICAgICByZXR1cm4gIiIsICIiLCAiIgog + ICAgICAgIGlmIGlwX3R5cGUgPT0gIklQdjYiOgogICAgICAgICAgICB0cnk6CiAgICAgICAgICAg + ICAgICBlbmRwb2ludF9zdHJfaXAsIGVuZHBvaW50X3N0cl9wb3J0ID0gZW5kcG9pbnRfc3RyLnJz + cGxpdCgiOiIsIDEpCiAgICAgICAgICAgIGV4Y2VwdCBWYWx1ZUVycm9yOgogICAgICAgICAgICAg + ICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICBm + Ik5vdCBhIHByb3BlciBlbmRwb2ludDoge2VuZHBvaW50X3N0cn0iCiAgICAgICAgICAgICAgICAp + CiAgICAgICAgICAgIGlmIGVuZHBvaW50X3N0cl9pcFswXSAhPSAiWyI6CiAgICAgICAgICAgICAg + ICBlbmRwb2ludF9zdHJfaXAgPSAiWyIgKyBlbmRwb2ludF9zdHJfaXAgKyAiXSIKICAgICAgICAg + ICAgZW5kcG9pbnRfc3RyID0gIjoiLmpvaW4oW2VuZHBvaW50X3N0cl9pcCwgZW5kcG9pbnRfc3Ry + X3BvcnRdKQoKICAgICAgICBwcm90b2NvbHMgPSBbImh0dHAiLCAiaHR0cHMiXQogICAgICAgIHJl + c3BvbnNlX2Vycm9yID0gTm9uZQogICAgICAgIGZvciBwcmVmaXggaW4gcHJvdG9jb2xzOgogICAg + ICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICBlcCA9IGYie3ByZWZpeH06Ly97ZW5kcG9pbnRf + c3RyfSIKICAgICAgICAgICAgICAgIHZlcmlmeSA9IE5vbmUKICAgICAgICAgICAgICAgICMgSWYg + dmVyaWZ5IGlzIHNldCB0byBhIHBhdGggdG8gYSBkaXJlY3RvcnksCiAgICAgICAgICAgICAgICAj + IHRoZSBkaXJlY3RvcnkgbXVzdCBoYXZlIGJlZW4gcHJvY2Vzc2VkIHVzaW5nIHRoZSBjX3JlaGFz + aCB1dGlsaXR5IHN1cHBsaWVkIHdpdGggT3BlblNTTC4KICAgICAgICAgICAgICAgIGlmIHByZWZp + eCA9PSAiaHR0cHMiIGFuZCBzZWxmLl9hcmdfcGFyc2VyLnJnd19za2lwX3RsczoKICAgICAgICAg + ICAgICAgICAgICB2ZXJpZnkgPSBGYWxzZQogICAgICAgICAgICAgICAgICAgIHIgPSByZXF1ZXN0 + cy5oZWFkKGVwLCB0aW1lb3V0PXRpbWVvdXQsIHZlcmlmeT1GYWxzZSkKICAgICAgICAgICAgICAg + IGVsaWYgcHJlZml4ID09ICJodHRwcyIgYW5kIGNlcnQ6CiAgICAgICAgICAgICAgICAgICAgdmVy + aWZ5ID0gY2VydAogICAgICAgICAgICAgICAgICAgIHIgPSByZXF1ZXN0cy5oZWFkKGVwLCB0aW1l + b3V0PXRpbWVvdXQsIHZlcmlmeT1jZXJ0KQogICAgICAgICAgICAgICAgZWxzZToKICAgICAgICAg + ICAgICAgICAgICByID0gcmVxdWVzdHMuaGVhZChlcCwgdGltZW91dD10aW1lb3V0KQogICAgICAg + ICAgICAgICAgaWYgci5zdGF0dXNfY29kZSA9PSAyMDA6CiAgICAgICAgICAgICAgICAgICAgcmV0 + dXJuIHByZWZpeCwgdmVyaWZ5LCAiIgogICAgICAgICAgICBleGNlcHQgRXhjZXB0aW9uIGFzIGVy + cjoKICAgICAgICAgICAgICAgIHJlc3BvbnNlX2Vycm9yID0gZXJyCiAgICAgICAgICAgICAgICBj + b250aW51ZQogICAgICAgIHN5cy5zdGRlcnIud3JpdGUoCiAgICAgICAgICAgIGYidW5hYmxlIHRv + IGNvbm5lY3QgdG8gZW5kcG9pbnQ6IHtlbmRwb2ludF9zdHJ9LCBmYWlsZWQgZXJyb3I6IHtyZXNw + b25zZV9lcnJvcn0iCiAgICAgICAgKQogICAgICAgIHJldHVybiAoCiAgICAgICAgICAgICIiLAog + ICAgICAgICAgICAiIiwKICAgICAgICAgICAgKCItMSIpLAogICAgICAgICkKCiAgICBkZWYgcGFy + c2VfY29uZmlnX2ZpbGUoc2VsZiwgY29uZmlnX2ZpbGUpOgogICAgICAgIGNvbmZpZyA9IGNvbmZp + Z3BhcnNlci5Db25maWdQYXJzZXIoKQogICAgICAgIGNvbmZpZy5yZWFkKGNvbmZpZ19maWxlKQog + ICAgICAgIGZvciBhcmcgaW4gbGlzdCh2YXJzKHNlbGYuX2FyZ19wYXJzZXIpKToKICAgICAgICAg + ICAgIyBweXRob24gdHJlYXRzIGZsYWctbmFtZSBhcyBmbGFnX25hbWUgaW50ZXJuYWxseSwgc28g + Y29udmVydGluZyBiYWNrIHRvIGZsYWctbmFtZSwKICAgICAgICAgICAgIyBzbyB3ZSBjYW4gZ2V0 + IHRob3NlIHZhbHVlcyBmcm9tIGNvbmZpZyBmaWxlCiAgICAgICAgICAgIGFyZ3VtZW50ID0gYXJn + LnJlcGxhY2UoIl8iLCAiLSIpCiAgICAgICAgICAgIGFyZ3VtZW50VmFsdWUgPSBzdHIoZ2V0YXR0 + cihzZWxmLl9hcmdfcGFyc2VyLCBhcmcpKQogICAgICAgICAgICBjb25maWdfdmFsdWUgPSBjb25m + aWcuZ2V0KCJDb25maWd1cmF0aW9ucyIsIGFyZ3VtZW50LCBmYWxsYmFjaz1Ob25lKQogICAgICAg + ICAgICAjIGdpdmUgcHJpb3JpdHkgdG8gY29tbWFuZCBsaW5lIGFyZ3VtZW50LCBpZiBjb21tYW5k + IGxpbmUgYXJndW1lbnQgaXMgbm90IHByZXNlbnQgdXNlIGNvbmZpZy5pbmkgdmFsdWUsCiAgICAg + ICAgICAgIGlmIChzdHIoc3lzLmFyZ3YpLmZpbmQoYXJndW1lbnQpID09IC0xKSBhbmQgKAogICAg + ICAgICAgICAgICAgKGNvbmZpZ192YWx1ZSAhPSBOb25lKSBhbmQgKGNvbmZpZ192YWx1ZSAhPSAi + IikKICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIuX19zZXRh + dHRyX18oYXJnLCBjb25maWdfdmFsdWUpCgogICAgICAgIHJldHVybiBjb25maWcKCiAgICBkZWYg + X19pbml0X18oc2VsZiwgYXJnX2xpc3Q9Tm9uZSk6CiAgICAgICAgc2VsZi5vdXRfbWFwID0ge30K + ICAgICAgICBzZWxmLl9leGNsdWRlZF9rZXlzID0gc2V0KCkKICAgICAgICBzZWxmLl9hcmdfcGFy + c2VyID0gc2VsZi5nZW5fYXJnX3BhcnNlcihhcmdzX3RvX3BhcnNlPWFyZ19saXN0KQogICAgICAg + IGlmIHNlbGYuX2FyZ19wYXJzZXIuY29uZmlnX2ZpbGU6CiAgICAgICAgICAgIHNlbGYuY29uZmln + ID0gc2VsZi5wYXJzZV9jb25maWdfZmlsZShzZWxmLl9hcmdfcGFyc2VyLmNvbmZpZ19maWxlKQog + ICAgICAgIHNlbGYuX2NoZWNrX2NvbmZsaWN0aW5nX29wdGlvbnMoKQogICAgICAgIHNlbGYucnVu + X2FzX3VzZXIgPSBzZWxmLl9hcmdfcGFyc2VyLnJ1bl9hc191c2VyCiAgICAgICAgc2VsZi5vdXRw + dXRfZmlsZSA9IHNlbGYuX2FyZ19wYXJzZXIub3V0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mKToKICAgICAgICBp + ZiBzZWxmLmNsdXN0ZXIuc3RhdGUgPT0gImNvbm5lY3RlZCI6CiAgICAgICAgICAgIHNlbGYuY2x1 + c3Rlci5zaHV0ZG93bigpCgogICAgZGVmIGdldF9mc2lkKHNlbGYpOgogICAgICAgIGlmIHNlbGYu + X2FyZ19wYXJzZXIuZHJ5X3J1bjoKICAgICAgICAgICAgcmV0dXJuIHNlbGYuZHJ5X3J1bigiY2Vw + aCBmc2lkIikKICAgICAgICByZXR1cm4gc3RyKHNlbGYuY2x1c3Rlci5nZXRfZnNpZCgpKQoKICAg + IGRlZiBfY29tbW9uX2NtZF9qc29uX2dlbihzZWxmLCBjbWRfanNvbik6CiAgICAgICAgY21kID0g + anNvbi5kdW1wcyhjbWRfanNvbiwgc29ydF9rZXlzPVRydWUpCiAgICAgICAgcmV0X3ZhbCwgY21k + X291dCwgZXJyX21zZyA9IHNlbGYuY2x1c3Rlci5tb25fY29tbWFuZChjbWQsIGIiIikKICAgICAg + ICBpZiBzZWxmLl9hcmdfcGFyc2VyLnZlcmJvc2U6CiAgICAgICAgICAgIHByaW50KGYiQ29tbWFu + ZCBJbnB1dDoge2NtZH0iKQogICAgICAgICAgICBwcmludCgKICAgICAgICAgICAgICAgIGYiUmV0 + dXJuIFZhbDoge3JldF92YWx9XG5Db21tYW5kIE91dHB1dDoge2NtZF9vdXR9XG4iCiAgICAgICAg + ICAgICAgICBmIkVycm9yIE1lc3NhZ2U6IHtlcnJfbXNnfVxuLS0tLS0tLS0tLVxuIgogICAgICAg + ICAgICApCiAgICAgICAganNvbl9vdXQgPSB7fQogICAgICAgICMgaWYgdGhlcmUgaXMgbm8gZXJy + b3IgKGkuZTsgcmV0X3ZhbCBpcyBaRVJPKSBhbmQgJ2NtZF9vdXQnIGlzIG5vdCBlbXB0eQogICAg + ICAgICMgdGhlbiBjb252ZXJ0ICdjbWRfb3V0JyB0byBhIGpzb24gb3V0cHV0CiAgICAgICAgaWYg + cmV0X3ZhbCA9PSAwIGFuZCBjbWRfb3V0OgogICAgICAgICAgICBqc29uX291dCA9IGpzb24ubG9h + ZHMoY21kX291dCkKICAgICAgICByZXR1cm4gcmV0X3ZhbCwganNvbl9vdXQsIGVycl9tc2cKCiAg + ICBkZWYgZ2V0X2NlcGhfZXh0ZXJuYWxfbW9uX2RhdGEoc2VsZik6CiAgICAgICAgY21kX2pzb24g + PSB7InByZWZpeCI6ICJxdW9ydW1fc3RhdHVzIiwgImZvcm1hdCI6ICJqc29uIn0KICAgICAgICBp + ZiBzZWxmLl9hcmdfcGFyc2VyLmRyeV9ydW46CiAgICAgICAgICAgIHJldHVybiBzZWxmLmRyeV9y + dW4oImNlcGggIiArIGNtZF9qc29uWyJwcmVmaXgiXSkKICAgICAgICByZXRfdmFsLCBqc29uX291 + dCwgZXJyX21zZyA9IHNlbGYuX2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pzb24pCiAgICAgICAg + IyBpZiB0aGVyZSBpcyBhbiB1bnN1Y2Nlc3NmdWwgYXR0ZW1wdCwKICAgICAgICBpZiByZXRfdmFs + ICE9IDAgb3IgbGVuKGpzb25fb3V0KSA9PSAwOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25G + YWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgIidxdW9ydW1fc3RhdHVzJyBjb21tYW5k + IGZhaWxlZC5cbiIKICAgICAgICAgICAgICAgIGYiRXJyb3I6IHtlcnJfbXNnIGlmIHJldF92YWwg + IT0gMCBlbHNlIHNlbGYuRU1QVFlfT1VUUFVUX0xJU1R9IgogICAgICAgICAgICApCiAgICAgICAg + cV9sZWFkZXJfbmFtZSA9IGpzb25fb3V0WyJxdW9ydW1fbGVhZGVyX25hbWUiXQogICAgICAgIHFf + bGVhZGVyX2RldGFpbHMgPSB7fQogICAgICAgIHFfbGVhZGVyX21hdGNoaW5nX2xpc3QgPSBbCiAg + ICAgICAgICAgIGwgZm9yIGwgaW4ganNvbl9vdXRbIm1vbm1hcCJdWyJtb25zIl0gaWYgbFsibmFt + ZSJdID09IHFfbGVhZGVyX25hbWUKICAgICAgICBdCiAgICAgICAgaWYgbGVuKHFfbGVhZGVyX21h + dGNoaW5nX2xpc3QpID09IDA6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNl + cHRpb24oIk5vIG1hdGNoaW5nICdtb24nIGRldGFpbHMgZm91bmQiKQogICAgICAgIHFfbGVhZGVy + X2RldGFpbHMgPSBxX2xlYWRlcl9tYXRjaGluZ19saXN0WzBdCiAgICAgICAgIyBnZXQgdGhlIGFk + ZHJlc3MgdmVjdG9yIG9mIHRoZSBxdW9ydW0tbGVhZGVyCiAgICAgICAgcV9sZWFkZXJfYWRkcnZl + YyA9IHFfbGVhZGVyX2RldGFpbHMuZ2V0KCJwdWJsaWNfYWRkcnMiLCB7fSkuZ2V0KCJhZGRydmVj + IiwgW10pCiAgICAgICAgaXBfYWRkciA9IHN0cihxX2xlYWRlcl9kZXRhaWxzWyJwdWJsaWNfYWRk + ciJdLnNwbGl0KCIvIilbMF0pCgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIudjJfcG9ydF9l + bmFibGU6CiAgICAgICAgICAgIGlmIHFfbGVhZGVyX2FkZHJ2ZWNbMF1bInR5cGUiXSA9PSAidjIi + OgogICAgICAgICAgICAgICAgaXBfYWRkciA9IHFfbGVhZGVyX2FkZHJ2ZWNbMF1bImFkZHIiXQog + ICAgICAgICAgICBlbGlmIGxlbihxX2xlYWRlcl9hZGRydmVjKSA+IDEgYW5kIHFfbGVhZGVyX2Fk + ZHJ2ZWNbMV1bInR5cGUiXSA9PSAidjIiOgogICAgICAgICAgICAgICAgaXBfYWRkciA9IHFfbGVh + ZGVyX2FkZHJ2ZWNbMV1bImFkZHIiXQogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAg + c3lzLnN0ZGVyci53cml0ZSgKICAgICAgICAgICAgICAgICAgICAiJ3YyJyBhZGRyZXNzIHR5cGUg + bm90IHByZXNlbnQsIGFuZCAndjItcG9ydC1lbmFibGUnIGZsYWcgaXMgcHJvdmlkZWQiCiAgICAg + ICAgICAgICAgICApCgogICAgICAgIHJldHVybiBmIntzdHIocV9sZWFkZXJfbmFtZSl9PXtpcF9h + ZGRyfSIKCiAgICBkZWYgX2NvbnZlcnRfaG9zdG5hbWVfdG9faXAoc2VsZiwgaG9zdF9uYW1lLCBw + b3J0LCBpcF90eXBlKToKICAgICAgICAjIGlmICdjbHVzdGVyJyBpbnN0YW5jZSBpcyBhIGR1bW15 + IHR5cGUsCiAgICAgICAgIyBjYWxsIHRoZSBkdW1teSBpbnN0YW5jZSdzICJjb252ZXJ0IiBtZXRo + b2QKICAgICAgICBpZiBub3QgaG9zdF9uYW1lOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25G + YWlsdXJlRXhjZXB0aW9uKCJFbXB0eSBob3N0bmFtZSBwcm92aWRlZCIpCiAgICAgICAgaWYgaXNp + bnN0YW5jZShzZWxmLmNsdXN0ZXIsIER1bW15UmFkb3MpOgogICAgICAgICAgICByZXR1cm4gc2Vs + Zi5jbHVzdGVyLl9jb252ZXJ0X2hvc3RuYW1lX3RvX2lwKGhvc3RfbmFtZSkKCiAgICAgICAgaWYg + aXBfdHlwZSA9PSAiRlFETiI6CiAgICAgICAgICAgICMgY2hlY2sgd2hpY2ggaXAgRlFETiBzaG91 + bGQgYmUgY29udmVydGVkIHRvLCBJUHY0IG9yIElQdjYKICAgICAgICAgICAgIyBjaGVjayB0aGUg + aG9zdCBpcCwgdGhlIGVuZHBvaW50IGlwIHR5cGUgd291bGQgYmUgc2ltaWxhciB0byBob3N0IGlw + CiAgICAgICAgICAgIGNtZF9qc29uID0geyJwcmVmaXgiOiAib3JjaCBob3N0IGxzIiwgImZvcm1h + dCI6ICJqc29uIn0KICAgICAgICAgICAgcmV0X3ZhbCwganNvbl9vdXQsIGVycl9tc2cgPSBzZWxm + Ll9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAgICAgICAjIGlmIHRoZXJlIGlz + IGFuIHVuc3VjY2Vzc2Z1bCBhdHRlbXB0LAogICAgICAgICAgICBpZiByZXRfdmFsICE9IDAgb3Ig + bGVuKGpzb25fb3V0KSA9PSAwOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVy + ZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICAiJ29yY2ggaG9zdCBscycgY29tbWFuZCBm + YWlsZWQuXG4iCiAgICAgICAgICAgICAgICAgICAgZiJFcnJvcjoge2Vycl9tc2cgaWYgcmV0X3Zh + bCAhPSAwIGVsc2Ugc2VsZi5FTVBUWV9PVVRQVVRfTElTVH0iCiAgICAgICAgICAgICAgICApCiAg + ICAgICAgICAgIGhvc3RfYWRkciA9IGpzb25fb3V0WzBdWyJhZGRyIl0KICAgICAgICAgICAgIyBh + ZGQgOjgwIHNhbXBsZSBwb3J0IGluIGlwX3R5cGUsIGFzIF9pbnZhbGlkX2VuZHBvaW50IGFsc28g + dmVyaWZ5IHBvcnQKICAgICAgICAgICAgaG9zdF9pcF90eXBlID0gc2VsZi5faW52YWxpZF9lbmRw + b2ludChob3N0X2FkZHIgKyAiOjgwIikKICAgICAgICAgICAgaW1wb3J0IHNvY2tldAoKICAgICAg + ICAgICAgaXAgPSBbXQogICAgICAgICAgICAjIGV4YW1wbGUgb3V0cHV0IFsoPEFkZHJlc3NGYW1p + bHkuQUZfSU5FVDogMj4sIDxTb2NrZXRLaW5kLlNPQ0tfU1RSRUFNOiAxPiwgNiwgJycsICgnOTMu + MTg0LjIxNi4zNCcsIDgwKSksIC4uLl0KICAgICAgICAgICAgIyB3ZSBuZWVkIHRvIGdldCA5My4x + ODQuMjE2LjM0IHNvIGl0IHdvdWxkIGJlIGlwWzBdWzRdWzBdCiAgICAgICAgICAgIGlmIGhvc3Rf + aXBfdHlwZSA9PSAiSVB2NiI6CiAgICAgICAgICAgICAgICBpcCA9IHNvY2tldC5nZXRhZGRyaW5m + bygKICAgICAgICAgICAgICAgICAgICBob3N0X25hbWUsIHBvcnQsIGZhbWlseT1zb2NrZXQuQUZf + SU5FVDYsIHByb3RvPXNvY2tldC5JUFBST1RPX1RDUAogICAgICAgICAgICAgICAgKQogICAgICAg + ICAgICBlbGlmIGhvc3RfaXBfdHlwZSA9PSAiSVB2NCI6CiAgICAgICAgICAgICAgICBpcCA9IHNv + Y2tldC5nZXRhZGRyaW5mbygKICAgICAgICAgICAgICAgICAgICBob3N0X25hbWUsIHBvcnQsIGZh + bWlseT1zb2NrZXQuQUZfSU5FVCwgcHJvdG89c29ja2V0LklQUFJPVE9fVENQCiAgICAgICAgICAg + ICAgICApCiAgICAgICAgICAgIGRlbCBzb2NrZXQKICAgICAgICAgICAgcmV0dXJuIGlwWzBdWzRd + WzBdCiAgICAgICAgcmV0dXJuIGhvc3RfbmFtZQoKICAgIGRlZiBnZXRfYWN0aXZlX2FuZF9zdGFu + ZGJ5X21ncnMoc2VsZik6CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAg + ICAgICAgICByZXR1cm4gIiIsIHNlbGYuZHJ5X3J1bigiY2VwaCBzdGF0dXMiKQogICAgICAgIG1v + bml0b3JpbmdfZW5kcG9pbnRfcG9ydCA9IHNlbGYuX2FyZ19wYXJzZXIubW9uaXRvcmluZ19lbmRw + b2ludF9wb3J0CiAgICAgICAgbW9uaXRvcmluZ19lbmRwb2ludF9pcF9saXN0ID0gc2VsZi5fYXJn + X3BhcnNlci5tb25pdG9yaW5nX2VuZHBvaW50CiAgICAgICAgc3RhbmRieV9tZ3JzID0gW10KICAg + ICAgICBpZiBub3QgbW9uaXRvcmluZ19lbmRwb2ludF9pcF9saXN0OgogICAgICAgICAgICBjbWRf + anNvbiA9IHsicHJlZml4IjogInN0YXR1cyIsICJmb3JtYXQiOiAianNvbiJ9CiAgICAgICAgICAg + IHJldF92YWwsIGpzb25fb3V0LCBlcnJfbXNnID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihj + bWRfanNvbikKICAgICAgICAgICAgIyBpZiB0aGVyZSBpcyBhbiB1bnN1Y2Nlc3NmdWwgYXR0ZW1w + dCwKICAgICAgICAgICAgaWYgcmV0X3ZhbCAhPSAwIG9yIGxlbihqc29uX291dCkgPT0gMDoKICAg + ICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAg + ICAgICAgICAgIidtZ3Igc2VydmljZXMnIGNvbW1hbmQgZmFpbGVkLlxuIgogICAgICAgICAgICAg + ICAgICAgIGYiRXJyb3I6IHtlcnJfbXNnIGlmIHJldF92YWwgIT0gMCBlbHNlIHNlbGYuRU1QVFlf + T1VUUFVUX0xJU1R9IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBtb25pdG9yaW5nX2Vu + ZHBvaW50ID0gKAogICAgICAgICAgICAgICAganNvbl9vdXQuZ2V0KCJtZ3JtYXAiLCB7fSkuZ2V0 + KCJzZXJ2aWNlcyIsIHt9KS5nZXQoInByb21ldGhldXMiLCAiIikKICAgICAgICAgICAgKQogICAg + ICAgICAgICBpZiBub3QgbW9uaXRvcmluZ19lbmRwb2ludDoKICAgICAgICAgICAgICAgIHJhaXNl + IEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgImNhbid0IGZp + bmQgbW9uaXRvcmluZ19lbmRwb2ludCwgcHJvbWV0aGV1cyBtb2R1bGUgbWlnaHQgbm90IGJlIGVu + YWJsZWQsICIKICAgICAgICAgICAgICAgICAgICAiZW5hYmxlIHRoZSBtb2R1bGUgYnkgcnVubmlu + ZyAnY2VwaCBtZ3IgbW9kdWxlIGVuYWJsZSBwcm9tZXRoZXVzJyIKICAgICAgICAgICAgICAgICkK + ICAgICAgICAgICAgIyBub3cgY2hlY2sgdGhlIHN0YW5kLWJ5IG1nci1zCiAgICAgICAgICAgIHN0 + YW5kYnlfYXJyID0ganNvbl9vdXQuZ2V0KCJtZ3JtYXAiLCB7fSkuZ2V0KCJzdGFuZGJ5cyIsIFtd + KQogICAgICAgICAgICBmb3IgZWFjaF9zdGFuZGJ5IGluIHN0YW5kYnlfYXJyOgogICAgICAgICAg + ICAgICAgaWYgIm5hbWUiIGluIGVhY2hfc3RhbmRieS5rZXlzKCk6CiAgICAgICAgICAgICAgICAg + ICAgc3RhbmRieV9tZ3JzLmFwcGVuZChlYWNoX3N0YW5kYnlbIm5hbWUiXSkKICAgICAgICAgICAg + dHJ5OgogICAgICAgICAgICAgICAgcGFyc2VkX2VuZHBvaW50ID0gdXJscGFyc2UobW9uaXRvcmlu + Z19lbmRwb2ludCkKICAgICAgICAgICAgZXhjZXB0IFZhbHVlRXJyb3I6CiAgICAgICAgICAgICAg + ICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgIGYi + aW52YWxpZCBlbmRwb2ludDoge21vbml0b3JpbmdfZW5kcG9pbnR9IgogICAgICAgICAgICAgICAg + KQogICAgICAgICAgICBtb25pdG9yaW5nX2VuZHBvaW50X2lwX2xpc3QgPSBwYXJzZWRfZW5kcG9p + bnQuaG9zdG5hbWUKICAgICAgICAgICAgaWYgbm90IG1vbml0b3JpbmdfZW5kcG9pbnRfcG9ydDoK + ICAgICAgICAgICAgICAgIG1vbml0b3JpbmdfZW5kcG9pbnRfcG9ydCA9IHN0cihwYXJzZWRfZW5k + cG9pbnQucG9ydCkKCiAgICAgICAgIyBpZiBtb25pdG9yaW5nIGVuZHBvaW50IHBvcnQgaXMgbm90 + IHNldCwgcHV0IGEgZGVmYXVsdCBtb24gcG9ydAogICAgICAgIGlmIG5vdCBtb25pdG9yaW5nX2Vu + ZHBvaW50X3BvcnQ6CiAgICAgICAgICAgIG1vbml0b3JpbmdfZW5kcG9pbnRfcG9ydCA9IHNlbGYu + REVGQVVMVF9NT05JVE9SSU5HX0VORFBPSU5UX1BPUlQKCiAgICAgIC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pvaW4oCiAgICAg + ICAgICAgIFttb25pdG9yaW5nX2VuZHBvaW50X2lwLCBtb25pdG9yaW5nX2VuZHBvaW50X3BvcnRd + CiAgICAgICAgKQogICAgICAgIGlwX3R5cGUgPSBzZWxmLl9pbnZhbGlkX2VuZHBvaW50KG1vbml0 + b3JpbmdfZW5kcG9pbnQpCiAgICAgICAgdHJ5OgogICAgICAgICAgICBtb25pdG9yaW5nX2VuZHBv + aW50X2lwID0gc2VsZi5fY29udmVydF9ob3N0bmFtZV90b19pcCgKICAgICAgICAgICAgICAgIG1v + bml0b3JpbmdfZW5kcG9pbnRfaXAsIG1vbml0b3JpbmdfZW5kcG9pbnRfcG9ydCwgaXBfdHlwZQog + ICAgICAgICAgICApCiAgICAgICAgICAgICMgY29sbGVjdCBhbGwgdGhlICdzdGFuZC1ieScgbWdy + IGlwcwogICAgICAgICAgICBtZ3JfaXBzID0gW10KICAgICAgICAgICAgZm9yIGVhY2hfc3RhbmRi + eV9tZ3IgaW4gc3RhbmRieV9tZ3JzOgogICAgICAgICAgICAgICAgZmFpbGVkX2lwID0gZWFjaF9z + dGFuZGJ5X21ncgogICAgICAgICAgICAgICAgbWdyX2lwcy5hcHBlbmQoCiAgICAgICAgICAgICAg + ICAgICAgc2VsZi5fY29udmVydF9ob3N0bmFtZV90b19pcCgKICAgICAgICAgICAgICAgICAgICAg + ICAgZWFjaF9zdGFuZGJ5X21nciwgbW9uaXRvcmluZ19lbmRwb2ludF9wb3J0LCBpcF90eXBlCiAg + ICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgKQogICAgICAgIGV4Y2VwdDoKICAg ICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAg - ICAgICAiY2FuJ3QgZmluZCBtb25pdG9yaW5nX2VuZHBvaW50LCBwcm9tZXRoZXVzIG1vZHVsZSBt - aWdodCBub3QgYmUgZW5hYmxlZCwgIgogICAgICAgICAgICAgICAgICAgICJlbmFibGUgdGhlIG1v - ZHVsZSBieSBydW5uaW5nICdjZXBoIG1nciBtb2R1bGUgZW5hYmxlIHByb21ldGhldXMnIgogICAg - ICAgICAgICAgICAgKQogICAgICAgICAgICAjIG5vdyBjaGVjayB0aGUgc3RhbmQtYnkgbWdyLXMK - ICAgICAgICAgICAgc3RhbmRieV9hcnIgPSBqc29uX291dC5nZXQoIm1ncm1hcCIsIHt9KS5nZXQo - InN0YW5kYnlzIiwgW10pCiAgICAgICAgICAgIGZvciBlYWNoX3N0YW5kYnkgaW4gc3RhbmRieV9h - cnI6CiAgICAgICAgICAgICAgICBpZiAibmFtZSIgaW4gZWFjaF9zdGFuZGJ5LmtleXMoKToKICAg - ICAgICAgICAgICAgICAgICBzdGFuZGJ5X21ncnMuYXBwZW5kKGVhY2hfc3RhbmRieVsibmFtZSJd - KQogICAgICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICBwYXJzZWRfZW5kcG9pbnQgPSB1cmxw - YXJzZShtb25pdG9yaW5nX2VuZHBvaW50KQogICAgICAgICAgICBleGNlcHQgVmFsdWVFcnJvcjoK - ICAgICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAg - ICAgICAgICAgICAgZiJpbnZhbGlkIGVuZHBvaW50OiB7bW9uaXRvcmluZ19lbmRwb2ludH0iCiAg - ICAgICAgICAgICAgICApCiAgICAgICAgICAgIG1vbml0b3JpbmdfZW5kcG9pbnRfaXBfbGlzdCA9 - IHBhcnNlZF9lbmRwb2ludC5ob3N0bmFtZQogICAgICAgICAgICBpZiBub3QgbW9uaXRvcmluZ19l - bmRwb2ludF9wb3J0OgogICAgICAgICAgICAgICAgbW9uaXRvcmluZ19lbmRwb2ludF9wb3J0ID0g - c3RyKHBhcnNlZF9lbmRwb2ludC5wb3J0KQoKICAgICAgICAjIGlmIG1vbml0b3JpbmcgZW5kcG9p - bnQgcG9ydCBpcyBub3Qgc2V0LCBwdXQg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N0YW5kYnlfbWdycy5leHRlbmQo - bW9uaXRvcmluZ19lbmRwb2ludF9pcF9saXN0X3NwbGl0WzE6XSkKICAgICAgICBmYWlsZWRfaXAg - PSBtb25pdG9yaW5nX2VuZHBvaW50X2lwCgogICAgICAgIG1vbml0b3JpbmdfZW5kcG9pbnQgPSAi - OiIuam9pbigKICAgICAgICAgICAgW21vbml0b3JpbmdfZW5kcG9pbnRfaXAsIG1vbml0b3Jpbmdf - ZW5kcG9pbnRfcG9ydF0KICAgICAgICApCiAgICAgICAgaXBfdHlwZSA9IHNlbGYuX2ludmFsaWRf - ZW5kcG9pbnQobW9uaXRvcmluZ19lbmRwb2ludCkKICAgICAgICB0cnk6CiAgICAgICAgICAgIG1v - bml0b3JpbmdfZW5kcG9pbnRfaXAgPSBzZWxmLl9jb252ZXJ0X2hvc3RuYW1lX3RvX2lwKAogICAg - ICAgICAgICAgICAgbW9uaXRvcmluZ19lbmRwb2ludF9pcCwgbW9uaXRvcmluZ19lbmRwb2ludF9w - b3J0LCBpcF90eXBlCiAgICAgICAgICAgICkKICAgICAgICAgICAgIyBjb2xsZWN0IGFsbCB0aGUg - J3N0YW5kLWJ5JyBtZ3IgaXBzCiAgICAgICAgICAgIG1ncl9pcHMgPSBbXQogICAgICAgICAgICBm - b3IgZWFjaF9zdGFuZGJ5X21nciBpbiBzdGFuZGJ5X21ncnM6CiAgICAgICAgICAgICAgICBmYWls - ZWRfaXAgPSBlYWNoX3N0YW5kYnlfbWdyCiAgICAgICAgICAgICAgICBtZ3JfaXBzLmFwcGVuZCgK - ICAgICAgICAgICAgICAgICAgICBzZWxmLl9jb252ZXJ0X2hvc3RuYW1lX3RvX2lwKAogICAgICAg - ICAgICAgICAgICAgICAgICBlYWNoX3N0YW5kYnlfbWdyLCBtb25pdG9yaW5nX2VuZHBvaW50X3Bv - cnQsIGlwX3R5cGUKICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICApCiAgICAg - ICAgZXhjZXB0OgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAog - ICAgICAgICAgICAgICAgZiJDb252ZXJzaW9uIG9mIGhvc3Q6IHtmYWlsZWRfaXB9IHRvIElQIGZh - aWxlZC4gIgogICAgICAgICAgICAgICAgIlBsZWFzZSBlbnRlciB0aGUgSVAgYWRkcmVzc2VzIG9m - IGFsbCB0aGUgY2VwaC1tZ3JzIHdpdGggdGhlICctLW1vbml0b3JpbmctZW5kcG9pbnQnIGZsYWci - CiAgICAgICAgICAgICkKCiAgICAgICAgXywgXywgZXJyID0gc2VsZi5lbmRwb2ludF9kaWFsKG1v - bml0b3JpbmdfZW5kcG9pbnQsIGlwX3R5cGUpCiAgICAgICAgaWYgZXJyID09ICItMSI6CiAgICAg - ICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oZXJyKQogICAgICAgICMgYWRk - IHRoZSB2YWxpZGF0ZWQgYWN0aXZlIG1nciBJUCBpbnRvIHRoZSBmaXJzdCBpbmRleAogICAgICAg - IG1ncl9pcHMuaW5zZXJ0KDAsIG1vbml0b3JpbmdfZW5kcG9pbnRfaXApCiAgICAgICAgYWxsX21n - cl9pcHNfc3RyID0gIiwiLmpvaW4obWdyX2lwcykKICAgICAgICByZXR1cm4gYWxsX21ncl9pcHNf - c3RyLCBtb25pdG9yaW5nX2VuZHBvaW50X3BvcnQKCiAgICBkZWYgY2hlY2tfdXNlcl9leGlzdChz - ZWxmLCB1c2VyKToKICAgICAgICBjbWRfanNvbiA9IHsicHJlZml4IjogImF1dGggZ2V0IiwgImVu - dGl0eSI6IGYie3VzZXJ9IiwgImZvcm1hdCI6ICJqc29uIn0KICAgICAgICByZXRfdmFsLCBqc29u - X291dCwgXyA9IHNlbGYuX2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pzb24pCiAgICAgICAgaWYg - cmV0X3ZhbCAhPSAwIG9yIGxlbihqc29uX291dCkgPT0gMDoKICAgICAgICAgICAgcmV0dXJuICIi - CiAgICAgICAgcmV0dXJuIHN0cihqc29uX291dFswXVsia2V5Il0pCgogICAgZGVmIGdldF9jZXBo - ZnNfcHJvdmlzaW9uZXJfY2Fwc19hbmRfZW50aXR5KHNlbGYpOgogICAgICAgIGVudGl0eSA9ICJj - bGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciIKICAgICAgICBjYXBzID0gewogICAgICAgICAg + IGYiQ29udmVyc2lvbiBvZiBob3N0OiB7ZmFpbGVkX2lwfSB0byBJUCBmYWlsZWQuICIKICAgICAg + ICAgICAgICAgICJQbGVhc2UgZW50ZXIgdGhlIElQIGFkZHJlc3NlcyBvZiBhbGwgdGhlIGNlcGgt + bWdycyB3aXRoIHRoZSAnLS1tb25pdG9yaW5nLWVuZHBvaW50JyBmbGFnIgogICAgICAgICAgICAp + CgogICAgICAgIF8sIF8sIGVyciA9IHNlbGYuZW5kcG9pbnRfZGlhbChtb25pdG9yaW5nX2VuZHBv + aW50LCBpcF90eXBlKQogICAgICAgIGlmIGVyciA9PSAiLTEiOgogICAgICAgICAgICByYWlzZSBF + eGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKGVycikKICAgICAgICAjIGFkZCB0aGUgdmFsaWRhdGVk + IGFjdGl2ZSBtZ3IgSVAgaW50byB0aGUgZmlyc3QgaW5kZXgKICAgICAgICBtZ3JfaXBzLmluc2Vy + dCgwLCBtb25pdG9yaW5nX2VuZHBvaW50X2lwKQogICAgICAgIGFsbF9tZ3JfaXBzX3N0ciA9ICIs + Ii5qb2luKG1ncl9pcHMpCiAgICAgICAgcmV0dXJuIGFsbF9tZ3JfaXBzX3N0ciwgbW9uaXRvcmlu + Z19lbmRwb2ludF9wb3J0CgogICAgZGVmIGNoZWNrX3VzZXJfZXhpc3Qoc2VsZiwgdXNlcik6CiAg + ICAgICAgY21kX2pzb24gPSB7InByZWZpeCI6ICJhdXRoIGdldCIsICJlbnRpdHkiOiBmInt1c2Vy + fSIsICJmb3JtYXQiOiAianNvbiJ9CiAgICAgICAgcmV0X3ZhbCwganNvbl9vdXQsIF8gPSBzZWxm + Ll9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAgIGlmIHJldF92YWwgIT0gMCBv + ciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHJldHVybiAiIgogICAgICAgIHJldHVy + biBzdHIoanNvbl9vdXRbMF1bImtleSJdKQoKICAgIGRlZiBnZXRfY2VwaGZzX3Byb3Zpc2lvbmVy + X2NhcHNfYW5kX2VudGl0eShzZWxmKToKICAgICAgICBlbnRpdHkgPSAiY2xpZW50LmNzaS1jZXBo + ZnMtcHJvdmlzaW9uZXIiCiAgICAgICAgY2FwcyA9IHsKICAgICAgICAgICAgIm1vbiI6ICJhbGxv + dyByLCBhbGxvdyBjb21tYW5kICdvc2QgYmxvY2tsaXN0JyIsCiAgICAgICAgICAgICJtZ3IiOiAi + YWxsb3cgcnciLAogICAgICAgICAgICAib3NkIjogImFsbG93IHJ3IHRhZyBjZXBoZnMgbWV0YWRh + dGE9KiIsCiAgICAgICAgICAgICJtZHMiOiAiYWxsb3cgKiIsCiAgICAgICAgfQogICAgICAgIGlm + IHNlbGYuX2FyZ19wYXJzZXIucmVzdHJpY3RlZF9hdXRoX3Blcm1pc3Npb246CiAgICAgICAgICAg + IGs4c19jbHVzdGVyX25hbWUgPSBzZWxmLl9hcmdfcGFyc2VyLms4c19jbHVzdGVyX25hbWUKICAg + ICAgICAgICAgaWYgazhzX2NsdXN0ZXJfbmFtZSA9PSAiIjoKICAgICAgICAgICAgICAgIHJhaXNl + IEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIms4c19jbHVz + dGVyX25hbWUgbm90IGZvdW5kLCBwbGVhc2Ugc2V0IHRoZSAnLS1rOHMtY2x1c3Rlci1uYW1lJyBm + bGFnIgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBjZXBoZnNfZmlsZXN5c3RlbSA9IHNl + bGYuX2FyZ19wYXJzZXIuY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZQogICAgICAgICAgICBpZiBjZXBo + ZnNfZmlsZXN5c3RlbSA9PSAiIjoKICAgICAgICAgICAgICAgIGVudGl0eSA9IGYie2VudGl0eX0t + e2s4c19jbHVzdGVyX25hbWV9IgogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgZW50 + aXR5ID0gZiJ7ZW50aXR5fS17azhzX2NsdXN0ZXJfbmFtZX0te2NlcGhmc19maWxlc3lzdGVtfSIK + ICAgICAgICAgICAgICAgIGNhcHNbIm9zZCJdID0gZiJhbGxvdyBydyB0YWcgY2VwaGZzIG1ldGFk + YXRhPXtjZXBoZnNfZmlsZXN5c3RlbX0iCgogICAgICAgIHJldHVybiBjYXBzLCBlbnRpdHkKCiAg + ICBkZWYgZ2V0X2NlcGhmc19ub2RlX2NhcHNfYW5kX2VudGl0eShzZWxmKToKICAgICAgICBlbnRp + dHkgPSAiY2xpZW50LmNzaS1jZXBoZnMtbm9kZSIKICAgICAgICBjYXBzID0gewogICAgICAgICAg ICAibW9uIjogImFsbG93IHIsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xpc3QnIiwKICAgICAg ICAgICAgIm1nciI6ICJhbGxvdyBydyIsCiAgICAgICAgICAgICJvc2QiOiAiYWxsb3cgcncgdGFn - IGNlcGhmcyBtZXRhZGF0YT0qIiwKICAgICAgICB9CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNl - ci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbjoKICAgICAgICAgICAgazhzX2NsdXN0ZXJfbmFt - ZSA9IHNlbGYuX2FyZ19wYXJzZXIuazhzX2NsdXN0ZXJfbmFtZQogICAgICAgICAgICBpZiBrOHNf - Y2x1c3Rlcl9uYW1lID09ICIiOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVy - ZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICAiazhzX2NsdXN0ZXJfbmFtZSBub3QgZm91 - bmQsIHBsZWFzZSBzZXQgdGhlICctLWs4cy1jbHVzdGVyLW5hbWUnIGZsYWciCiAgICAgICAgICAg - ICAgICApCiAgICAgICAgICAgIGNlcGhmc19maWxlc3lzdGVtID0gc2VsZi5fYXJnX3BhcnNlci5j - ZXBoZnNfZmlsZXN5c3RlbV9uYW1lCiAgICAgICAgICAgIGlmIGNlcGhmc19maWxlc3lzdGVtID09 - ICIiOgogICAgICAgICAgICAgICAgZW50aXR5ID0gZiJ7ZW50aXR5fS17azhzX2NsdXN0ZXJfbmFt - ZX0iCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBlbnRpdHkgPSBmIntlbnRpdHl9 - LXtrOHNfY2x1c3Rlcl9uYW1lfS17Y2VwaGZzX2ZpbGVzeXN0ZW19IgogICAgICAgICAgICAgICAg - Y2Fwc1sib3NkIl0gPSBmImFsbG93IHJ3IHRhZyBjZXBoZnMgbWV0YWRhdGE9e2NlcGhmc19maWxl - c3lzdGVtfSIKCiAgICAgICAgcmV0dXJuIGNhcHMsIGVudGl0eQoKICAgIGRlZiBnZXRfY2VwaGZz - X25vZGVfY2Fwc19hbmRfZW50aXR5KHNlbGYpOgogICAgICAgIGVudGl0eSA9ICJjbGllbnQuY3Np - LWNlcGhmcy1ub2RlIgogICAgICAgIGNhcHMgPSB7CiAgICAgICAgICAgICJtb24iOiAiYWxsb3cg - ciwgYWxsb3cgY29tbWFuZCAnb3NkIGJsb2NrbGlzdCciLAogICAgICAgICAgICAibWdyIjogImFs - bG93IHJ3IiwKICAgICAgICAgICAgIm9zZCI6ICJhbGxvdyBydyB0YWcgY2VwaGZzICo9KiIsCiAg - ICAgICAgICAgICJtZHMiOiAiYWxsb3cgcnciLAogICAgICAgIH0KICAgICAgICBpZiBzZWxmLl9h - cmdfcGFyc2VyLnJlc3RyaWN0ZWRfYXV0aF9wZXJtaXNzaW9uOgogICAgICAgICAgICBrOHNfY2x1 - c3Rlcl9uYW1lID0gc2VsZi5fYXJnX3BhcnNlci5rOHNfY2x1c3Rlcl9uYW1lCiAgICAgICAgICAg - IGlmIGs4c19jbHVzdGVyX25hbWUgPT0gIiI6CiAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRp - b25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgICJrOHNfY2x1c3Rlcl9uYW1l - IG5vdCBmb3VuZCwgcGxlYXNlIHNldCB0aGUgJy0tazhzLWNsdXN0ZXItbmFtZScgZmxhZyIKICAg - ICAgICAgICAgICAgICkKICAgICAgICAgICAgY2VwaGZzX2ZpbGVzeXN0ZW0gPSBzZWxmLl9hcmdf - cGFyc2VyLmNlcGhmc19maWxlc3lzdGVtX25hbWUKICAgICAgICAgICAgaWYgY2VwaGZzX2ZpbGVz - eXN0ZW0gPT0gIiI6CiAgICAgICAgICAgICAgICBlbnRpdHkgPSBmIntlbnRpdHl9LXtrOHNfY2x1 - c3Rlcl9uYW1lfSIKICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgIGVudGl0eSA9IGYi - e2VudGl0eX0te2s4c19jbHVzdGVyX25hbWV9LXtjZXBoZnNfZmlsZXN5c3RlbX0iCiAgICAgICAg - ICAgICAgICBjYXBzWyJvc2QiXSA9IGYiYWxsb3cgcncgdGFnIGNlcGhmcyAqPXtjZXBoZnNfZmls - ZXN5c3RlbX0iCgogICAgICAgIHJldHVybiBjYXBzLCBlbnRpdHkKCiAgICBkZWYgZ2V0X2VudGl0 - eSgKICAgICAgICBzZWxmLAogICAgICAgIGVudGl0eSwKICAgICAgICByYmRfcG9vbF9uYW1lLAog - ICAgICAgIGFsaWFzX3JiZF9wb29sX25hbWUsCiAgICAgICAgazhzX2NsdXN0ZXJfbmFtZSwKICAg - ICAgICByYWRvc19uYW1lc3BhY2UsCiAgICApOgogICAgICAgIGlmICgKICAgICAgICAgICAgcmJk - X3Bvb2xfbmFtZS5jb3VudCgiLiIpICE9IDAKICAgICAgICAgICAgb3IgcmJkX3Bvb2xfbmFtZS5j - b3VudCgiXyIpICE9IDAKICAgICAgICAgICAgb3IgYWxpYXNfcmJkX3Bvb2xfbmFtZSAhPSAiIgog - ICAgICAgICAgICAjIGNoZWNraW5nIGFsaWFzX3JiZF9wb29sX25hbWUgaXMgbm90IGVtcHR5IGFz - IHRoZXJlIG1heWJlIGEgc3BlY2lhbCBjaGFyYWN0ZXIgdXNlZCBvdGhlciB0aGFuIC4gb3IgXwog - ICAgICAgICk6CiAgICAgICAgICAgIGlmIGFsaWFzX3JiZF9wb29sX25hbWUgPT0gIiI6CiAgICAg - ICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAg - ICAgICAgICJwbGVhc2Ugc2V0IHRoZSAnLS1hbGlhcy1yYmQtZGF0YS1wb29sLW5hbWUnIGZsYWcg - YXMgdGhlIHJiZCBkYXRhIHBvb2wgbmFtZSBjb250YWlucyAnLicgb3IgJ18nIgogICAgICAgICAg - ICAgICAgKQogICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICBhbGlhc19yYmRfcG9vbF9u - YW1lLmNvdW50KCIuIikgIT0gMAogICAgICAgICAgICAgICAgb3IgYWxpYXNfcmJkX3Bvb2xfbmFt - ZS5jb3VudCgiXyIpICE9IDAKICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgIHJhaXNlIEV4 - ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIictLWFsaWFzLXJi - ZC1kYXRhLXBvb2wtbmFtZScgZmxhZyB2YWx1ZSBzaG91bGQgbm90IGNvbnRhaW4gJy4nIG9yICdf - JyIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgZW50aXR5ID0gZiJ7ZW50aXR5fS17azhz - X2NsdXN0ZXJfbmFtZX0te2FsaWFzX3JiZF9wb29sX25hbWV9IgogICAgICAgIGVsc2U6CiAgICAg - ICAgICAgIGVudGl0eSA9IGYie2VudGl0eX0te2s4c19jbHVzdGVyX25hbWV9LXtyYmRfcG9vbF9u - YW1lfSIKCiAgICAgICAgaWYgcmFkb3NfbmFtZXNwYWNlOgogICAgICAgICAgICBlbnRpdHkgPSBm - IntlbnRpdHl9LXtyYWRvc19uYW1lc3BhY2V9IgogICAgICAgIHJldHVybiBlbnRpdHkKCiAgICBk - ZWYgZ2V0X3JiZF9wcm92aXNpb25lcl9jYXBzX2FuZF9lbnRpdHkoc2VsZik6CiAgICAgICAgZW50 - aXR5ID0gImNsaWVudC5jc2ktcmJkLXByb3Zpc2lvbmVyIgogICAgICAgIGNhcHMgPSB7CiAgICAg - ICAgICAgICJtb24iOiAicHJvZmlsZSByYmQsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xpc3Qn - IiwKICAgICAgICAgICAgIm1nciI6ICJhbGxvdyBydyIsCiAgICAgICAgICAgICJvc2QiOiAicHJv - ZmlsZSByYmQiLAogICAgICAgIH0KICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJlc3RyaWN0 - ZWRfYXV0aF9wZXJtaXNzaW9uOgogICAgICAgICAgICByYmRfcG9vbF9uYW1lID0gc2VsZi5fYXJn - X3BhcnNlci5yYmRfZGF0YV9wb29sX25hbWUKICAgICAgICAgICAgYWxpYXNfcmJkX3Bvb2xfbmFt - ZSA9IHNlbGYuX2FyZ19wYXJzZXIuYWxpYXNfcmJkX2RhdGFfcG9vbF9uYW1lCiAgICAgICAgICAg - IGs4c19jbHVzdGVyX25hbWUgPSBzZWxmLl9hcmdfcGFyc2VyLms4c19jbHVzdGVyX25hbWUKICAg - ICAgICAgICAgcmFkb3NfbmFtZXNwYWNlID0gc2VsZi5fYXJnX3BhcnNlci5yYWRvc19uYW1lc3Bh - Y2UKICAgICAgICAgICAgaWYgcmJkX3Bvb2xfbmFtZSA9PSAiIjoKICAgICAgICAgICAgICAgIHJh - aXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIm1hbmRh - dG9yeSBmbGFnIG5vdCBmb3VuZCwgcGxlYXNlIHNldCB0aGUgJy0tcmJkLWRhdGEtcG9vbC1uYW1l - JyBmbGFnIgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBpZiBrOHNfY2x1c3Rlcl9uYW1l - ID09ICIiOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigK - ICAgICAgICAgICAgICAgICAgICAibWFuZGF0b3J5IGZsYWcgbm90IGZvdW5kLCBwbGVhc2Ugc2V0 - IHRoZSAnLS1rOHMtY2x1c3Rlci1uYW1lJyBmbGFnIgogICAgICAgICAgICAgICAgKQogICAgICAg - ICAgICBlbnRpdHkgPSBzZWxmLmdldF9lbnRpdHkoCiAgICAgICAgICAgICAgICBlbnRpdHksCiAg - ICAgICAgICAgICAgICByYmRfcG9vbF9uYW1lLAogICAgICAgICAgICAgICAgYWxpYXNfcmJkX3Bv - b2xfbmFtZSwKICAgICAgICAgICAgICAgIGs4c19jbHVzdGVyX25hbWUsCiAgICAgICAgICAgICAg - ICByYWRvc19uYW1lc3BhY2UsCiAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgcmFkb3NfbmFt - ZXNwYWNlICE9ICIiOgogICAgICAgICAgICAgICAgY2Fwc1sib3NkIl0gPSAoCiAgICAgICAgICAg - ICAgICAgICAgZiJwcm9maWxlIHJiZCBwb29sPXtyYmRfcG9vbF9uYW1lfSBuYW1lc3BhY2U9e3Jh - ZG9zX25hbWVzcGFjZX0iCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgIGVsc2U6CiAgICAg - ICAgICAgICAgICBjYXBzWyJvc2QiXSA9IGYicHJvZmlsZSByYmQgcG9vbD17cmJkX3Bvb2xfbmFt - ZX0iCgogICAgICAgIHJldHVybiBjYXBzLCBlbnRpdHkKCiAgICBkZWYgZ2V0X3JiZF9ub2RlX2Nh - cHNfYW5kX2VudGl0eShzZWxmKToKICAgICAgICBlbnRpdHkgPSAiY2xpZW50LmNzaS1yYmQtbm9k - ZSIKICAgICAgICBjYXBzID0gewogICAgICAgICAgICAibW9uIjogInByb2ZpbGUgcmJkLCBhbGxv - dyBjb21tYW5kICdvc2QgYmxvY2tsaXN0JyIsCiAgICAgICAgICAgICJvc2QiOiAicHJvZmlsZSBy - YmQiLAogICAgICAgIH0KICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJlc3RyaWN0ZWRfYXV0 - aF9wZXJtaXNzaW9uOgogICAgICAgICAgICByYmRfcG9vbF9uYW1lID0gc2VsZi5fYXJnX3BhcnNl - ci5yYmRfZGF0YV9wb29sX25hbWUKICAgICAgICAgICAgYWxpYXNfcmJkX3Bvb2xfbmFtZSA9IHNl - bGYuX2FyZ19wYXJzZXIuYWxpYXNfcmJkX2RhdGFfcG9vbF9uYW1lCiAgICAgICAgICAgIGs4c19j - bHVzdGVyX25hbWUgPSBzZWxmLl9hcmdfcGFyc2VyLms4c19jbHVzdGVyX25hbWUKICAgICAgICAg - ICAgcmFkb3NfbmFtZXNwYWNlID0gc2VsZi5fYXJnX3BhcnNlci5yYWRvc19uYW1lc3BhY2UKICAg - ICAgICAgICAgaWYgcmJkX3Bvb2xfbmFtZSA9PSAiIjoKICAgICAgICAgICAgICAgIHJhaXNlIEV4 - ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIm1hbmRhdG9yeSBm - bGFnIG5vdCBmb3VuZCwgcGxlYXNlIHNldCB0aGUgJy0tcmJkLWRhdGEtcG9vbC1uYW1lJyBmbGFn - IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBpZiBrOHNfY2x1c3Rlcl9uYW1lID09ICIi - OgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAg - ICAgICAgICAgICAgICAibWFuZGF0b3J5IGZsYWcgbm90IGZvdW5kLCBwbGVhc2Ugc2V0IHRoZSAn - LS1rOHMtY2x1c3Rlci1uYW1lJyBmbGFnIgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBl - bnRpdHkgPSBzZWxmLmdldF9lbnRpdHkoCiAgICAgICAgICAgICAgICBlbnRpdHksCiAgICAgICAg - ICAgICAgICByYmRfcG9vbF9uYW1lLAogICAgICAgICAgICAgICAgYWxpYXNfcmJkX3Bvb2xfbmFt - ZSwKICAgICAgICAgICAgICAgIGs4c19jbHVzdGVyX25hbWUsCiAgICAgICAgICAgICAgICByYWRv - c19uYW1lc3BhY2UsCiAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgcmFkb3NfbmFtZXNwYWNl - ICE9ICIiOgogICAgICAgICAgICAgICAgY2Fwc1sib3NkIl0gPSAoCiAgICAgICAgICAgICAgICAg - ICAgZiJwcm9maWxlIHJiZCBwb29sPXtyYmRfcG9vbF9uYW1lfSBuYW1lc3BhY2U9e3JhZG9zX25h - bWVzcGFjZX0iCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAg - ICAgICBjYXBzWyJvc2QiXSA9IGYicHJvZmlsZSByYmQgcG9vbD17cmJkX3Bvb2xfbmFtZX0iCgog - ICAgICAgIHJldHVybiBjYXBzLCBlbnRpdHkKCiAgICBkZWYgZ2V0X2RlZmF1bHRVc2VyX2NhcHNf - YW5kX2VudGl0eShzZWxmKToKICAgICAgICBlbnRpdHkgPSBzZWxmLnJ1bl9hc191c2VyCiAgICAg - ICAgY2FwcyA9IHsKICAgICAgICAgICAgIm1vbiI6ICJhbGxvdyByLCBhbGxvdyBjb21tYW5kIHF1 - b3J1bV9zdGF0dXMsIGFsbG93IGNvbW1hbmQgdmVyc2lvbiIsCiAgICAgICAgICAgICJtZ3IiOiAi - YWxsb3cgY29tbWFuZCBjb25maWciLAogICAgICAgICAgICAib3NkIjogZiJwcm9maWxlIHJiZC1y - ZWFkLW9ubHksIGFsbG93IHJ3eCBwb29sPXtz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X2VudGl0eSgpCiAgICAgICAg - aWYgImNsaWVudC5jc2ktcmJkLXByb3Zpc2lvbmVyIiBpbiB1c2VyX25hbWU6CiAgICAgICAgICAg - IGlmICJjbGllbnQuY3NpLXJiZC1wcm92aXNpb25lciIgIT0gdXNlcl9uYW1lOgogICAgICAgICAg - ICAgICAgc2VsZi5fYXJnX3BhcnNlci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbiA9IFRydWUK - ICAgICAgICAgICAgcmV0dXJuIHNlbGYuZ2V0X3JiZF9wcm92aXNpb25lcl9jYXBzX2FuZF9lbnRp - dHkoKQogICAgICAgIGlmICJjbGllbnQuY3NpLXJiZC1ub2RlIiBpbiB1c2VyX25hbWU6CiAgICAg - ICAgICAgIGlmICJjbGllbnQuY3NpLXJiZC1ub2RlIiAhPSB1c2VyX25hbWU6CiAgICAgICAgICAg - ICAgICBzZWxmLl9hcmdfcGFyc2VyLnJlc3RyaWN0ZWRfYXV0aF9wZXJtaXNzaW9uID0gVHJ1ZQog - ICAgICAgICAgICByZXR1cm4gc2VsZi5nZXRfcmJkX25vZGVfY2Fwc19hbmRfZW50aXR5KCkKICAg - ICAgICBpZiAiY2xpZW50LmhlYWx0aGNoZWNrZXIiIGluIHVzZXJfbmFtZToKICAgICAgICAgICAg - aWYgImNsaWVudC5oZWFsdGhjaGVja2VyIiAhPSB1c2VyX25hbWU6CiAgICAgICAgICAgICAgICBz - ZWxmLl9hcmdfcGFyc2VyLnJlc3RyaWN0ZWRfYXV0aF9wZXJtaXNzaW9uID0gVHJ1ZQogICAgICAg - ICAgICByZXR1cm4gc2VsZi5nZXRfZGVmYXVsdFVzZXJfY2Fwc19hbmRfZW50aXR5KCkKCiAgICAg - ICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgZiJubyB1c2Vy - IGZvdW5kIHdpdGggdXNlcl9uYW1lOiB7dXNlcl9uYW1lfSwgIgogICAgICAgICAgICAiZ2V0X2Nh - cHNfYW5kX2VudGl0eSBjb21tYW5kIGZhaWxlZC5cbiIKICAgICAgICApCgogICAgZGVmIGNyZWF0 - ZV9jZXBoQ1NJS2V5cmluZ191c2VyKHNlbGYsIHVzZXIpOgogICAgICAgICIiIgogICAgICAgIGNv - bW1hbmQ6IGNlcGggYXV0aCBnZXQtb3ItY3JlYXRlIGNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lv - bmVyIG1vbiAnYWxsb3cgcicgbWdyICdhbGxvdyBydycgb3NkICdhbGxvdyBydyB0YWcgY2VwaGZz - IG1ldGFkYXRhPSonCiAgICAgICAgIiIiCiAgICAgICAgY2FwcywgZW50aXR5ID0gc2VsZi5nZXRf - Y2Fwc19hbmRfZW50aXR5KHVzZXIpCiAgICAgICAgY21kX2pzb24gPSB7CiAgICAgICAgICAgICJw - cmVmaXgiOiAiYXV0aCBnZXQtb3ItY3JlYXRlIiwKICAgICAgICAgICAgImVudGl0eSI6IGVudGl0 - eSwKICAgICAgICAgICAgImNhcHMiOiBbY2FwIGZvciBjYXBfbGlzdCBpbiBsaXN0KGNhcHMuaXRl - bXMoKSkgZm9yIGNhcCBpbiBjYXBfbGlzdF0sCiAgICAgICAgICAgICJmb3JtYXQiOiAianNvbiIs - CiAgICAgICAgfQoKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLmRyeV9ydW46CiAgICAgICAg - ICAgIHJldHVybiAoCiAgICAgICAgICAgICAgICBzZWxmLmRyeV9ydW4oCiAgICAgICAgICAgICAg - ICAgICAgImNlcGggIgogICAgICAgICAgICAgICAgICAgICsgY21kX2pzb25bInByZWZpeCJdCiAg - ICAgICAgICAgICAgICAgICAgKyAiICIKICAgICAgICAgICAgICAgICAgICArIGNtZF9qc29uWyJl - bnRpdHkiXQogICAgICAgICAgICAgICAgICAgICsgIiAiCiAgICAgICAgICAgICAgICAgICAgKyAi - ICIuam9pbihjbWRfanNvblsiY2FwcyJdKQogICAgICAgICAgICAgICAgKSwKICAgICAgICAgICAg - ICAgICIiLAogICAgICAgICAgICApCiAgICAgICAgIyBjaGVjayBpZiB1c2VyIGFscmVhZHkgZXhp - c3QKICAgICAgICB1c2VyX2tleSA9IHNlbGYuY2hlY2tfdXNlcl9leGlzdChlbnRpdHkpCiAgICAg - ICAgaWYgdXNlcl9rZXkgIT0gIiI6CiAgICAgICAgICAgIHJldHVybiB1c2VyX2tleSwgZiJ7ZW50 - aXR5LnNwbGl0KCcuJywgMSlbMV19IgogICAgICAgICAgICAjIGVudGl0eS5zcGxpdCgnLicsMSlb - MV0gdG8gcmVuYW1lIGVudGl0eShjbGllbnQuY3NpLXJiZC1ub2RlKSBhcyBjc2ktcmJkLW5vZGUK - CiAgICAgICAgcmV0X3ZhbCwganNvbl9vdXQsIGVycl9tc2cgPSBzZWxmLl9jb21tb25fY21kX2pz - b25fZ2VuKGNtZF9qc29uKQogICAgICAgICMgaWYgdGhlcmUgaXMgYW4gdW5zdWNjZXNzZnVsIGF0 - dGVtcHQsCiAgICAgICAgaWYgcmV0X3ZhbCAhPSAwIG9yIGxlbihqc29uX291dCkgPT0gMDoKICAg - ICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAg - IGYiJ2F1dGggZ2V0LW9yLWNyZWF0ZSB7dXNlcn0nIGNvbW1hbmQgZmFpbGVkLlxuIgogICAgICAg - ICAgICAgICAgZiJFcnJvcjoge2Vycl9tc2cgaWYgcmV0X3ZhbCAhPSAwIGVsc2Ugc2VsZi5FTVBU - WV9PVVRQVVRfTElTVH0iCiAgICAgICAgICAgICkKICAgICAgICByZXR1cm4gc3RyKGpzb25fb3V0 - WzBdWyJrZXkiXSksIGYie2VudGl0eS5zcGxpdCgnLicsIDEpWzFdfSIKICAgICAgICAjIGVudGl0 - eS5zcGxpdCgnLicsMSlbMV0gdG8gcmVuYW1lIGVudGl0eShjbGllbnQuY3NpLXJiZC1ub2RlKSBh - cyBjc2ktcmJkLW5vZGUKCiAgICBkZWYgZ2V0X2NlcGhmc19kYXRhX3Bvb2xfZGV0YWlscyhzZWxm - KToKICAgICAgICBjbWRfanNvbiA9IHsicHJlZml4IjogImZzIGxzIiwgImZvcm1hdCI6ICJqc29u - In0KICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLmRyeV9ydW46CiAgICAgICAgICAgIHJldHVy - biBzZWxmLmRyeV9ydW4oImNlcGggIiArIGNtZF9qc29uWyJwcmVmaXgiXSkKICAgICAgICByZXRf - dmFsLCBqc29uX291dCwgZXJyX21zZyA9IHNlbGYuX2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pz - b24pCiAgICAgICAgIyBpZiB0aGVyZSBpcyBhbiB1bnN1Y2Nlc3NmdWwgYXR0ZW1wdCwgcmVwb3J0 - IGFuIGVycm9yCiAgICAgICAgaWYgcmV0X3ZhbCAhPSAwOgogICAgICAgICAgICAjIGlmIGZzIGFu - ZCBkYXRhX3Bvb2wgYXJndW1lbnRzIGFyZSBub3Qgc2V0LCBzaWxlbnRseSByZXR1cm4KICAgICAg - ICAgICAgaWYgKAogICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZmlsZXN5 - c3RlbV9uYW1lID09ICIiCiAgICAgICAgICAgICAgICBhbmQgc2VsZi5fYXJnX3BhcnNlci5jZXBo - ZnNfZGF0YV9wb29sX25hbWUgPT0gIiIKICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgIHJl - dHVybgogICAgICAgICAgICAjIGlmIHVzZXIgaGFzIHByb3ZpZGVkIGFueSBvZiB0aGUKICAgICAg - ICAgICAgIyAnLS1jZXBoZnMtZmlsZXN5c3RlbS1uYW1lJyBvciAnLS1jZXBoZnMtZGF0YS1wb29s - LW5hbWUnIGFyZ3VtZW50cywKICAgICAgICAgICAgIyByYWlzZSBhbiBleGNlcHRpb24gYXMgd2Ug - YXJlIHVuYWJsZSB0byB2ZXJpZnkgdGhlIGFyZ3MKICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9u - RmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgIGYiJ2ZzIGxzJyBjZXBoIGNhbGwgZmFp - bGVkIHdpdGggZXJyb3I6IHtlcnJfbXNnfSIKICAgICAgICAgICAgKQoKICAgICAgICBtYXRjaGlu - Z19qc29uX291dCA9IHt9CiAgICAgICAgIyBpZiAnLS1jZXBoZnMtZmlsZXN5c3RlbS1uYW1lJyBh - cmd1bWVudCBpcyBwcm92aWRlZCwKICAgICAgICAjIGNoZWNrIHdoZXRoZXIgdGhlIHByb3ZpZGVk - IGZpbGVzeXN0ZW0tbmFtZSBleGlzdHMgb3Igbm90CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNl - ci5jZXBoZnNfZmlsZXN5c3RlbV9uYW1lOgogICAgICAgICAgICAjIGdldCB0aGUgbWF0Y2hpbmcg - bGlzdAogICAgICAgICAgICBtYXRjaGluZ19qc29uX291dF9saXN0ID0gWwogICAgICAgICAgICAg - ICAgbWF0Y2hlZAogICAgICAgICAgICAgICAgZm9yIG1hdGNoZWQgaW4ganNvbl9vdXQKICAgICAg - ICAgICAgICAgIGlmIHN0cihtYXRjaGVkWyJuYW1lIl0pID09IHNlbGYuX2FyZ19wYXJzZXIuY2Vw - aGZzX2ZpbGVzeXN0ZW1fbmFtZQogICAgICAgICAgICBdCiAgICAgICAgICAgICMgdW5hYmxlIHRv - IGZpbmQgYSBtYXRjaGluZyBmcy1uYW1lLCByYWlzZSBhbiBlcnJvcgogICAgICAgICAgICBpZiBs - ZW4obWF0Y2hpbmdfanNvbl9vdXRfbGlzdCkgPT0gMDoKICAgICAgICAgICAgICAgIHJhaXNlIEV4 - ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgZiJGaWxlc3lzdGVt - IHByb3ZpZGVkLCAne3NlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZX0nLCAi - CiAgICAgICAgICAgICAgICAgICAgZiJpcyBub3QgZm91bmQgaW4gdGhlIGZzLWxpc3Q6IHtbc3Ry - KHhbJ25hbWUnXSkgZm9yIHggaW4ganNvbl9vdXRdfSIKICAgICAgICAgICAgICAgICkKICAgICAg - ICAgICAgbWF0Y2hpbmdfanNvbl9vdXQgPSBtYXRjaGluZ19qc29uX291dF9saXN0WzBdCiAgICAg - ICAgIyBpZiBjZXBoZnMgZmlsZXN5c3RlbSBuYW1lIGlzIG5vdCBwcm92aWRlZCwKICAgICAgICAj - IHRyeSB0byBnZXQgYSBkZWZhdWx0IGZzIG5hbWUgYnkgZG9pbmcgdGhlIGZvbGxvd2luZwogICAg - ICAgIGVsc2U6CiAgICAgICAgICAgICMgYS4gY2hlY2sgaWYgdGhlcmUgaXMgb25seSBvbmUgZmls - ZXN5c3RlbSBpcyBwcmVzZW50CiAgICAgICAgICAgIGlmIGxlbihqc29uX291dCkgPT0gMToKICAg - ICAgICAgICAgICAgIG1hdGNoaW5nX2pzb25fb3V0ID0ganNvbl9vdXRbMF0KICAgICAgICAgICAg - IyBiLiBvciBlbHNlLCBjaGVjayBpZiBkYXRhX3Bvb2wgbmFtZSBpcyBwcm92aWRlZAogICAgICAg - ICAgICBlbGlmIHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2RhdGFfcG9vbF9uYW1lOgogICAgICAg - ICAgICAgICAgIyBhbmQgaWYgcHJlc2VudCwgY2hlY2sgd2hldGhlciB0aGVyZSBleGlzdHMgYSBm - cyB3aGljaCBoYXMgdGhlIGRhdGFfcG9vbAogICAgICAgICAgICAgICAgZm9yIGVhY2hKIGluIGpz - b25fb3V0OgogICAgICAgICAgICAgICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2Rh - dGFfcG9vbF9uYW1lIGluIGVhY2hKWyJkYXRhX3Bvb2xzIl06CiAgICAgICAgICAgICAgICAgICAg - ICAgIG1hdGNoaW5nX2pzb25fb3V0ID0gZWFjaEoKICAgICAgICAgICAgICAgICAgICAgICAgYnJl - YWsKICAgICAgICAgICAgICAgICMgaWYgdGhlcmUgaXMgbm8gbWF0Y2hpbmcgZnMgZXhpc3RzLCB0 - aGF0IG1lYW5zIHByb3ZpZGVkIGRhdGFfcG9vbCBuYW1lIGlzIGludmFsaWQKICAgICAgICAgICAg - ICAgIGlmIG5vdCBtYXRjaGluZ19qc29uX291dDoKICAgICAgICAgICAgICAgICAgICByYWlzZSBF - eGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgICAgICBmIlByb3Zp - ZGVkIGRhdGFfcG9vbCBuYW1lLCB7c2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZGF0YV9wb29sX25h - bWV9LCIKICAgICAgICAgICAgICAgICAgICAgICAgIiBkb2VzIG5vdCBleGlzdHMiCiAgICAgICAg - ICAgICAgICAgICAgKQogICAgICAgICAgICAjIGMuIGlmIG5vdGhpbmcgaXMgc2V0IGFuZCBjb3Vs - ZG4ndCBmaW5kIGEgZGVmYXVsdCwKICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICMg - anVzdCByZXR1cm4gc2lsZW50bHkKICAgICAgICAgICAgICAgIHJldHVybgoKICAgICAgICBpZiBt - YXRjaGluZ19qc29uX291dDoKICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZmls - ZXN5c3RlbV9uYW1lID0gc3RyKG1hdGNoaW5nX2pzb25fb3V0WyJuYW1lIl0pCiAgICAgICAgICAg - IHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX21ldGFkYXRhX3Bvb2xfbmFtZSA9IHN0cigKICAgICAg - ICAgICAgICAgIG1hdGNoaW5nX2pzb25fb3V0WyJtZXRhZGF0YV9wb29sIl0KICAgICAgICAgICAg - KQoKICAgICAgICBpZiBpc2luc3RhbmNlKG1hdGNoaW5nX2pzb25fb3V0WyJkYXRhX3Bvb2xzIl0s - IGxpc3QpOgogICAgICAgICAgICAjIGlmIHRoZSB1c2VyIGhhcyBhbHJlYWR5IHByb3ZpZGVkIGRh - dGEtcG9vbC1uYW1lLAogICAgICAgICAgICAjIHRocm91Z2ggLS1jZXBoZnMtZGF0YS1wb29sLW5h - bWUKICAgICAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZGF0YV9wb29sX25hbWU6 - CiAgICAgICAgICAgICAgICAjIGlmIHRoZSBwcm92aWRlZCBuYW1lIGlzIG5vdCBtYXRjaGluZyB3 - aXRoIHRoZSBvbmUgaW4gdGhlIGxpc3QKICAgICAgICAgICAgICAgIGlmICgKICAgICAgICAgICAg - ICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLmNlcGhmc19kYXRhX3Bvb2xfbmFtZQogICAgICAgICAg - ICAgICAgICAgIG5vdCBpbiBtYXRjaGluZ19qc29uX291dFsiZGF0YV9wb29scyJdCiAgICAgICAg - ICAgICAgICApOgogICAgICAgICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNl - cHRpb24oCiAgICAgICAgICAgICAgICAgICAgICAgIGYiUHJvdmlkZWQgZGF0YS1wb29sLW5hbWU6 - ICd7c2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZGF0YV9wb29sX25hbWV9JywgIgogICAgICAgICAg - ICAgICAgICAgICAgICAiZG9lc24ndCBtYXRjaCBmcm9tIHRoZSBkYXRhLXBvb2xzIGxpc3Q6ICIK - ICAgICAgICAgICAgICAgICAgICAgICAgZiJ7W3N0cih4KSBmb3IgeCBpbiBtYXRjaGluZ19qc29u - X291dFsnZGF0YV9wb29scyddXX0iCiAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAj - IGlmIGRhdGFfcG9vbCBuYW1lIGlzIG5vdCBwcm92aWRlZCwKICAgICAgICAgICAgIyB0aGVuIHRy - eSB0byBmaW5kIGEgZGVmYXVsdCBkYXRhIHBvb2wgbmFtZQogICAgICAgICAgICBlbHNlOgogICAg - ICAgICAgICAgICAgIyBpZiBubyBkYXRhX3Bvb2xzIGV4aXN0LCBzaWxlbnRseSByZXR1cm4KICAg - ICAgICAgICAgICAgIGlmIGxlbihtYXRjaGluZ19qc29uX291dFsiZGF0YV9wb29scyJdKSA9PSAw - OgogICAgICAgICAgICAgICAgICAgIHJldHVybgogICAgICAgICAgICAgICAgc2VsZi5fYXJnX3Bh - cnNlci5jZXBoZnNfZGF0YV9wb29sX25hbWUgPSBzdHIoCiAgICAgICAgICAgICAgICAgICAgbWF0 - Y2hpbmdfanNvbl9vdXRbImRhdGFfcG9vbHMiXVswXQogICAgICAgICAgICAgICAgKQogICAgICAg - ICAgICAjIGlmIHRoZXJlIGFyZSBtb3JlIHRoYW4gb25lICdkYXRhX3Bvb2xzJyBleGlzdCwKICAg - ICAgICAgICAgIyB0aGVuIHdhcm4gdGhlIHVzZXIgdGhhdCB3ZSBhcmUgdXNpbmcgdGhlIHNlbGVj - dGVkIG5hbWUKICAgICAgICAgICAgaWYgbGVuKG1hdGNoaW5nX2pzb25fb3V0WyJkYXRhX3Bvb2xz - Il0pID4gMToKICAgICAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgICAgICJXQVJO - SU5HOiBNdWx0aXBsZSBkYXRhIHBvb2xzIGRldGVjdGVkOiAiCiAgICAgICAgICAgICAgICAgICAg - ZiJ7W3N0cih4KSBmb3IgeCBpbiBtYXRjaGluZ19qc29uX291dFsnZGF0YV9wb29scyddXX1cbiIK - ICAgICAgICAgICAgICAgICAgICBmIlVzaW5nIHRoZSBkYXRhLXBvb2w6ICd7c2VsZi5fYXJnX3Bh - cnNlci5jZXBoZnNfZGF0YV9wb29sX25hbWV9J1xuIgogICAgICAgICAgICAgICAgKQoKICAgIGRl - ZiBjcmVhdGVfY2hlY2tlcktleShzZWxmLCB1c2VyKToKICAgICAgICBjYXBzLCBlbnRpdHkgPSBz - ZWxmLmdldF9jYXBzX2FuZF9lbnRpdHkodXNlcikKICAgICAgICBjbWRfanNvbiA9IHsKICAgICAg - ICAgICAgInByZWZpeCI6ICJhdXRoIGdldC1vci1jcmVhdGUiLAogICAgICAgICAgICAiZW50aXR5 - IjogZW50aXR5LAogICAgICAgICAgICAiY2FwcyI6IFtjYXAgZm9yIGNhcF9saXN0IGluIGxpc3Qo - Y2Fwcy5pdGVtcygpKSBmb3IgY2FwIGluIGNhcF9saXN0XSwKICAgICAgICAgICAgImZvcm1hdCI6 - ICJqc29uIiwKICAgICAgICB9CgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIuZHJ5X3J1bjoK - ICAgICAgICAgICAgcmV0dXJuIHNlbGYuZHJ5X3J1bigKICAgICAgICAgICAgICAgICJjZXBoICIK - ICAgICAgICAgICAgICAgICsgY21kX2pzb25bInByZWZpeCJdCiAgICAgICAgICAgICAgICArICIg - IgogICAgICAgICAgICAgICAgKyBjbWRfanNvblsiZW50aXR5Il0KICAgICAgICAgICAgICAgICsg - IiAiCiAgICAgICAgICAgICAgICArICIgIi5qb2luKGNtZF9qc29uWyJjYXBzIl0pCiAgICAgICAg - ICAgICkKICAgICAgICAjIGNoZWNrIGlmIHVzZXIgYWxyZWFkeSBleGlzdAogICAgICAgIHVzZXJf - a2V5ID0gc2VsZi5jaGVja191c2VyX2V4aXN0KGVudGl0eSkKICAgICAgICBpZiB1c2VyX2tleSAh - PSAiIjoKICAgICAgICAgICAgcmV0dXJuIHVzZXJfa2V5CgogICAgICAgIHJldF92YWwsIGpzb25f - b3V0LCBlcnJfbXNnID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRfanNvbikKICAgICAg - ICAjIGlmIHRoZXJlIGlzIGFuIHVuc3VjY2Vzc2Z1bCBhdHRlbXB0LAogICAgICAgIGlmIHJldF92 - YWwgIT0gMCBvciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlv - bkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICBmIidhdXRoIGdldC1vci1jcmVhdGUg - e3NlbGYucnVuX2FzX3VzZXJ9JyBjb21tYW5kIGZhaWxlZFxuIgogICAgICAgICAgICAgICAgZiJF - cnJvcjoge2Vycl9tc2cgaWYgcmV0X3ZhbCAhPSAwIGVsc2Ugc2VsZi5FTVBUWV9PVVRQVVRfTElT - VH0iCiAgICAgICAgICAgICkKICAgICAgICByZXR1cm4gc3RyKGpzb25fb3V0WzBdWyJrZXkiXSkK - CiAgICBkZWYgZ2V0X2NlcGhfZGFzaGJvYXJkX2xpbmsoc2VsZik6CiAgICAgICAgY21kX2pzb24g - PSB7InByZWZpeCI6ICJtZ3Igc2VydmljZXMiLCAiZm9ybWF0IjogImpzb24ifQogICAgICAgIGlm - IHNlbGYuX2FyZ19wYXJzZXIuZHJ5X3J1bjoKICAgICAgICAgICAgcmV0dXJuIHNlbGYuZHJ5X3J1 - bigiY2VwaCAiICsgY21kX2pzb25bInByZWZpeCJdKQogICAgICAgIHJldF92YWwsIGpzb25fb3V0 - LCBfID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRfanNvbikKICAgICAgICAjIGlmIHRo - ZXJlIGlzIGFuIHVuc3VjY2Vzc2Z1bCBhdHRlbXB0LAogICAgICAgIGlmIHJldF92YWwgIT0gMCBv - ciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHJldHVybiBOb25lCiAgICAgICAgaWYg - ImRhc2hib2FyZCIgbm90IGluIGpzb25fb3V0OgogICAgICAgICAgICByZXR1cm4gTm9uZQogICAg - ICAgIHJldHVybiBqc29uX291dFsiZGFzaGJvYXJkIl0KCiAgICBkZWYgY3JlYXRlX3Jnd19hZG1p - bl9vcHNfdXNlcihzZWxmKToKICAgICAgICBjbWQgPSBbCiAgICAgICAgICAgICJyYWRvc2d3LWFk - bWluIiwKICAgICAgICAgICAgInVzZXIiLAogICAgICAgICAgICAiY3JlYXRlIiwKICAgICAgICAg - ICAgIi0tdWlkIiwKICAgICAgICAgICAgc2VsZi5FWFRFUk5BTF9SR1dfQURNSU5fT1BTX1VTRVJf - TkFNRSwKICAgICAgICAgICAgIi0tZGlzcGxheS1uYW1lIiwKICAgICAgICAgICAgIlJvb2sgUkdX - IEFkbWluIE9wcyB1c2VyIiwKICAgICAgICAgICAgIi0tY2FwcyIsCiAgICAgICAgICAgICJidWNr - ZXRzPSo7dXNlcnM9Kjt1c2FnZT1yZWFkO21ldGFkYXRhPXJlYWQ7em9uZT1yZWFkIiwKICAgICAg - ICAgICAgIi0tcmd3LXJlYWxtIiwKICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5yZ3dfcmVh - bG1fbmFtZSwKICAgICAgICAgICAgIi0tcmd3LXpvbmVncm91cCIsCiAgICAgICAgICAgIHNlbGYu - X2FyZ19wYXJzZXIucmd3X3pvbmVncm91cF9uYW1lLAogICAgICAgICAgICAiLS1yZ3ctem9uZSIs - CiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVfbmFtZSwKICAgICAgICBdCiAg - ICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICByZXR1cm4gc2Vs - Zi5kcnlfcnVuKCJjZXBoICIgKyAiICIuam9pbihjbWQpKQogICAgICAgIHRyeToKICAgICAgICAg - ICAgb3V0cHV0ID0gc3VicHJvY2Vzcy5jaGVja19vdXRwdXQoY21kLCBzdGRlcnI9c3VicHJvY2Vz - cy5QSVBFKQogICAgICAgIGV4Y2VwdCBzdWJwcm9jZXNzLkNhbGxlZFByb2Nlc3NFcnJvciBhcyBl - eGVjRXJyOgogICAgICAgICAgICAjIGlmIHRoZSB1c2VyIGFscmVhZHkgZXhpc3RzLCB3ZSBqdXN0 - IHF1ZXJ5IGl0CiAgICAgICAgICAgIGlmIGV4ZWNFcnIucmV0dXJuY29kZSA9PSBlcnJuby5FRVhJ - U1Q6CiAgICAgICAgICAgICAgICBjbWQgPSBbCiAgICAgICAgICAgICAgICAgICAgInJhZG9zZ3ct - YWRtaW4iLAogICAgICAgICAgICAgICAgICAgICJ1c2VyIiwKICAgICAgICAgICAgICAgICAgICAi - aW5mbyIsCiAgICAgICAgICAgICAgICAgICAgIi0tdWlkIiwKICAgICAgICAgICAgICAgICAgICBz - ZWxmLkVYVEVSTkFMX1JHV19BRE1JTl9PUFNfVVNFUl9OQU1FLAogICAgICAgICAgICAgICAgICAg - ICItLXJndy1yZWFsbSIsCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5yZ3df - cmVhbG1fbmFtZSwKICAgICAgICAgICAgICAgICAgICAiLS1yZ3ctem9uZWdyb3VwIiwKICAgICAg - ICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnJnd196b25lZ3JvdXBfbmFtZSwKICAgICAg - ICAgICAgICAgICAgICAiLS1yZ3ctem9uZSIsCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJn - X3BhcnNlci5yZ3dfem9uZV9uYW1lLAogICAgICAgICAgICAgICAgXQogICAgICAgICAgICAgICAg - dHJ5OgogICAgICAgICAgICAgICAgICAgIG91dHB1dCA9IHN1YnByb2Nlc3MuY2hlY2tfb3V0cHV0 - KGNtZCwgc3RkZXJyPXN1YnByb2Nlc3MuUElQRSkKICAgICAgICAgICAgICAgIGV4Y2VwdCBzdWJw - cm9jZXNzLkNhbGxlZFByb2Nlc3NFcnJvciBhcyBleGVjRXJyOgogICAgICAgICAgICAgICAgICAg - IGVycl9tc2cgPSAoCiAgICAgICAgICAgICAgICAgICAgICAgIGYiZmFpbGVkIHRvIGV4ZWN1dGUg - Y29tbWFuZCB7Y21kfS4gT3V0cHV0OiB7ZXhlY0Vyci5vdXRwdXR9LiAiCiAgICAgICAgICAgICAg - ICAgICAgICAgIGYiQ29kZToge2V4ZWNFcnIucmV0dXJuY29kZX0uIEVycm9yOiB7ZXhlY0Vyci5z - dGRlcnJ9IgogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICBzeXMuc3Rk - ZXJyLndyaXRlKGVycl9tc2cpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE5vbmUsIE5vbmUs - IEZhbHNlLCAiLTEiCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBlcnJfbXNnID0g - KAogICAgICAgICAgICAgICAgICAgIGYiZmFpbGVkIHRvIGV4ZWN1dGUgY29tbWFuZCB7Y21kfS4g - T3V0cHV0OiB7ZXhlY0Vyci5vdXRwdXR9LiAiCiAgICAgICAgICAgICAgICAgICAgZiJDb2RlOiB7 - ZXhlY0Vyci5yZXR1cm5jb2RlfS4gRXJyb3I6IHtleGVjRXJyLnN0ZGVycn0iCiAgICAgICAgICAg - ICAgICApCiAgICAgICAgICAgICAgICBzeXMuc3RkZXJyLndyaXRlKGVycl9tc2cpCiAgICAgICAg - ICAgICAgICByZXR1cm4gTm9uZSwgTm9uZSwgRmFsc2UsICItMSIKCiAgICAgICAgIyBzZXBhcmF0 - ZWx5IGFkZCBpbmZvPXJlYWQgY2FwcyBmb3Igcmd3LWVuZHBvaW50IGlwIHZhbGlkYXRpb24KICAg - ICAgICBpbmZvX2NhcF9zdXBwb3J0ZWQgPSBUcnVlCiAgICAgICAgY21kID0gWwogICAgICAgICAg - ICAicmFkb3Nndy1hZG1pbiIsCiAgICAgICAgICAgICJjYXBzIiwKICAgICAgICAgICAgImFkZCIs - CiAgICAgICAgICAgICItLXVpZCIsCiAgICAgICAgICAgIHNlbGYuRVhURVJOQUxfUkdXX0FETUlO - X09QU19VU0VSX05BTUUsCiAgICAgICAgICAgICItLWNhcHMiLAogICAgICAgICAgICAiaW5mbz1y - ZWFkIiwKICAgICAgICAgICAgIi0tcmd3LXJlYWxtIiwKICAgICAgICAgICAgc2VsZi5fYXJnX3Bh - cnNlci5yZ3dfcmVhbG1fbmFtZSwKICAgICAgICAgICAgIi0tcmd3LXpvbmVncm91cCIsCiAgICAg - ICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVncm91cF9uYW1lLAogICAgICAgICAgICAi - LS1yZ3ctem9uZSIsCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVfbmFtZSwK - ICAgICAgICBdCiAgICAgICAgdHJ5OgogICAgICAgICAgICBvdXRwdXQgPSBzdWJwcm9jZXNzLmNo - ZWNrX291dHB1dChjbWQsIHN0ZGVycj1zdWJwcm9jZXNzLlBJUEUpCiAgICAgICAgZXhjZXB0IHN1 - YnByb2Nlc3MuQ2FsbGVkUHJvY2Vzc0Vycm9yIGFzIGV4ZWNFcnI6CiAgICAgICAgICAgICMgaWYg - dGhlIGNlcGggdmVyc2lvbiBub3Qgc3VwcG9ydGVkIGZvciBhZGRpbmcgYGluZm89cmVhZGAgY2Fw - KHJnd192YWxpZGF0aW9uKQogICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICAiY291bGQg - bm90IGFkZCBjYXBzOiB1bmFibGUgdG8gYWRkIGNhcHM6IGluZm89cmVhZFxuIgogICAgICAgICAg - ICAgICAgaW4gZXhlY0Vyci5zdGRlcnIuZGVjb2RlKCJ1dGYtOCIpCiAgICAgICAgICAgICAgICBh - bmQgZXhlY0Vyci5yZXR1cm5jb2RlID09IDI0NAogICAgICAgICAgICApOgogICAgICAgICAgICAg - ICAgaW5mb19jYXBfc3VwcG9ydGVkID0gRmFsc2UKICAgICAgICAgICAgZWxzZToKICAgICAgICAg - ICAgICAgIGVycl9tc2cgPSAoCiAgICAgICAgICAgICAgICAgICAgZiJmYWlsZWQgdG8gZXhlY3V0 - ZSBjb21tYW5kIHtjbWR9LiBPdXRwdXQ6IHtleGVjRXJyLm91dHB1dH0uICIKICAgICAgICAgICAg - ICAgICAgICBmIkNvZGU6IHtleGVjRXJyLnJldHVybmNvZGV9LiBFcnJvcjoge2V4ZWNFcnIuc3Rk - ZXJyfSIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIHN5cy5zdGRlcnIud3JpdGUo - ZXJyX21zZykKICAgICAgICAgICAgICAgIHJldHVybiBOb25lLCBOb25lLCBGYWxzZSwgIi0xIgoK - ICAgICAgICBqc29ub3V0cHV0ID0ganNvbi5sb2FkcyhvdXRwdXQpCiAgICAgICAgcmV0dXJuICgK - ICAgICAgICAgICAganNvbm91dHB1dFsia2V5cyJdWzBdWyJhY2Nlc3Nfa2V5Il0sCiAgICAgICAg - ICAgIGpzb25vdXRwdXRbImtleXMiXVswXVsic2VjcmV0X2tleSJdLAogICAgICAgICAgICBpbmZv - X2NhcF9zdXBwb3J0ZWQsCiAgICAgICAgICAgICIiLAogICAgICAgICkKCiAgICBkZWYgdmFsaWRh - dGVfcmJkX3Bvb2woc2VsZiwgcG9vbF9uYW1lKToKICAgICAgICBpZiBub3Qgc2VsZi5jbHVzdGVy - LnBvb2xfZXhpc3RzKHBvb2xfbmFtZSk6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1 - cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICBmIlRoZSBwcm92aWRlZCBwb29sLCAne3Bvb2xf - bmFtZX0nLCBkb2VzIG5vdCBleGlzdCIKICAgICAgICAgICAgKQoKICAgIGRlZiBpbml0X3JiZF9w - b29sKHNlbGYsIHJiZF9wb29sX25hbWUpOgogICAgICAgIGlmIGlzaW5zdGFuY2Uoc2VsZi5jbHVz - dGVyLCBEdW1teVJhZG9zKToKICAgICAgICAgICAgcmV0dXJuCiAgICAgICAgaW9jdHggPSBzZWxm - LmNsdXN0ZXIub3Blbl9pb2N0eChyYmRfcG9vbF9uYW1lKQogICAgICAgIHJiZF9pbnN0ID0gcmJk - LlJCRCgpCiAgICAgICAgcmJkX2luc3QucG9vbF9pbml0KGlvY3R4LCBUcnVlKQoKICAgIGRlZiB2 - YWxpZGF0ZV9yYWRvc19uYW1lc3BhY2Uoc2VsZik6CiAgICAgICAgcmJkX3Bvb2xfbmFtZSA9IHNl - bGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9vbF9uYW1lCiAgICAgICAgaWYgc2VsZi5fYXJnX3Bh - cnNlci5yYmRfbWV0YWRhdGFfZWNfcG9vbF9uYW1lOgogICAgICAgICAgICByYmRfcG9vbF9uYW1l - ID0gc2VsZi5fYXJnX3BhcnNlci5yYmRfbWV0YWRhdGFfZWNfcG9vbF9uYW1lCiAgICAgICAgcmFk - b3NfbmFtZXNwYWNlID0gc2VsZi5fYXJnX3BhcnNlci5yYWRvc19uYW1lc3BhY2UKICAgICAgICBp - ZiByYWRvc19uYW1lc3BhY2UgPT0gIiI6CiAgICAgICAgICAgIHJldHVybgogICAgICAgIGlmIHJh - ZG9zX25hbWVzcGFjZS5pc2xvd2VyKCkgPT0gRmFsc2U6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1 - dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICBmIlRoZSBwcm92aWRlZCByYWRv - cyBOYW1lc3BhY2UsICd7cmFkb3NfbmFtZXNwYWNlfScsICIKICAgICAgICAgICAgICAgIGYiY29u - dGFpbnMgdXBwZXIgY2FzZSIKICAgICAgICAgICAgKQogICAgICAgIHJiZF9pbnN0ID0gcmJkLlJC - RCgpCiAgICAgICAgaW9jdHggPSBzZWxmLmNsdXN0ZXIub3Blbl9pb2N0eChyYmRfcG9vbF9uYW1l - KQogICAgICAgIGlmIHJiZF9pbnN0Lm5hbWVzcGFjZV9leGlzdHMoaW9jdHgsIHJhZG9zX25hbWVz - cGFjZSkgaXMgRmFsc2U6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRp - b24oCiAgICAgICAgICAgICAgICBmIlRoZSBwcm92aWRlZCByYWRvcyBOYW1lc3BhY2UsICd7cmFk - b3NfbmFtZXNwYWNlfScsICIKICAgICAgICAgICAgICAgIGYiaXMgbm90IGZvdW5kIGluIHRoZSBw - b29sICd7cmJkX3Bvb2xfbmFtZX0nIgogICAgICAgICAgICApCgogICAgZGVmIGdldF9vcl9jcmVh - dGVfc3Vidm9sdW1lX2dyb3VwKHNlbGYsIHN1YnZvbHVtZV9ncm91cCwgY2VwaGZzX2ZpbGVzeXN0 - ZW1fbmFtZSk6CiAgICAgICAgY21kID0gWwogICAgICAgICAgICAiY2VwaCIsCiAgICAgICAgICAg - ICJmcyIsCiAgICAgICAgICAgICJzdWJ2b2x1bWVncm91cCIsCiAgICAgICAgICAgICJnZXRwYXRo - IiwKICAgICAgICAgICAgY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZSwKICAgICAgICAgICAgc3Vidm9s - dW1lX2dyb3VwLAogICAgICAgIF0KICAgICAgICB0cnk6CiAgICAgICAgICAgIF8gPSBzdWJwcm9j - ZXNzLmNoZWNrX291dHB1dChjbWQsIHN0ZGVycj1zdWJwcm9jZXNzLlBJUEUpCiAgICAgICAgZXhj - ZXB0IHN1YnByb2Nlc3MuQ2FsbGVkUHJvY2Vzc0Vycm9yOgogICAgICAgICAgICBjbWQgPSBbCiAg - ICAgICAgICAgICAgICAiY2VwaCIsCiAgICAgICAgICAgICAgICAiZnMiLAogICAgICAgICAgICAg - ICAgInN1YnZvbHVtZWdyb3VwIiwKICAgICAgICAgICAgICAgICJjcmVhdGUiLAogICAgICAgICAg - ICAgICAgY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZSwKICAgICAgICAgICAgICAgIHN1YnZvbHVtZV9n - cm91cCwKICAgICAgICAgICAgXQogICAgICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICBfID0g - c3VicHJvY2Vzcy5jaGVja19vdXRwdXQoY21kLCBzdGRlcnI9c3VicHJvY2Vzcy5QSVBFKQogICAg - ICAgICAgICBleGNlcHQgc3VicHJvY2Vzcy5DYWxsZWRQcm9jZXNzRXJyb3I6CiAgICAgICAgICAg - ICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAg - IGYic3Vidm9sdW1lIGdyb3VwIHtzdWJ2b2x1bWVfZ3JvdXB9IGlzIG5vdCBhYmxlIHRvIGdldCBj - cmVhdGVkIgogICAgICAgICAgICAgICAgKQoKICAgIGRlZiBwaW5fc3Vidm9sdW1lKAogICAgICAg - IHNlbGYsIHN1YnZvbHVtZV9ncm91cCwgY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZSwgcGluX3R5cGUs - IHBpbl9zZXR0aW5nCiAgICApOgogICAgICAgIGNtZCA9IFsKICAgICAgICAgICAgImNlcGgiLAog - ICAgICAgICAgICAiZnMiLAogICAgICAgICAgICAic3Vidm9sdW1lZ3JvdXAiLAogICAgICAgICAg - ICAicGluIiwKICAgICAgICAgICAgY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZSwKICAgICAgICAgICAg - c3Vidm9sdW1lX2dyb3VwLAogICAgICAgICAgICBwaW5fdHlwZSwKICAgICAgICAgICAgcGluX3Nl - dHRpbmcsCiAgICAgICAgXQogICAgICAgIHRyeToKICAgICAgICAgICAgXyA9IHN1YnByb2Nlc3Mu - Y2hlY2tfb3V0cHV0KGNtZCwgc3RkZXJyPXN1YnByb2Nlc3MuUElQRSkKICAgICAgICBleGNlcHQg - c3VicHJvY2Vzcy5DYWxsZWRQcm9jZXNzRXJyb3I6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlv - bkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICBmInN1YnZvbHVtZSBncm91cCB7c3Vi - dm9sdW1lX2dyb3VwfSBpcyBub3QgYWJsZSB0byBnZXQgcGlubmVkIgogICAgICAgICAgICApCgog - ICAgZGVmIGdldF9yZ3dfZnNpZChzZWxmLCBiYXNlX3VybCwgdmVyaWZ5KToKICAgICAgICBhY2Nl - c3Nfa2V5ID0gc2VsZi5vdXRfbWFwWyJSR1dfQURNSU5fT1BTX1VTRVJfQUNDRVNTX0tFWSJdCiAg - ICAgICAgc2VjcmV0X2tleSA9IHNlbGYub3V0X21hcFsiUkdXX0FETUlOX09QU19VU0VSX1NFQ1JF - VF9LRVkiXQogICAgICAgIHJnd19lbmRwb2ludCA9IHNlbGYuX2FyZ19wYXJzZXIucmd3X2VuZHBv - aW50CiAgICAgICAgYmFzZV91cmwgPSBiYXNlX3VybCArICI6Ly8iICsgcmd3X2VuZHBvaW50ICsg - Ii9hZG1pbi9pbmZvPyIKICAgICAgICBwYXJhbXMgPSB7ImZvcm1hdCI6ICJqc29uIn0KICAgICAg - ICByZXF1ZXN0X3VybCA9IGJhc2VfdXJsICsgdXJsZW5jb2RlKHBhcmFtcykKCiAgICAgICAgdHJ5 - OgogICAgICAgICAgICByID0gcmVxdWVzdHMuZ2V0KAogICAgICAgICAgICAgICAgcmVxdWVzdF91 - cmwsCiAgICAgICAgICAgICAgICBhdXRoPVMzQXV0aChhY2Nlc3Nfa2V5LCBzZWNyZXRfa2V5LCBy - Z3dfZW5kcG9pbnQpLAogICAgICAgICAgICAgICAgdmVyaWZ5PXZlcmlmeSwKICAgICAgICAgICAg - KQogICAgICAgIGV4Y2VwdCByZXF1ZXN0cy5leGNlcHRpb25zLlRpbWVvdXQ6CiAgICAgICAgICAg - IHN5cy5zdGRlcnIud3JpdGUoCiAgICAgICAgICAgICAgICBmImludmFsaWQgZW5kcG9pbnQ6LCBu - b3QgYWJsZSB0byBjYWxsIGFkbWluLW9wcyBhcGl7cmd3X2VuZHBvaW50fSIKICAgICAgICAgICAg - KQogICAgICAgICAgICByZXR1cm4gIiIsICItMSIKICAgICAgICByMSA9IHIuanNvbigpCiAgICAg - ICAgaWYgcjEgaXMgTm9uZSBvciByMS5nZXQoImluZm8iKSBpcyBOb25lOgogICAgICAgICAgICBz - eXMuc3RkZXJyLndyaXRlKAogICAgICAgICAgICAgICAgZiJUaGUgcHJvdmlkZWQgcmd3IEVuZHBv - aW50LCAne3NlbGYuX2FyZ19wYXJzZXIucmd3X2VuZHBvaW50fScsIGlzIGludmFsaWQuIgogICAg - ICAgICAgICApCiAgICAgICAgICAgIHJldHVybiAoCiAgICAgICAgICAgICAgICAiIiwKICAgICAg - ICAgICAgICAgICItMSIsCiAgICAgICAgICAgICkKCiAgICAgIC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IHRoZXNlIGRlZmF1bHQgcG9vbHMKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJnd19wb29s - X3ByZWZpeCAhPSAiZGVmYXVsdCI6CiAgICAgICAgICAgIHJnd19wb29sc190b192YWxpZGF0ZSA9 - IFsKICAgICAgICAgICAgICAgIGYie3NlbGYuX2FyZ19wYXJzZXIucmd3X3Bvb2xfcHJlZml4fS5y - Z3cubWV0YSIsCiAgICAgICAgICAgICAgICAiLnJndy5yb290IiwKICAgICAgICAgICAgICAgIGYi - e3NlbGYuX2FyZ19wYXJzZXIucmd3X3Bvb2xfcHJlZml4fS5yZ3cuY29udHJvbCIsCiAgICAgICAg - ICAgICAgICBmIntzZWxmLl9hcmdfcGFyc2VyLnJnd19wb29sX3ByZWZpeH0ucmd3LmxvZyIsCiAg - ICAgICAgICAgIF0KICAgICAgICAgICAgZm9yIF9yZ3dfcG9vbF90b192YWxpZGF0ZSBpbiByZ3df - cG9vbHNfdG9fdmFsaWRhdGU6CiAgICAgICAgICAgICAgICBpZiBub3Qgc2VsZi5jbHVzdGVyLnBv - b2xfZXhpc3RzKF9yZ3dfcG9vbF90b192YWxpZGF0ZSk6CiAgICAgICAgICAgICAgICAgICAgc3lz - LnN0ZGVyci53cml0ZSgKICAgICAgICAgICAgICAgICAgICAgICAgZiJUaGUgcHJvdmlkZWQgcG9v - bCwgJ3tfcmd3X3Bvb2xfdG9fdmFsaWRhdGV9JywgZG9lcyBub3QgZXhpc3QiCiAgICAgICAgICAg - ICAgICAgICAgKQogICAgICAgICAgICAgICAgICAgIHJldHVybiAiLTEiCgogICAgICAgIHJldHVy - biAiIgoKICAgIGRlZiB2YWxpZGF0ZV9yZ3dfbXVsdGlzaXRlKHNlbGYsIHJnd19tdWx0aXNpdGVf - Y29uZmlnX25hbWUsIHJnd19tdWx0aXNpdGVfY29uZmlnKToKICAgICAgICBpZiByZ3dfbXVsdGlz - aXRlX2NvbmZpZyAhPSAiIjoKICAgICAgICAgICAgY21kID0gWwogICAgICAgICAgICAgICAgInJh - ZG9zZ3ctYWRtaW4iLAogICAgICAgICAgICAgICAgcmd3X211bHRpc2l0ZV9jb25maWcsCiAgICAg - ICAgICAgICAgICAiZ2V0IiwKICAgICAgICAgICAgICAgICItLXJndy0iICsgcmd3X211bHRpc2l0 - ZV9jb25maWcsCiAgICAgICAgICAgICAgICByZ3dfbXVsdGlzaXRlX2NvbmZpZ19uYW1lLAogICAg - ICAgICAgICBdCiAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgIF8gPSBzdWJwcm9jZXNz - LmNoZWNrX291dHB1dChjbWQsIHN0ZGVycj1zdWJwcm9jZXNzLlBJUEUpCiAgICAgICAgICAgIGV4 - Y2VwdCBzdWJwcm9jZXNzLkNhbGxlZFByb2Nlc3NFcnJvciBhcyBleGVjRXJyOgogICAgICAgICAg - ICAgICAgZXJyX21zZyA9ICgKICAgICAgICAgICAgICAgICAgICBmImZhaWxlZCB0byBleGVjdXRl - IGNvbW1hbmQge2NtZH0uIE91dHB1dDoge2V4ZWNFcnIub3V0cHV0fS4gIgogICAgICAgICAgICAg - ICAgICAgIGYiQ29kZToge2V4ZWNFcnIucmV0dXJuY29kZX0uIEVycm9yOiB7ZXhlY0Vyci5zdGRl - cnJ9IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZShl - cnJfbXNnKQogICAgICAgICAgICAgICAgcmV0dXJuICItMSIKICAgICAgICByZXR1cm4gIiIKCiAg - ICBkZWYgY29udmVydF9jb21tYV9zZXBhcmF0ZWRfdG9fYXJyYXkoc2VsZiwgdmFsdWUpOgogICAg - ICAgIHJldHVybiB2YWx1ZS5zcGxpdCgiLCIpCgogICAgZGVmIHJhaXNlX2V4Y2VwdGlvbl9pZl9h - bnlfdG9wb2xvZ3lfZmxhZ19pc19taXNzaW5nKHNlbGYpOgogICAgICAgIGlmICgKICAgICAgICAg - ICAgKAogICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci50b3BvbG9neV9wb29scyAhPSAi - IgogICAgICAgICAgICAgICAgYW5kICgKICAgICAgICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFy - c2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX2xhYmVsID09ICIiCiAgICAgICAgICAgICAgICAg - ICAgb3Igc2VsZi5fYXJnX3BhcnNlci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl92YWx1ZXMgPT0g - IiIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgKQogICAgICAgICAgICBvciAoCiAgICAg - ICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX2xhYmVs - ICE9ICIiCiAgICAgICAgICAgICAgICBhbmQgKAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2Fy - Z19wYXJzZXIudG9wb2xvZ3lfcG9vbHMgPT0gIiIKICAgICAgICAgICAgICAgICAgICBvciBzZWxm - Ll9hcmdfcGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX3ZhbHVlcyA9PSAiIgogICAgICAg - ICAgICAgICAgKQogICAgICAgICAgICApCiAgICAgICAgICAgIG9yICgKICAgICAgICAgICAgICAg - IHNlbGYuX2FyZ19wYXJzZXIudG9wb2xvZ3lfZmFpbHVyZV9kb21haW5fdmFsdWVzICE9ICIiCiAg - ICAgICAgICAgICAgICBhbmQgKAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIu - dG9wb2xvZ3lfcG9vbHMgPT0gIiIKICAgICAgICAgICAgICAgICAgICBvciBzZWxmLl9hcmdfcGFy - c2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX2xhYmVsID09ICIiCiAgICAgICAgICAgICAgICAp - CiAgICAgICAgICAgICkKICAgICAgICApOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWls - dXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgInByb3ZpZ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ICAgICAgICAgIHNl - bGYuaW5pdF9yYmRfcG9vbChwb29sKQoKICAgICMgdGhpcyB3aWxsIHJldHVybiB0aGUgZmluYWwg - YXJncyB0aGF0IHNjcmlwdCB1c2VzIHRvIHByb2Nlc3MKICAgICMgdGhlIHByaW9yaXR5IHRvIHNl - dCBhIHBhcnRpY3VsYXIgdmFsdWUgaXMsCiAgICAjIGNvbW1hbmQtbGluZS1hcmdzID4gY29uZmln - LmluaSBmaWxlIHZhbHVlcyA+IGRlZmF1bHQgdmFsdWVzCiAgICBkZWYgZ2V0RmluYWxVc2VkQXJn - cyhzZWxmKToKICAgICAgICBhcmd1bWVudCA9IGYiW0NvbmZpZ3VyYXRpb25zXVxuIgogICAgICAg - IGZvciBhcmcgaW4gdmFycyhzZWxmLl9hcmdfcGFyc2VyKToKICAgICAgICAgICAgaWYgc3RyKGdl - dGF0dHIoc2VsZi5fYXJnX3BhcnNlciwgYXJnKSk6CiAgICAgICAgICAgICAgICAjIHB5dGhvbiB0 - cmVhdHMgZmxhZy1uYW1lIGFzIGZsYWdfbmFtZSBpbnRlcm5hbGx5LCBzbyBjb252ZXJ0aW5nIGJh - Y2sgdG8gZmxhZy1uYW1lLAogICAgICAgICAgICAgICAgIyBzbyB3ZSBjYW4gZ2V0IHRob3NlIHZh - bHVlcyBmcm9tIGNvbmZpZyBmaWxlCiAgICAgICAgICAgICAgICBhcmdWYWx1ZSA9IGFyZy5yZXBs - YWNlKCJfIiwgIi0iKQogICAgICAgICAgICAgICAgIyBkbyBub3QgYWRkIHRoZSBjb25maWctZmls - ZSBmbGFnIGFuZCBhbHNvIG5vdCBhZGQgdGhlIGJvb2xlYW4gZmxhZ3Mgd2hpY2ggYXJlIHNldCB0 - byBGYWxzZQogICAgICAgICAgICAgICAgIyBiZWNhdXNlIGNvbmZpZy5pbmkgZmlsZSB0cmVhdHMg - Ym9vbGVhbiBmbGFncyBhcyBUcnVlIGFsd2F5cwogICAgICAgICAgICAgICAgaWYgKAogICAgICAg - ICAgICAgICAgICAgIGFyZ1ZhbHVlICE9ICJjb25maWctZmlsZSIKICAgICAgICAgICAgICAgICAg - ICBhbmQgZ2V0YXR0cihzZWxmLl9hcmdfcGFyc2VyLCBhcmcpICE9IEZhbHNlCiAgICAgICAgICAg - ICAgICApOgogICAgICAgICAgICAgICAgICAgIGFyZ3VtZW50ICs9IGYie2FyZ1ZhbHVlfSA9IHtz - dHIoZ2V0YXR0cihzZWxmLl9hcmdfcGFyc2VyLCBhcmcpKX1cbiIKICAgICAgICByZXR1cm4gYXJn - dW1lbnQKCiAgICBkZWYgX2dlbl9vdXRwdXRfbWFwKHNlbGYpOgogICAgICAgIGlmIHNlbGYub3V0 - X21hcDoKICAgICAgICAgICAgcmV0dXJuCiAgICAgICAgIyBzdXBwb3J0IGxlZ2FjeSBmbGFnIHdp - dGggdXBncmFkZXMKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLmNsdXN0ZXJfbmFtZToKICAg - ICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5rOHNfY2x1c3Rlcl9uYW1lID0gc2VsZi5fYXJnX3Bh - cnNlci5jbHVzdGVyX25hbWUKICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLms4c19jbHVzdGVyX25h - bWUgPSAoCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIuazhzX2NsdXN0ZXJfbmFtZS5sb3dl - cigpCiAgICAgICAgKSAgIyBhbHdheXMgY29udmVydCBjbHVzdGVyIG5hbWUgdG8gbG93ZXJjYXNl - IGNoYXJhY3RlcnMKICAgICAgICBzZWxmLnZhbGlkYXRlX3JiZF9wb29sKHNlbGYuX2FyZ19wYXJz - ZXIucmJkX2RhdGFfcG9vbF9uYW1lKQogICAgICAgIHNlbGYuaW5pdF9yYmRfcG9vbChzZWxmLl9h - cmdfcGFyc2VyLnJiZF9kYXRhX3Bvb2xfbmFtZSkKICAgICAgICBzZWxmLnZhbGlkYXRlX3JhZG9z - X25hbWVzcGFjZSgpCiAgICA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lIGRl - ZmF1bHQgImNzaSIgc3Vidm9sdW1lZ3JvdXAKICAgICAgICAgICAgc2VsZi5nZXRfb3JfY3JlYXRl - X3N1YnZvbHVtZV9ncm91cCgKICAgICAgICAgICAgICAgICJjc2kiLCBzZWxmLl9hcmdfcGFyc2Vy - LmNlcGhmc19maWxlc3lzdGVtX25hbWUKICAgICAgICAgICAgKQogICAgICAgICAgICAjIHBpbiB0 - aGUgZGVmYXVsdCAiY3NpIiBzdWJ2b2x1bWVncm91cAogICAgICAgICAgICBzZWxmLnBpbl9zdWJ2 - b2x1bWUoCiAgICAgICAgICAgICAgICAiY3NpIiwgc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZmls - ZXN5c3RlbV9uYW1lLCAiZGlzdHJpYnV0ZWQiLCAiMSIKICAgICAgICAgICAgKQogICAgICAgICAg - ICBpZiBzZWxmLm91dF9tYXBbIlNVQlZPTFVNRV9HUk9VUCJdOgogICAgICAgICAgICAgICAgc2Vs - Zi5nZXRfb3JfY3JlYXRlX3N1YnZvbHVtZV9ncm91cCgKICAgICAgICAgICAgICAgICAgICBzZWxm - Ll9hcmdfcGFyc2VyLnN1YnZvbHVtZV9ncm91cCwKICAgICAgICAgICAgICAgICAgICBzZWxmLl9h - cmdfcGFyc2VyLmNlcGhmc19maWxlc3lzdGVtX25hbWUsCiAgICAgICAgICAgICAgICApCiAgICAg - ICAgICAgICAgICBzZWxmLnBpbl9zdWJ2b2x1bWUoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5f - YXJnX3BhcnNlci5zdWJ2b2x1bWVfZ3JvdXAsCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJn - X3BhcnNlci5jZXBoZnNfZmlsZXN5c3RlbV9uYW1lLAogICAgICAgICAgICAgICAgICAgICJkaXN0 - cmlidXRlZCIsCiAgICAgICAgICAgICAgICAgICAgIjEiLAogICAgICAgICAgICAgICAgKQogICAg - ICAgIHNlbGYub3V0X21hcFsiUkdXX1RMU19DRVJUIl0gPSAiIgogICAgICAgIHNlbGYub3V0X21h - cFsiTU9OSVRPUklOR19FTkRQT0lOVCJdID0gIiIKICAgICAgICBzZWxmLm91dF9tYXBbIk1PTklU - T1JJTkdfRU5EUE9JTlRfUE9SVCJdID0gIiIKICAgICAgICBpZiBub3Qgc2VsZi5fYXJnX3BhcnNl - ci5za2lwX21vbml0b3JpbmdfZW5kcG9pbnQ6CiAgICAgICAgICAgICgKICAgICAgICAgICAgICAg - IHNlbGYub3V0X21hcFsiTU9OSVRPUklOR19FTkRQT0lOVCJdLAogICAgICAgICAgICAgICAgc2Vs - Zi5vdXRfbWFwWyJNT05JVE9SSU5HX0VORFBPSU5UX1BPUlQiXSwKICAgICAgICAgICAgKSA9IHNl - bGYuZ2V0X2FjdGl2ZV9hbmRfc3RhbmRieV9tZ3JzKCkKICAgICAgICBzZWxmLm91dF9tYXBbIlJC - RF9QT09MX05BTUUiXSA9IHNlbGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9vbF9uYW1lCiAgICAg - ICAgc2VsZi5vdXRfbWFwWyJSQkRfTUVUQURBVEFfRUNfUE9PTF9OQU1FIl0gPSAoCiAgICAgICAg - ICAgIHNlbGYudmFsaWRhdGVfcmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZSgpCiAgICAgICAgKQog - ICAgICAgIHNlbGYub3V0X21hcFsiVE9QT0xPR1lfUE9PTFMiXSA9IHNlbGYuX2FyZ19wYXJzZXIu - dG9wb2xvZ3lfcG9vbHMKICAgICAgICBzZWxmLm91dF9tYXBbIlRPUE9MT0dZX0ZBSUxVUkVfRE9N - QUlOX0xBQkVMIl0gPSAoCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIudG9wb2xvZ3lfZmFp - bHVyZV9kb21haW5fbGFiZWwKICAgICAgICApCiAgICAgICAgc2VsZi5vdXRfbWFwWyJUT1BPTE9H - WV9GQUlMVVJFX0RPTUFJTl9WQUxVRVMiXSA9ICgKICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNl - ci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl92YWx1ZXMKICAgICAgICApCiAgICAgICAgaWYgKAog - ICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X3Bvb2xzICE9ICIiCiAgICAgICAg - ICAgIGFuZCBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX2xhYmVsICE9 - ICIiCiAgICAgICAgICAgIGFuZCBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9t - YWluX3ZhbHVlcyAhPSAiIgogICAgICAgICk6CiAgICAgICAgICAgIHNlbGYudmFsaWRhdGVfdG9w - b2xvZ3lfdmFsdWVzKAogICAgICAgICAgICAgICAgc2VsZi5jb252ZXJ0X2NvbW1hX3NlcGFyYXRl - ZF90b19hcnJheShzZWxmLm91dF9tYXBbIlRPUE9MT0dZX1BPT0xTIl0pLAogICAgICAgICAgICAg - ICAgc2VsZi5jb252ZXJ0X2NvbW1hX3NlcGFyYXRlZF90b19hcnJheSgKICAgICAgICAgICAgICAg - ICAgICBzZWxmLm91dF9tYXBbIlRPUE9MT0dZX0ZBSUxVUkVfRE9NQUlOX1ZBTFVFUyJdCiAgICAg - ICAgICAgICAgICApLAogICAgICAgICAgICApCiAgICAgICAgICAgIHNlbGYudmFsaWRhdGVfdG9w - b2xvZ3lfcmJkX3Bvb2xzKAogICAgICAgICAgICAgICAgc2VsZi5jb252ZXJ0X2NvbW1hX3NlcGFy - YXRlZF90b19hcnJheShzZWxmLm91dF9tYXBbIlRPUE9MT0dZX1BPT0xTIl0pCiAgICAgICAgICAg - ICkKICAgICAgICAgICAgc2VsZi5pbml0X3RvcG9sb2d5X3JiZF9wb29scygKICAgICAgICAgICAg - ICAgIHNlbGYuY29udmVydF9jb21tYV9zZXBhcmF0ZWRfdG9fYXJyYXkoc2VsZi5vdXRfbWFwWyJU - T1BPTE9HWV9QT09MUyJdKQogICAgICAgICAgICApCiAgICAgICAgZWxzZToKICAgICAgICAgICAg - c2VsZi5yYWlzZV9leGNlcHRpb25faWZfYW55X3RvcG9sb2d5X2ZsYWdfaXNfbWlzc2luZygpCgog - ICAgICAgIHNlbGYub3V0X21hcFsiUkdXX1BPT0xfUFJFRklYIl0gPSBzZWxmLl9hcmdfcGFyc2Vy - LnJnd19wb29sX3ByZWZpeAogICAgICAgIHNlbGYub3V0X21hcFsiUkdXX0VORFBPSU5UIl0gPSAi - IgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIucmd3X2VuZHBvaW50OgogICAgICAgICAgICBp - ZiBzZWxmLl9hcmdfcGFyc2VyLmRyeV9ydW46CiAgICAgICAgICAgICAgICBzZWxmLmNyZWF0ZV9y - Z3dfYWRtaW5fb3BzX3VzZXIoKQogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgaWYg + IGNlcGhmcyAqPSoiLAogICAgICAgICAgICAibWRzIjogImFsbG93IHJ3IiwKICAgICAgICB9CiAg + ICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbjoKICAg + ICAgICAgICAgazhzX2NsdXN0ZXJfbmFtZSA9IHNlbGYuX2FyZ19wYXJzZXIuazhzX2NsdXN0ZXJf + bmFtZQogICAgICAgICAgICBpZiBrOHNfY2x1c3Rlcl9uYW1lID09ICIiOgogICAgICAgICAgICAg + ICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICAi + azhzX2NsdXN0ZXJfbmFtZSBub3QgZm91bmQsIHBsZWFzZSBzZXQgdGhlICctLWs4cy1jbHVzdGVy + LW5hbWUnIGZsYWciCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgIGNlcGhmc19maWxlc3lz + dGVtID0gc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZmlsZXN5c3RlbV9uYW1lCiAgICAgICAgICAg + IGlmIGNlcGhmc19maWxlc3lzdGVtID09ICIiOgogICAgICAgICAgICAgICAgZW50aXR5ID0gZiJ7 + ZW50aXR5fS17azhzX2NsdXN0ZXJfbmFtZX0iCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAg + ICAgICBlbnRpdHkgPSBmIntlbnRpdHl9LXtrOHNfY2x1c3Rlcl9uYW1lfS17Y2VwaGZzX2ZpbGVz + eXN0ZW19IgogICAgICAgICAgICAgICAgY2Fwc1sib3NkIl0gPSBmImFsbG93IHJ3IHRhZyBjZXBo + ZnMgKj17Y2VwaGZzX2ZpbGVzeXN0ZW19IgoKICAgICAgICByZXR1cm4gY2FwcywgZW50aXR5Cgog + ICAgZGVmIGdldF9lbnRpdHkoCiAgICAgICAgc2VsZiwKICAgICAgICBlbnRpdHksCiAgICAgICAg + cmJkX3Bvb2xfbmFtZSwKICAgICAgICBhbGlhc19yYmRfcG9vbF9uYW1lLAogICAgICAgIGs4c19j + bHVzdGVyX25hbWUsCiAgICAgICAgcmFkb3NfbmFtZXNwYWNlLAogICAgKToKICAgICAgICBpZiAo + CiAgICAgICAgICAgIHJiZF9wb29sX25hbWUuY291bnQoIi4iKSAhPSAwCiAgICAgICAgICAgIG9y + IHJiZF9wb29sX25hbWUuY291bnQoIl8iKSAhPSAwCiAgICAgICAgICAgIG9yIGFsaWFzX3JiZF9w + b29sX25hbWUgIT0gIiIKICAgICAgICAgICAgIyBjaGVja2luZyBhbGlhc19yYmRfcG9vbF9uYW1l + IGlzIG5vdCBlbXB0eSBhcyB0aGVyZSBtYXliZSBhIHNwZWNpYWwgY2hhcmFjdGVyIHVzZWQgb3Ro + ZXIgdGhhbiAuIG9yIF8KICAgICAgICApOgogICAgICAgICAgICBpZiBhbGlhc19yYmRfcG9vbF9u + YW1lID09ICIiOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlv + bigKICAgICAgICAgICAgICAgICAgICAicGxlYXNlIHNldCB0aGUgJy0tYWxpYXMtcmJkLWRhdGEt + cG9vbC1uYW1lJyBmbGFnIGFzIHRoZSByYmQgZGF0YSBwb29sIG5hbWUgY29udGFpbnMgJy4nIG9y + ICdfJyIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgKAogICAgICAgICAgICAgICAg + YWxpYXNfcmJkX3Bvb2xfbmFtZS5jb3VudCgiLiIpICE9IDAKICAgICAgICAgICAgICAgIG9yIGFs + aWFzX3JiZF9wb29sX25hbWUuY291bnQoIl8iKSAhPSAwCiAgICAgICAgICAgICk6CiAgICAgICAg + ICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAg + ICAgICInLS1hbGlhcy1yYmQtZGF0YS1wb29sLW5hbWUnIGZsYWcgdmFsdWUgc2hvdWxkIG5vdCBj + b250YWluICcuJyBvciAnXyciCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgIGVudGl0eSA9 + IGYie2VudGl0eX0te2s4c19jbHVzdGVyX25hbWV9LXthbGlhc19yYmRfcG9vbF9uYW1lfSIKICAg + ICAgICBlbHNlOgogICAgICAgICAgICBlbnRpdHkgPSBmIntlbnRpdHl9LXtrOHNfY2x1c3Rlcl9u + YW1lfS17cmJkX3Bvb2xfbmFtZX0iCgogICAgICAgIGlmIHJhZG9zX25hbWVzcGFjZToKICAgICAg + ICAgICAgZW50aXR5ID0gZiJ7ZW50aXR5fS17cmFkb3NfbmFtZXNwYWNlfSIKICAgICAgICByZXR1 + cm4gZW50aXR5CgogICAgZGVmIGdldF9yYmRfcHJvdmlzaW9uZXJfY2Fwc19hbmRfZW50aXR5KHNl + bGYpOgogICAgICAgIGVudGl0eSA9ICJjbGllbnQuY3NpLXJiZC1wcm92aXNpb25lciIKICAgICAg + ICBjYXBzID0gewogICAgICAgICAgICAibW9uIjogInByb2ZpbGUgcmJkLCBhbGxvdyBjb21tYW5k + ICdvc2QgYmxvY2tsaXN0JyIsCiAgICAgICAgICAgICJtZ3IiOiAiYWxsb3cgcnciLAogICAgICAg + ICAgICAib3NkIjogInByb2ZpbGUgcmJkIiwKICAgICAgICB9CiAgICAgICAgaWYgc2VsZi5fYXJn + X3BhcnNlci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbjoKICAgICAgICAgICAgcmJkX3Bvb2xf + bmFtZSA9IHNlbGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9vbF9uYW1lCiAgICAgICAgICAgIGFs + aWFzX3JiZF9wb29sX25hbWUgPSBzZWxmLl9hcmdfcGFyc2VyLmFsaWFzX3JiZF9kYXRhX3Bvb2xf + bmFtZQogICAgICAgICAgICBrOHNfY2x1c3Rlcl9uYW1lID0gc2VsZi5fYXJnX3BhcnNlci5rOHNf + Y2x1c3Rlcl9uYW1lCiAgICAgICAgICAgIHJhZG9zX25hbWVzcGFjZSA9IHNlbGYuX2FyZ19wYXJz + ZXIucmFkb3NfbmFtZXNwYWNlCiAgICAgICAgICAgIGlmIHJiZF9wb29sX25hbWUgPT0gIiI6CiAg + ICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAg + ICAgICAgICAgICJtYW5kYXRvcnkgZmxhZyBub3QgZm91bmQsIHBsZWFzZSBzZXQgdGhlICctLXJi + ZC1kYXRhLXBvb2wtbmFtZScgZmxhZyIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgaWYg + azhzX2NsdXN0ZXJfbmFtZSA9PSAiIjoKICAgICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZh + aWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIm1hbmRhdG9yeSBmbGFnIG5vdCBm + b3VuZCwgcGxlYXNlIHNldCB0aGUgJy0tazhzLWNsdXN0ZXItbmFtZScgZmxhZyIKICAgICAgICAg + ICAgICAgICkKICAgICAgICAgICAgZW50aXR5ID0gc2VsZi5nZXRfZW50aXR5KAogICAgICAgICAg + ICAgICAgZW50aXR5LAogICAgICAgICAgICAgICAgcmJkX3Bvb2xfbmFtZSwKICAgICAgICAgICAg + ICAgIGFsaWFzX3JiZF9wb29sX25hbWUsCiAgICAgICAgICAgICAgICBrOHNfY2x1c3Rlcl9uYW1l + LAogICAgICAgICAgICAgICAgcmFkb3NfbmFtZXNwYWNlLAogICAgICAgICAgICApCiAgICAgICAg + ICAgIGlmIHJhZG9zX25hbWVzcGFjZSAhPSAiIjoKICAgICAgICAgICAgICAgIGNhcHNbIm9zZCJd + ID0gKAogICAgICAgICAgICAgICAgICAgIGYicHJvZmlsZSByYmQgcG9vbD17cmJkX3Bvb2xfbmFt + ZX0gbmFtZXNwYWNlPXtyYWRvc19uYW1lc3BhY2V9IgogICAgICAgICAgICAgICAgKQogICAgICAg + ICAgICBlbHNlOgogICAgICAgICAgICAgICAgY2Fwc1sib3NkIl0gPSBmInByb2ZpbGUgcmJkIHBv + b2w9e3JiZF9wb29sX25hbWV9IgoKICAgICAgICByZXR1cm4gY2FwcywgZW50aXR5CgogICAgZGVm + IGdldF9yYmRfbm9kZV9jYXBzX2FuZF9lbnRpdHkoc2VsZik6CiAgICAgICAgZW50aXR5ID0gImNs + aWVudC5jc2ktcmJkLW5vZGUiCiAgICAgICAgY2FwcyA9IHsKICAgICAgICAgICAgIm1vbiI6ICJw + cm9maWxlIHJiZCwgYWxsb3cgY29tbWFuZCAnb3NkIGJsb2NrbGlzdCciLAogICAgICAgICAgICAi + b3NkIjogInByb2ZpbGUgcmJkIiwKICAgICAgICB9CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNl + ci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbjoKICAgICAgICAgICAgcmJkX3Bvb2xfbmFtZSA9 + IHNlbGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9vbF9uYW1lCiAgICAgICAgICAgIGFsaWFzX3Ji + ZF9wb29sX25hbWUgPSBzZWxmLl9hcmdfcGFyc2VyLmFsaWFzX3JiZF9kYXRhX3Bvb2xfbmFtZQog + ICAgICAgICAgICBrOHNfY2x1c3Rlcl9uYW1lID0gc2VsZi5fYXJnX3BhcnNlci5rOHNfY2x1c3Rl + cl9uYW1lCiAgICAgICAgICAgIHJhZG9zX25hbWVzcGFjZSA9IHNlbGYuX2FyZ19wYXJzZXIucmFk + b3NfbmFtZXNwYWNlCiAgICAgICAgICAgIGlmIHJiZF9wb29sX25hbWUgPT0gIiI6CiAgICAgICAg + ICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAg + ICAgICJtYW5kYXRvcnkgZmxhZyBub3QgZm91bmQsIHBsZWFzZSBzZXQgdGhlICctLXJiZC1kYXRh + LXBvb2wtbmFtZScgZmxhZyIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgazhzX2Ns + dXN0ZXJfbmFtZSA9PSAiIjoKICAgICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVF + eGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIm1hbmRhdG9yeSBmbGFnIG5vdCBmb3VuZCwg + cGxlYXNlIHNldCB0aGUgJy0tazhzLWNsdXN0ZXItbmFtZScgZmxhZyIKICAgICAgICAgICAgICAg + ICkKICAgICAgICAgICAgZW50aXR5ID0gc2VsZi5nZXRfZW50aXR5KAogICAgICAgICAgICAgICAg + ZW50aXR5LAogICAgICAgICAgICAgICAgcmJkX3Bvb2xfbmFtZSwKICAgICAgICAgICAgICAgIGFs + aWFzX3JiZF9wb29sX25hbWUsCiAgICAgICAgICAgICAgICBrOHNfY2x1c3Rlcl9uYW1lLAogICAg + ICAgICAgICAgICAgcmFkb3NfbmFtZXNwYWNlLAogICAgICAgICAgICApCiAgICAgICAgICAgIGlm + IHJhZG9zX25hbWVzcGFjZSAhPSAiIjoKICAgICAgICAgICAgICAgIGNhcHNbIm9zZCJdID0gKAog + ICAgICAgICAgICAgICAgICAgIGYicHJvZmlsZSByYmQgcG9vbD17cmJkX3Bvb2xfbmFtZX0gbmFt + ZXNwYWNlPXtyYWRvc19uYW1lc3BhY2V9IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBl + bHNlOgogICAgICAgICAgICAgICAgY2Fwc1sib3NkIl0gPSBmInByb2ZpbGUgcmJkIHBvb2w9e3Ji + ZF9wb29sX25hbWV9IgoKICAgICAgICByZXR1cm4gY2FwcywgZW50aXR5CgogICAgZGVmIGdldF9k + ZWZhdWx0VXNlcl9jYXBzX2FuZF9lbnRpdHkoc2VsZik6CiAgICAgICAgZW50aXR5ID0gc2VsZi5y + dW5fYXNfdXNlcgogICAgICAgIGNhcHMgPSB7CiAgICAgICAgICAgICJtb24iOiAiYWxsb3cgciwg + YWxsb3cgY29tbWFuZCBxdW9ydW1fc3RhdHVzLCBhbGxvdyBjb21tYW5kIHZlcnNpb24iLAogICAg + ICAgICAgICAibWdyIjogImFsbG93IGNvbW1hbmQgY29uZmlnIiwKICAgICAgICAgICAgIm9zZCI6 + IGYicHJvZmlsZSByYmQtcmVhZC1vbmx5LCBhbGxvdyByd3ggcG9vbD17c2VsZi5fYXJnX3BhcnNl + ci5yZ3dfcG9vbF9wcmVmaXh9LnJndy5tZXRhLCBhbGxvdyByIHBvb2w9LnJndy5yb290LCBhbGxv + dyBydyBwb29sPXtzZWxmLl9hcmdfcGFyc2VyLnJnd19wb29sX3ByZWZpeH0ucmd3LmNvbnRyb2ws + IGFsbG93IHJ4IHBvb2w9e3NlbGYuX2FyZ19wYXJzZXIucmd3X3Bvb2xfcHJlZml4fS5yZ3cubG9n + LCBhbGxvdyB4IHBvb2w9e3NlbGYuX2FyZ19wYXJzZXIucmd3X3Bvb2xfcHJlZml4fS5yZ3cuYnVj + a2V0cy5pbmRleCIsCiAgICAgICAgICAgICJtZHMiOiAiYWxsb3cgKiIsCiAgICAgICAgfQoKICAg + ICAgICByZXR1cm4gY2FwcywgZW50aXR5CgogICAgZGVmIGdldF9jYXBzX2FuZF9lbnRpdHkoc2Vs + ZiwgdXNlcl9uYW1lKToKICAgICAgICBpZiAiY2xpZW50LmNzaS1jZXBoZnMtcHJvdmlzaW9uZXIi + IGluIHVzZXJfbmFtZToKICAgICAgICAgICAgaWYgImNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lv + bmVyIiAhPSB1c2VyX25hbWU6CiAgICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnJlc3Ry + aWN0ZWRfYXV0aF9wZXJtaXNzaW9uID0gVHJ1ZQogICAgICAgICAgICByZXR1cm4gc2VsZi5nZXRf + Y2VwaGZzX3Byb3Zpc2lvbmVyX2NhcHNfYW5kX2VudGl0eSgpCiAgICAgICAgaWYgImNsaWVudC5j + c2ktY2VwaGZzLW5vZGUiIGluIHVzZXJfbmFtZToKICAgICAgICAgICAgaWYgImNsaWVudC5jc2kt + Y2VwaGZzLW5vZGUiICE9IHVzZXJfbmFtZToKICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJz + ZXIucmVzdHJpY3RlZF9hdXRoX3Blcm1pc3Npb24gPSBUcnVlCiAgICAgICAgICAgIHJldHVybiBz + ZWxmLmdldF9jZXBoZnNfbm9kZV9jYXBzX2FuZF9lbnRpdHkoKQogICAgICAgIGlmICJjbGllbnQu + Y3NpLXJiZC1wcm92aXNpb25lciIgaW4gdXNlcl9uYW1lOgogICAgICAgICAgICBpZiAiY2xpZW50 + LmNzaS1yYmQtcHJvdmlzaW9uZXIiICE9IHVzZXJfbmFtZToKICAgICAgICAgICAgICAgIHNlbGYu + X2FyZ19wYXJzZXIucmVzdHJpY3RlZF9hdXRoX3Blcm1pc3Npb24gPSBUcnVlCiAgICAgICAgICAg + IHJldHVybiBzZWxmLmdldF9yYmRfcHJvdmlzaW9uZXJfY2Fwc19hbmRfZW50aXR5KCkKICAgICAg + ICBpZiAiY2xpZW50LmNzaS1yYmQtbm9kZSIgaW4gdXNlcl9uYW1lOgogICAgICAgICAgICBpZiAi + Y2xpZW50LmNzaS1yYmQtbm9kZSIgIT0gdXNlcl9uYW1lOgogICAgICAgICAgICAgICAgc2VsZi5f + YXJnX3BhcnNlci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbiA9IFRydWUKICAgICAgICAgICAg + cmV0dXJuIHNlbGYuZ2V0X3JiZF9ub2RlX2NhcHNfYW5kX2VudGl0eSgpCiAgICAgICAgaWYgImNs + aWVudC5oZWFsdGhjaGVja2VyIiBpbiB1c2VyX25hbWU6CiAgICAgICAgICAgIGlmICJjbGllbnQu + aGVhbHRoY2hlY2tlciIgIT0gdXNlcl9uYW1lOgogICAgICAgICAgICAgICAgc2VsZi5fYXJnX3Bh + cnNlci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbiA9IFRydWUKICAgICAgICAgICAgcmV0dXJu + IHNlbGYuZ2V0X2RlZmF1bHRVc2VyX2NhcHNfYW5kX2VudGl0eSgpCgogICAgICAgIHJhaXNlIEV4 + ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgIGYibm8gdXNlciBmb3VuZCB3aXRo + IHVzZXJfbmFtZToge3VzZXJfbmFtZX0sICIKICAgICAgICAgICAgImdldF9jYXBzX2FuZF9lbnRp + dHkgY29tbWFuZCBmYWlsZWQuXG4iCiAgICAgICAgKQoKICAgIGRlZiBjcmVhdGVfY2VwaENTSUtl + eXJpbmdfdXNlcihzZWxmLCB1c2VyKToKICAgICAgICAiIiIKICAgICAgICBjb21tYW5kOiBjZXBo + IGF1dGggZ2V0LW9yLWNyZWF0ZSBjbGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciBtb24gJ2Fs + bG93IHInIG1nciAnYWxsb3cgcncnIG9zZCAnYWxsb3cgcncgdGFnIGNlcGhmcyBtZXRhZGF0YT0q + JwogICAgICAgICIiIgogICAgICAgIGNhcHMsIGVudGl0eSA9IHNlbGYuZ2V0X2NhcHNfYW5kX2Vu + dGl0eSh1c2VyKQogICAgICAgIGNtZF9qc29uID0gewogICAgICAgICAgICAicHJlZml4IjogImF1 + dGggZ2V0LW9yLWNyZWF0ZSIsCiAgICAgICAgICAgICJlbnRpdHkiOiBlbnRpdHksCiAgICAgICAg + ICAgICJjYXBzIjogW2NhcCBmb3IgY2FwX2xpc3QgaW4gbGlzdChjYXBzLml0ZW1zKCkpIGZvciBj + YXAgaW4gY2FwX2xpc3RdLAogICAgICAgICAgICAiZm9ybWF0IjogImpzb24iLAogICAgICAgIH0K + CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICByZXR1cm4g + KAogICAgICAgICAgICAgICAgc2VsZi5kcnlfcnVuKAogICAgICAgICAgICAgICAgICAgICJjZXBo + ICIKICAgICAgICAgICAgICAgICAgICArIGNtZF9qc29uWyJwcmVmaXgiXQogICAgICAgICAgICAg + ICAgICAgICsgIiAiCiAgICAgICAgICAgICAgICAgICAgKyBjbWRfanNvblsiZW50aXR5Il0KICAg + ICAgICAgICAgICAgICAgICArICIgIgogICAgICAgICAgICAgICAgICAgICsgIiAiLmpvaW4oY21k + X2pzb25bImNhcHMiXSkKICAgICAgICAgICAgICAgICksCiAgICAgICAgICAgICAgICAiIiwKICAg + ICAgICAgICAgKQogICAgICAgICMgY2hlY2sgaWYgdXNlciBhbHJlYWR5IGV4aXN0CiAgICAgICAg + dXNlcl9rZXkgPSBzZWxmLmNoZWNrX3VzZXJfZXhpc3QoZW50aXR5KQogICAgICAgIGlmIHVzZXJf + a2V5ICE9ICIiOgogICAgICAgICAgICByZXR1cm4gdXNlcl9rZXksIGYie2VudGl0eS5zcGxpdCgn + LicsIDEpWzFdfSIKICAgICAgICAgICAgIyBlbnRpdHkuc3BsaXQoJy4nLDEpWzFdIHRvIHJlbmFt + ZSBlbnRpdHkoY2xpZW50LmNzaS1yYmQtbm9kZSkgYXMgY3NpLXJiZC1ub2RlCgogICAgICAgIHJl + dF92YWwsIGpzb25fb3V0LCBlcnJfbXNnID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRf + anNvbikKICAgICAgICAjIGlmIHRoZXJlIGlzIGFuIHVuc3VjY2Vzc2Z1bCBhdHRlbXB0LAogICAg + ICAgIGlmIHJldF92YWwgIT0gMCBvciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHJh + aXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICBmIidhdXRoIGdl + dC1vci1jcmVhdGUge3VzZXJ9JyBjb21tYW5kIGZhaWxlZC5cbiIKICAgICAgICAgICAgICAgIGYi + RXJyb3I6IHtlcnJfbXNnIGlmIHJldF92YWwgIT0gMCBlbHNlIHNlbGYuRU1QVFlfT1VUUFVUX0xJ + U1R9IgogICAgICAgICAgICApCiAgICAgICAgcmV0dXJuIHN0cihqc29uX291dFswXVsia2V5Il0p + LCBmIntlbnRpdHkuc3BsaXQoJy4nLCAxKVsxXX0iCiAgICAgICAgIyBlbnRpdHkuc3BsaXQoJy4n + LDEpWzFdIHRvIHJlbmFtZSBlbnRpdHkoY2xpZW50LmNzaS1yYmQtbm9kZSkgYXMgY3NpLXJiZC1u + b2RlCgogICAgZGVmIGdldF9jZXBoZnNfZGF0YV9wb29sX2RldGFpbHMoc2VsZik6CiAgICAgICAg + Y21kX2pzb24gPSB7InByZWZpeCI6ICJmcyBscyIsICJmb3JtYXQiOiAianNvbiJ9CiAgICAgICAg + aWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICByZXR1cm4gc2VsZi5kcnlf + cnVuKCJjZXBoICIgKyBjbWRfanNvblsicHJlZml4Il0pCiAgICAgICAgcmV0X3ZhbCwganNvbl9v + dXQsIGVycl9tc2cgPSBzZWxmLl9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAg + ICMgaWYgdGhlcmUgaXMgYW4gdW5zdWNjZXNzZnVsIGF0dGVtcHQsIHJlcG9ydCBhbiBlcnJvcgog + ICAgICAgIGlmIHJldF92YWwgIT0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lIG1hdGNoaW5nIGxpc3QKICAgICAg + ICAgICAgbWF0Y2hpbmdfanNvbl9vdXRfbGlzdCA9IFsKICAgICAgICAgICAgICAgIG1hdGNoZWQK + ICAgICAgICAgICAgICAgIGZvciBtYXRjaGVkIGluIGpzb25fb3V0CiAgICAgICAgICAgICAgICBp + ZiBzdHIobWF0Y2hlZFsibmFtZSJdKSA9PSBzZWxmLl9hcmdfcGFyc2VyLmNlcGhmc19maWxlc3lz + dGVtX25hbWUKICAgICAgICAgICAgXQogICAgICAgICAgICAjIHVuYWJsZSB0byBmaW5kIGEgbWF0 + Y2hpbmcgZnMtbmFtZSwgcmFpc2UgYW4gZXJyb3IKICAgICAgICAgICAgaWYgbGVuKG1hdGNoaW5n + X2pzb25fb3V0X2xpc3QpID09IDA6CiAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWls + dXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgIGYiRmlsZXN5c3RlbSBwcm92aWRlZCwg + J3tzZWxmLl9hcmdfcGFyc2VyLmNlcGhmc19maWxlc3lzdGVtX25hbWV9JywgIgogICAgICAgICAg + ICAgICAgICAgIGYiaXMgbm90IGZvdW5kIGluIHRoZSBmcy1saXN0OiB7W3N0cih4WyduYW1lJ10p + IGZvciB4IGluIGpzb25fb3V0XX0iCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgIG1hdGNo + aW5nX2pzb25fb3V0ID0gbWF0Y2hpbmdfanNvbl9vdXRfbGlzdFswXQogICAgICAgICMgaWYgY2Vw + aGZzIGZpbGVzeXN0ZW0gbmFtZSBpcyBub3QgcHJvdmlkZWQsCiAgICAgICAgIyB0cnkgdG8gZ2V0 + IGEgZGVmYXVsdCBmcyBuYW1lIGJ5IGRvaW5nIHRoZSBmb2xsb3dpbmcKICAgICAgICBlbHNlOgog + ICAgICAgICAgICAjIGEuIGNoZWNrIGlmIHRoZXJlIGlzIG9ubHkgb25lIGZpbGVzeXN0ZW0gaXMg + cHJlc2VudAogICAgICAgICAgICBpZiBsZW4oanNvbl9vdXQpID09IDE6CiAgICAgICAgICAgICAg + ICBtYXRjaGluZ19qc29uX291dCA9IGpzb25fb3V0WzBdCiAgICAgICAgICAgICMgYi4gb3IgZWxz + ZSwgY2hlY2sgaWYgZGF0YV9wb29sIG5hbWUgaXMgcHJvdmlkZWQKICAgICAgICAgICAgZWxpZiBz + ZWxmLl9hcmdfcGFyc2VyLmNlcGhmc19kYXRhX3Bvb2xfbmFtZToKICAgICAgICAgICAgICAgICMg + YW5kIGlmIHByZXNlbnQsIGNoZWNrIHdoZXRoZXIgdGhlcmUgZXhpc3RzIGEgZnMgd2hpY2ggaGFz + IHRoZSBkYXRhX3Bvb2wKICAgICAgICAgICAgICAgIGZvciBlYWNoSiBpbiBqc29uX291dDoKICAg + ICAgICAgICAgICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLmNlcGhmc19kYXRhX3Bvb2xfbmFt + ZSBpbiBlYWNoSlsiZGF0YV9wb29scyJdOgogICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGlu + Z19qc29uX291dCA9IGVhY2hKCiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrCiAgICAgICAg + ICAgICAgICAjIGlmIHRoZXJlIGlzIG5vIG1hdGNoaW5nIGZzIGV4aXN0cywgdGhhdCBtZWFucyBw + cm92aWRlZCBkYXRhX3Bvb2wgbmFtZSBpcyBpbnZhbGlkCiAgICAgICAgICAgICAgICBpZiBub3Qg + bWF0Y2hpbmdfanNvbl9vdXQ6CiAgICAgICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFp + bHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICAgICAgZiJQcm92aWRlZCBkYXRhX3Bv + b2wgbmFtZSwge3NlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2RhdGFfcG9vbF9uYW1lfSwiCiAgICAg + ICAgICAgICAgICAgICAgICAgICIgZG9lcyBub3QgZXhpc3RzIgogICAgICAgICAgICAgICAgICAg + ICkKICAgICAgICAgICAgIyBjLiBpZiBub3RoaW5nIGlzIHNldCBhbmQgY291bGRuJ3QgZmluZCBh + IGRlZmF1bHQsCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAjIGp1c3QgcmV0dXJu + IHNpbGVudGx5CiAgICAgICAgICAgICAgICByZXR1cm4KCiAgICAgICAgaWYgbWF0Y2hpbmdfanNv + bl9vdXQ6CiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2ZpbGVzeXN0ZW1fbmFt + ZSA9IHN0cihtYXRjaGluZ19qc29uX291dFsibmFtZSJdKQogICAgICAgICAgICBzZWxmLl9hcmdf + cGFyc2VyLmNlcGhmc19tZXRhZGF0YV9wb29sX25hbWUgPSBzdHIoCiAgICAgICAgICAgICAgICBt + YXRjaGluZ19qc29uX291dFsibWV0YWRhdGFfcG9vbCJdCiAgICAgICAgICAgICkKCiAgICAgICAg + aWYgaXNpbnN0YW5jZShtYXRjaGluZ19qc29uX291dFsiZGF0YV9wb29scyJdLCBsaXN0KToKICAg + ICAgICAgICAgIyBpZiB0aGUgdXNlciBoYXMgYWxyZWFkeSBwcm92aWRlZCBkYXRhLXBvb2wtbmFt + ZSwKICAgICAgICAgICAgIyB0aHJvdWdoIC0tY2VwaGZzLWRhdGEtcG9vbC1uYW1lCiAgICAgICAg + ICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2RhdGFfcG9vbF9uYW1lOgogICAgICAgICAg + ICAgICAgIyBpZiB0aGUgcHJvdmlkZWQgbmFtZSBpcyBub3QgbWF0Y2hpbmcgd2l0aCB0aGUgb25l + IGluIHRoZSBsaXN0CiAgICAgICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICAgICAgc2Vs + Zi5fYXJnX3BhcnNlci5jZXBoZnNfZGF0YV9wb29sX25hbWUKICAgICAgICAgICAgICAgICAgICBu + b3QgaW4gbWF0Y2hpbmdfanNvbl9vdXRbImRhdGFfcG9vbHMiXQogICAgICAgICAgICAgICAgKToK + ICAgICAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAg + ICAgICAgICAgICAgICAgICAgICBmIlByb3ZpZGVkIGRhdGEtcG9vbC1uYW1lOiAne3NlbGYuX2Fy + Z19wYXJzZXIuY2VwaGZzX2RhdGFfcG9vbF9uYW1lfScsICIKICAgICAgICAgICAgICAgICAgICAg + ICAgImRvZXNuJ3QgbWF0Y2ggZnJvbSB0aGUgZGF0YS1wb29scyBsaXN0OiAiCiAgICAgICAgICAg + ICAgICAgICAgICAgIGYie1tzdHIoeCkgZm9yIHggaW4gbWF0Y2hpbmdfanNvbl9vdXRbJ2RhdGFf + cG9vbHMnXV19IgogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgIyBpZiBkYXRhX3Bv + b2wgbmFtZSBpcyBub3QgcHJvdmlkZWQsCiAgICAgICAgICAgICMgdGhlbiB0cnkgdG8gZmluZCBh + IGRlZmF1bHQgZGF0YSBwb29sIG5hbWUKICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAg + ICMgaWYgbm8gZGF0YV9wb29scyBleGlzdCwgc2lsZW50bHkgcmV0dXJuCiAgICAgICAgICAgICAg + ICBpZiBsZW4obWF0Y2hpbmdfanNvbl9vdXRbImRhdGFfcG9vbHMiXSkgPT0gMDoKICAgICAgICAg + ICAgICAgICAgICByZXR1cm4KICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZz + X2RhdGFfcG9vbF9uYW1lID0gc3RyKAogICAgICAgICAgICAgICAgICAgIG1hdGNoaW5nX2pzb25f + b3V0WyJkYXRhX3Bvb2xzIl1bMF0KICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgIyBpZiB0 + aGVyZSBhcmUgbW9yZSB0aGFuIG9uZSAnZGF0YV9wb29scycgZXhpc3QsCiAgICAgICAgICAgICMg + dGhlbiB3YXJuIHRoZSB1c2VyIHRoYXQgd2UgYXJlIHVzaW5nIHRoZSBzZWxlY3RlZCBuYW1lCiAg + ICAgICAgICAgIGlmIGxlbihtYXRjaGluZ19qc29uX291dFsiZGF0YV9wb29scyJdKSA+IDE6CiAg + ICAgICAgICAgICAgICBwcmludCgKICAgICAgICAgICAgICAgICAgICAiV0FSTklORzogTXVsdGlw + bGUgZGF0YSBwb29scyBkZXRlY3RlZDogIgogICAgICAgICAgICAgICAgICAgIGYie1tzdHIoeCkg + Zm9yIHggaW4gbWF0Y2hpbmdfanNvbl9vdXRbJ2RhdGFfcG9vbHMnXV19XG4iCiAgICAgICAgICAg + ICAgICAgICAgZiJVc2luZyB0aGUgZGF0YS1wb29sOiAne3NlbGYuX2FyZ19wYXJzZXIuY2VwaGZz + X2RhdGFfcG9vbF9uYW1lfSdcbiIKICAgICAgICAgICAgICAgICkKCiAgICBkZWYgY3JlYXRlX2No + ZWNrZXJLZXkoc2VsZiwgdXNlcik6CiAgICAgICAgY2FwcywgZW50aXR5ID0gc2VsZi5nZXRfY2Fw + c19hbmRfZW50aXR5KHVzZXIpCiAgICAgICAgY21kX2pzb24gPSB7CiAgICAgICAgICAgICJwcmVm + aXgiOiAiYXV0aCBnZXQtb3ItY3JlYXRlIiwKICAgICAgICAgICAgImVudGl0eSI6IGVudGl0eSwK + ICAgICAgICAgICAgImNhcHMiOiBbY2FwIGZvciBjYXBfbGlzdCBpbiBsaXN0KGNhcHMuaXRlbXMo + KSkgZm9yIGNhcCBpbiBjYXBfbGlzdF0sCiAgICAgICAgICAgICJmb3JtYXQiOiAianNvbiIsCiAg + ICAgICAgfQoKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLmRyeV9ydW46CiAgICAgICAgICAg + IHJldHVybiBzZWxmLmRyeV9ydW4oCiAgICAgICAgICAgICAgICAiY2VwaCAiCiAgICAgICAgICAg + ICAgICArIGNtZF9qc29uWyJwcmVmaXgiXQogICAgICAgICAgICAgICAgKyAiICIKICAgICAgICAg + ICAgICAgICsgY21kX2pzb25bImVudGl0eSJdCiAgICAgICAgICAgICAgICArICIgIgogICAgICAg + ICAgICAgICAgKyAiICIuam9pbihjbWRfanNvblsiY2FwcyJdKQogICAgICAgICAgICApCiAgICAg + ICAgIyBjaGVjayBpZiB1c2VyIGFscmVhZHkgZXhpc3QKICAgICAgICB1c2VyX2tleSA9IHNlbGYu + Y2hlY2tfdXNlcl9leGlzdChlbnRpdHkpCiAgICAgICAgaWYgdXNlcl9rZXkgIT0gIiI6CiAgICAg + ICAgICAgIHJldHVybiB1c2VyX2tleQoKICAgICAgICByZXRfdmFsLCBqc29uX291dCwgZXJyX21z + ZyA9IHNlbGYuX2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pzb24pCiAgICAgICAgIyBpZiB0aGVy + ZSBpcyBhbiB1bnN1Y2Nlc3NmdWwgYXR0ZW1wdCwKICAgICAgICBpZiByZXRfdmFsICE9IDAgb3Ig + bGVuKGpzb25fb3V0KSA9PSAwOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhj + ZXB0aW9uKAogICAgICAgICAgICAgICAgZiInYXV0aCBnZXQtb3ItY3JlYXRlIHtzZWxmLnJ1bl9h + c191c2VyfScgY29tbWFuZCBmYWlsZWRcbiIKICAgICAgICAgICAgICAgIGYiRXJyb3I6IHtlcnJf + bXNnIGlmIHJldF92YWwgIT0gMCBlbHNlIHNlbGYuRU1QVFlfT1VUUFVUX0xJU1R9IgogICAgICAg + ICAgICApCiAgICAgICAgcmV0dXJuIHN0cihqc29uX291dFswXVsia2V5Il0pCgogICAgZGVmIGdl + dF9jZXBoX2Rhc2hib2FyZF9saW5rKHNlbGYpOgogICAgICAgIGNtZF9qc29uID0geyJwcmVmaXgi + OiAibWdyIHNlcnZpY2VzIiwgImZvcm1hdCI6ICJqc29uIn0KICAgICAgICBpZiBzZWxmLl9hcmdf + cGFyc2VyLmRyeV9ydW46CiAgICAgICAgICAgIHJldHVybiBzZWxmLmRyeV9ydW4oImNlcGggIiAr + IGNtZF9qc29uWyJwcmVmaXgiXSkKICAgICAgICByZXRfdmFsLCBqc29uX291dCwgXyA9IHNlbGYu + X2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pzb24pCiAgICAgICAgIyBpZiB0aGVyZSBpcyBhbiB1 + bnN1Y2Nlc3NmdWwgYXR0ZW1wdCwKICAgICAgICBpZiByZXRfdmFsICE9IDAgb3IgbGVuKGpzb25f + b3V0KSA9PSAwOgogICAgICAgICAgICByZXR1cm4gTm9uZQogICAgICAgIGlmICJkYXNoYm9hcmQi + IG5vdCBpbiBqc29uX291dDoKICAgICAgICAgICAgcmV0dXJuIE5vbmUKICAgICAgICByZXR1cm4g + anNvbl9vdXRbImRhc2hib2FyZCJdCgogICAgZGVmIGNyZWF0ZV9yZ3dfYWRtaW5fb3BzX3VzZXIo + c2VsZik6CiAgICAgICAgY21kID0gWwogICAgICAgICAgICAicmFkb3Nndy1hZG1pbiIsCiAgICAg + ICAgICAgICJ1c2VyIiwKICAgICAgICAgICAgImNyZWF0ZSIsCiAgICAgICAgICAgICItLXVpZCIs + CiAgICAgICAgICAgIHNlbGYuRVhURVJOQUxfUkdXX0FETUlOX09QU19VU0VSX05BTUUsCiAgICAg + ICAgICAgICItLWRpc3BsYXktbmFtZSIsCiAgICAgICAgICAgICJSb29rIFJHVyBBZG1pbiBPcHMg + dXNlciIsCiAgICAgICAgICAgICItLWNhcHMiLAogICAgICAgICAgICAiYnVja2V0cz0qO3VzZXJz + PSo7dXNhZ2U9cmVhZDttZXRhZGF0YT1yZWFkO3pvbmU9cmVhZCIsCiAgICAgICAgICAgICItLXJn + dy1yZWFsbSIsCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3JlYWxtX25hbWUsCiAg + ICAgICAgICAgICItLXJndy16b25lZ3JvdXAiLAogICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2Vy + LnJnd196b25lZ3JvdXBfbmFtZSwKICAgICAgICAgICAgIi0tcmd3LXpvbmUiLAogICAgICAgICAg + ICBzZWxmLl9hcmdfcGFyc2VyLnJnd196b25lX25hbWUsCiAgICAgICAgXQogICAgICAgIGlmIHNl + bGYuX2FyZ19wYXJzZXIuZHJ5X3J1bjoKICAgICAgICAgICAgcmV0dXJuIHNlbGYuZHJ5X3J1bigi + Y2VwaCAiICsgIiAiLmpvaW4oY21kKSkKICAgICAgICB0cnk6CiAgICAgICAgICAgIG91dHB1dCA9 + IHN1YnByb2Nlc3MuY2hlY2tfb3V0cHV0KGNtZCwgc3RkZXJyPXN1YnByb2Nlc3MuUElQRSkKICAg + ICAgICBleGNlcHQgc3VicHJvY2Vzcy5DYWxsZWRQcm9jZXNzRXJyb3IgYXMgZXhlY0VycjoKICAg + ICAgICAgICAgIyBpZiB0aGUgdXNlciBhbHJlYWR5IGV4aXN0cywgd2UganVzdCBxdWVyeSBpdAog + ICAgICAgICAgICBpZiBleGVjRXJyLnJldHVybmNvZGUgPT0gZXJybm8uRUVYSVNUOgogICAgICAg + ICAgICAgICAgY21kID0gWwogICAgICAgICAgICAgICAgICAgICJyYWRvc2d3LWFkbWluIiwKICAg + ICAgICAgICAgICAgICAgICAidXNlciIsCiAgICAgICAgICAgICAgICAgICAgImluZm8iLAogICAg + ICAgICAgICAgICAgICAgICItLXVpZCIsCiAgICAgICAgICAgICAgICAgICAgc2VsZi5FWFRFUk5B + TF9SR1dfQURNSU5fT1BTX1VTRVJfTkFNRSwKICAgICAgICAgICAgICAgICAgICAiLS1yZ3ctcmVh + bG0iLAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3JlYWxtX25hbWUs + CiAgICAgICAgICAgICAgICAgICAgIi0tcmd3LXpvbmVncm91cCIsCiAgICAgICAgICAgICAgICAg + ICAgc2VsZi5fYXJnX3BhcnNlci5yZ3dfem9uZWdyb3VwX25hbWUsCiAgICAgICAgICAgICAgICAg + ICAgIi0tcmd3LXpvbmUiLAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3 + X3pvbmVfbmFtZSwKICAgICAgICAgICAgICAgIF0KICAgICAgICAgICAgICAgIHRyeToKICAgICAg + ICAgICAgICAgICAgICBvdXRwdXQgPSBzdWJwcm9jZXNzLmNoZWNrX291dHB1dChjbWQsIHN0ZGVy + cj1zdWJwcm9jZXNzLlBJUEUpCiAgICAgICAgICAgICAgICBleGNlcHQgc3VicHJvY2Vzcy5DYWxs + ZWRQcm9jZXNzRXJyb3IgYXMgZXhlY0VycjoKICAgICAgICAgICAgICAgICAgICBlcnJfbXNnID0g + KAogICAgICAgICAgICAgICAgICAgICAgICBmImZhaWxlZCB0byBleGVjdXRlIGNvbW1hbmQge2Nt + ZH0uIE91dHB1dDoge2V4ZWNFcnIub3V0cHV0fS4gIgogICAgICAgICAgICAgICAgICAgICAgICBm + IkNvZGU6IHtleGVjRXJyLnJldHVybmNvZGV9LiBFcnJvcjoge2V4ZWNFcnIuc3RkZXJyfSIKICAg + ICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZShl + cnJfbXNnKQogICAgICAgICAgICAgICAgICAgIHJldHVybiBOb25lLCBOb25lLCBGYWxzZSwgIi0x + IgogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgZXJyX21zZyA9ICgKICAgICAgICAg + ICAgICAgICAgICBmImZhaWxlZCB0byBleGVjdXRlIGNvbW1hbmQge2NtZH0uIE91dHB1dDoge2V4 + ZWNFcnIub3V0cHV0fS4gIgogICAgICAgICAgICAgICAgICAgIGYiQ29kZToge2V4ZWNFcnIucmV0 + dXJuY29kZX0uIEVycm9yOiB7ZXhlY0Vyci5zdGRlcnJ9IgogICAgICAgICAgICAgICAgKQogICAg + ICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZShlcnJfbXNnKQogICAgICAgICAgICAgICAgcmV0 + dXJuIE5vbmUsIE5vbmUsIEZhbHNlLCAiLTEiCgogICAgICAgICMgc2VwYXJhdGVseSBhZGQgaW5m + bz1yZWFkIGNhcHMgZm9yIHJndy1lbmRwb2ludCBpcCB2YWxpZGF0aW9uCiAgICAgICAgaW5mb19j + YXBfc3VwcG9ydGVkID0gVHJ1ZQogICAgICAgIGNtZCA9IFsKICAgICAgICAgICAgInJhZG9zZ3ct + YWRtaW4iLAogICAgICAgICAgICAiY2FwcyIsCiAgICAgICAgICAgICJhZGQiLAogICAgICAgICAg + ICAiLS11aWQiLAogICAgICAgICAgICBzZWxmLkVYVEVSTkFMX1JHV19BRE1JTl9PUFNfVVNFUl9O + QU1FLAogICAgICAgICAgICAiLS1jYXBzIiwKICAgICAgICAgICAgImluZm89cmVhZCIsCiAgICAg + ICAgICAgICItLXJndy1yZWFsbSIsCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3Jl + YWxtX25hbWUsCiAgICAgICAgICAgICItLXJndy16b25lZ3JvdXAiLAogICAgICAgICAgICBzZWxm + Ll9hcmdfcGFyc2VyLnJnd196b25lZ3JvdXBfbmFtZSwKICAgICAgICAgICAgIi0tcmd3LXpvbmUi + LAogICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnJnd196b25lX25hbWUsCiAgICAgICAgXQog + ICAgICAgIHRyeToKICAgICAgICAgICAgb3V0cHV0ID0gc3VicHJvY2Vzcy5jaGVja19vdXRwdXQo + Y21kLCBzdGRlcnI9c3VicHJvY2Vzcy5QSVBFKQogICAgICAgIGV4Y2VwdCBzdWJwcm9jZXNzLkNh + bGxlZFByb2Nlc3NFcnJvciBhcyBleGVjRXJyOgogICAgICAgICAgICAjIGlmIHRoZSBjZXBoIHZl + cnNpb24gbm90IHN1cHBvcnRlZCBmb3IgYWRkaW5nIGBpbmZvPXJlYWRgIGNhcChyZ3dfdmFsaWRh + dGlvbikKICAgICAgICAgICAgaWYgKAogICAgICAgICAgICAgICAgImNvdWxkIG5vdCBhZGQgY2Fw + czogdW5hYmxlIHRvIGFkZCBjYXBzOiBpbmZvPXJlYWRcbiIKICAgICAgICAgICAgICAgIGluIGV4 + ZWNFcnIuc3RkZXJyLmRlY29kZSgidXRmLTgiKQogICAgICAgICAgICAgICAgYW5kIGV4ZWNFcnIu + cmV0dXJuY29kZSA9PSAyNDQKICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgIGluZm9fY2Fw + X3N1cHBvcnRlZCA9IEZhbHNlCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBlcnJf + bXNnID0gKAogICAgICAgICAgICAgICAgICAgIGYiZmFpbGVkIHRvIGV4ZWN1dGUgY29tbWFuZCB7 + Y21kfS4gT3V0cHV0OiB7ZXhlY0Vyci5vdXRwdXR9LiAiCiAgICAgICAgICAgICAgICAgICAgZiJD + b2RlOiB7ZXhlY0Vyci5yZXR1cm5jb2RlfS4gRXJyb3I6IHtleGVjRXJyLnN0ZGVycn0iCiAgICAg + ICAgICAgICAgICApCiAgICAgICAgICAgICAgICBzeXMuc3RkZXJyLndyaXRlKGVycl9tc2cpCiAg + ICAgICAgICAgICAgICByZXR1cm4gTm9uZSwgTm9uZSwgRmFsc2UsICItMSIKCiAgICAgICAganNv + bm91dHB1dCA9IGpzb24ubG9hZHMob3V0cHV0KQogICAgICAgIHJldHVybiAoCiAgICAgICAgICAg + IGpzb25vdXRwdXRbImtleXMiXVswXVsiYWNjZXNzX2tleSJdLAogICAgICAgICAgICBqc29ub3V0 + cHV0WyJrZXlzIl1bMF1bInNlY3JldF9rZXkiXSwKICAgICAgICAgICAgaW5mb19jYXBfc3VwcG9y + dGVkLAogICAgICAgICAgICAiIiwKICAgICAgICApCgogICAgZGVmIHZhbGlkYXRlX3JiZF9wb29s + KHNlbGYsIHBvb2xfbmFtZSk6CiAgICAgICAgaWYgbm90IHNlbGYuY2x1c3Rlci5wb29sX2V4aXN0 + cyhwb29sX25hbWUpOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9u + KAogICAgICAgICAgICAgICAgZiJUaGUgcHJvdmlkZWQgcG9vbCwgJ3twb29sX25hbWV9JywgZG9l + cyBub3QgZXhpc3QiCiAgICAgICAgICAgICkKCiAgICBkZWYgaW5pdF9yYmRfcG9vbChzZWxmLCBy + YmRfcG9vbF9uYW1lKToKICAgICAgICBpZiBpc2luc3RhbmNlKHNlbGYuY2x1c3RlciwgRHVtbXlS + YWRvcyk6CiAgICAgICAgICAgIHJldHVybgogICAgICAgIGlvY3R4ID0gc2VsZi5jbHVzdGVyLm9w + ZW5faW9jdHgocmJkX3Bvb2xfbmFtZSkKICAgICAgICByYmRfaW5zdCA9IHJiZC5SQkQoKQogICAg + ICAgIHJiZF9pbnN0LnBvb2xfaW5pdChpb2N0eCwgVHJ1ZSkKCiAgICBkZWYgdmFsaWRhdGVfcmFk + b3NfbmFtZXNwYWNlKHNlbGYpOgogICAgICAgIHJiZF9wb29sX25hbWUgPSBzZWxmLl9hcmdfcGFy + c2VyLnJiZF9kYXRhX3Bvb2xfbmFtZQogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIucmJkX21l + dGFkYXRhX2VjX3Bvb2xfbmFtZToKICAgICAgICAgICAgcmJkX3Bvb2xfbmFtZSA9IHNlbGYuX2Fy + Z19wYXJzZXIucmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZQogICAgICAgIHJhZG9zX25hbWVzcGFj + ZSA9IHNlbGYuX2FyZ19wYXJzZXIucmFkb3NfbmFtZXNwYWNlCiAgICAgICAgaWYgcmFkb3NfbmFt + ZXNwYWNlID09ICIiOgogICAgICAgICAgICByZXR1cm4KICAgICAgICBpZiByYWRvc19uYW1lc3Bh + Y2UuaXNsb3dlcigpID09IEZhbHNlOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJl + RXhjZXB0aW9uKAogICAgICAgICAgICAgICAgZiJUaGUgcHJvdmlkZWQgcmFkb3MgTmFtZXNwYWNl + LCAne3JhZG9zX25hbWVzcGFjZX0nLCAiCiAgICAgICAgICAgICAgICBmImNvbnRhaW5zIHVwcGVy + IGNhc2UiCiAgICAgICAgICAgICkKICAgICAgICByYmRfaW5zdCA9IHJiZC5SQkQoKQogICAgICAg + IGlvY3R4ID0gc2VsZi5jbHVzdGVyLm9wZW5faW9jdHgocmJkX3Bvb2xfbmFtZSkKICAgICAgICBp + ZiByYmRfaW5zdC5uYW1lc3BhY2VfZXhpc3RzKGlvY3R4LCByYWRvc19uYW1lc3BhY2UpIGlzIEZh + bHNlOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAg + ICAgICAgICAgZiJUaGUgcHJvdmlkZWQgcmFkb3MgTmFtZXNwYWNlLCAne3JhZG9zX25hbWVzcGFj + ZX0nLCAiCiAgICAgICAgICAgICAgICBmImlzIG5vdCBmb3VuZCBpbiB0aGUgcG9vbCAne3JiZF9w + b29sX25hbWV9JyIKICAgICAgICAgICAgKQoKICAgIGRlZiBnZXRfb3JfY3JlYXRlX3N1YnZvbHVt + ZV9ncm91cChzZWxmLCBzdWJ2b2x1bWVfZ3JvdXAsIGNlcGhmc19maWxlc3lzdGVtX25hbWUpOgog + ICAgICAgIGNtZCA9IFsKICAgICAgICAgICAgImNlcGgiLAogICAgICAgICAgICAiZnMiLAogICAg + ICAgICAgICAic3Vidm9sdW1lZ3JvdXAiLAogICAgICAgICAgICAiZ2V0cGF0aCIsCiAgICAgICAg + ICAgIGNlcGhmc19maWxlc3lzdGVtX25hbWUsCiAgICAgICAgICAgIHN1YnZvbHVtZV9ncm91cCwK + ICAgICAgICBdCiAgICAgICAgdHJ5OgogICAgICAgICAgICBfID0gc3VicHJvY2Vzcy5jaGVja19v + dXRwdXQoY21kLCBzdGRlcnI9c3VicHJvY2Vzcy5QSVBFKQogICAgICAgIGV4Y2VwdCBzdWJwcm9j + ZXNzLkNhbGxlZFByb2Nlc3NFcnJvcjoKICAgICAgICAgICAgY21kID0gWwogICAgICAgICAgICAg + ICAgImNlcGgiLAogICAgICAgICAgICAgICAgImZzIiwKICAgICAgICAgICAgICAgICJzdWJ2b2x1 + bWVncm91cCIsCiAgICAgICAgICAgICAgICAiY3JlYXRlIiwKICAgICAgICAgICAgICAgIGNlcGhm + c19maWxlc3lzdGVtX25hbWUsCiAgICAgICAgICAgICAgICBzdWJ2b2x1bWVfZ3JvdXAsCiAgICAg + ICAgICAgIF0KICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgXyA9IHN1YnByb2Nlc3Mu + Y2hlY2tfb3V0cHV0KGNtZCwgc3RkZXJyPXN1YnByb2Nlc3MuUElQRSkKICAgICAgICAgICAgZXhj + ZXB0IHN1YnByb2Nlc3MuQ2FsbGVkUHJvY2Vzc0Vycm9yOgogICAgICAgICAgICAgICAgcmFpc2Ug + RXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICBmInN1YnZvbHVt + ZSBncm91cCB7c3Vidm9sdW1lX2dyb3VwfSBpcyBub3QgYWJsZSB0byBnZXQgY3JlYXRlZCIKICAg + ICAgICAgICAgICAgICkKCiAgICBkZWYgcGluX3N1YnZvbHVtZSgKICAgICAgICBzZWxmLCBzdWJ2 + b2x1bWVfZ3JvdXAsIGNlcGhmc19maWxlc3lzdGVtX25hbWUsIHBpbl90eXBlLCBwaW5fc2V0dGlu + ZwogICAgKToKICAgICAgICBjbWQgPSBbCiAgICAgICAgICAgICJjZXBoIiwKICAgICAgICAgICAg + ImZzIiwKICAgICAgICAgICAgInN1YnZvbHVtZWdyb3VwIiwKICAgICAgICAgICAgInBpbiIsCiAg + ICAgICAgICAgIGNlcGhmc19maWxlc3lzdGVtX25hbWUsCiAgICAgICAgICAgIHN1YnZvbHVtZV9n + cm91cCwKICAgICAgICAgICAgcGluX3R5cGUsCiAgICAgICAgICAgIHBpbl9zZXR0aW5nLAogICAg + ICAgIF0KICAgICAgICB0cnk6CiAgICAgICAgICAgIF8gPSBzdWJwcm9jZXNzLmNoZWNrX291dHB1 + dChjbWQsIHN0ZGVycj1zdWJwcm9jZXNzLlBJUEUpCiAgICAgICAgZXhjZXB0IHN1YnByb2Nlc3Mu + Q2FsbGVkUHJvY2Vzc0Vycm9yOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhj + ZXB0aW9uKAogICAgICAgICAgICAgICAgZiJzdWJ2b2x1bWUgZ3JvdXAge3N1YnZvbHVtZV9ncm91 + cH0gaXMgbm90IGFibGUgdG8gZ2V0IHBpbm5lZCIKICAgICAgICAgICAgKQoKICAgIGRlZiBnZXRf + cmd3X2ZzaWQoc2VsZiwgYmFzZV91cmwsIHZlcmlmeSk6CiAgICAgICAgYWNjZXNzX2tleSA9IHNl + bGYub3V0X21hcFsiUkdXX0FETUlOX09QU19VU0VSX0FDQ0VTU19LRVkiXQogICAgICAgIHNlY3Jl + dF9rZXkgPSBzZWxmLm91dF9tYXBbIlJHV19BRE1JTl9PUFNfVVNFUl9TRUNSRVRfS0VZIl0KICAg + ICAgICByZ3dfZW5kcG9pbnQgPSBzZWxmLl9hcmdfcGFyc2VyLnJnd19lbmRwb2ludAogICAgICAg + IGJhc2VfdXJsID0gYmFzZV91cmwgKyAiOi8vIiArIHJnd19lbmRwb2ludCArICIvYWRtaW4vaW5m + bz8iCiAgICAgICAgcGFyYW1zID0geyJmb3JtYXQiOiAianNvbiJ9CiAgICAgICAgcmVxdWVzdF91 + cmwgPSBiYXNlX3VybCArIHVybGVuY29kZShwYXJhbXMpCgogICAgICAgIHRyeToKICAgICAgICAg + ICAgciA9IHJlcXVlc3RzLmdldCgKICAgICAgICAgICAgICAgIHJlcXVlc3RfdXJsLAogICAgICAg + ICAgICAgICAgYXV0aD1TM0F1dGgoYWNjZXNzX2tleSwgc2VjcmV0X2tleSwgcmd3X2VuZHBvaW50 + KSwKICAgICAgICAgICAgICAgIHZlcmlmeT12ZXJpZnksCiAgICAgICAgICAgICkKICAgICAgICBl + eGNlcHQgcmVxdWVzdHMuZXhjZXB0aW9ucy5UaW1lb3V0OgogICAgICAgICAgICBzeXMuc3RkZXJy + LndyaXRlKAogICAgICAgICAgICAgICAgZiJpbnZhbGlkIGVuZHBvaW50Oiwgbm90IGFibGUgdG8g + Y2FsbCBhZG1pbi1vcHMgYXBpe3Jnd19lbmRwb2ludH0iCiAgICAgICAgICAgICkKICAgICAgICAg + ICAgcmV0dXJuICIiLCAiLTEiCiAgICAgICAgcjEgPSByLmpzb24oKQogICAgICAgIGlmIHIxIGlz + IE5vbmUgb3IgcjEuZ2V0KCJpbmZvIikgaXMgTm9uZToKICAgICAgICAgICAgc3lzLnN0ZGVyci53 + cml0ZSgKICAgICAgICAgICAgICAgIGYiVGhlIHByb3ZpZGVkIHJndyBFbmRwb2ludCwgJ3tzZWxm + Ll9hcmdfcGFyc2VyLnJnd19lbmRwb2ludH0nLCBpcyBpbnZhbGlkLiIKICAgICAgICAgICAgKQog + ICAgICAgICAgICByZXR1cm4gKAogICAgICAgICAgICAgICAgIiIsCiAgICAgICAgICAgICAgICAi + LTEiLAogICAgICAgICAgICApCgogICAgICAgIHJldHVybiByMVsiaW5mbyJdWyJzdG9yYWdlX2Jh + Y2tlbmRzIl1bMF1bImNsdXN0ZXJfaWQiXSwgIiIKCiAgICBkZWYgdmFsaWRhdGVfcmd3X2VuZHBv + aW50KHNlbGYsIGluZm9fY2FwX3N1cHBvcnRlZCk6CiAgICAgICAgIyBpZiB0aGUgJ2NsdXN0ZXIn + IGluc3RhbmNlIGlzIGEgZHVtbXkgb25lLAogICAgICAgICMgZG9uJ3QgdHJ5IHRvIHJlYWNoIG91 + dCB0byB0aGUgZW5kcG9pbnQKICAgICAgICBpZiBpc2luc3RhbmNlKHNlbGYuY2x1c3RlciwgRHVt + bXlSYWRvcyk6CiAgICAgICAgICAgIHJldHVybgoKICAgICAgICByZ3dfZW5kcG9pbnQgPSBzZWxm + Ll9hcmdfcGFyc2VyLnJnd19lbmRwb2ludAoKICAgICAgICAjIHZhbGlkYXRlIHJndyBlbmRwb2lu + dCBvbmx5IGlmIGlwIGFkZHJlc3MgaXMgcGFzc2VkCiAgICAgICAgaXBfdHlwZSA9IHNlbGYuX2lu + dmFsaWRfZW5kcG9pbnQocmd3X2VuZHBvaW50KQoKICAgICAgICAjIGNoZWNrIGlmIHRoZSByZ3cg + ZW5kcG9pbnQgaXMgcmVhY2hhYmxlCiAgICAgICAgY2VydCA9IE5vbmUKICAgICAgICBpZiBub3Qg + c2VsZi5fYXJnX3BhcnNlci5yZ3dfc2tpcF90bHMgYW5kIHNlbGYudmFsaWRhdGVfcmd3X2VuZHBv + aW50X3Rsc19jZXJ0KCk6CiAgICAgICAgICAgIGNlcnQgPSBzZWxmLl9hcmdfcGFyc2VyLnJnd190 + bHNfY2VydF9wYXRoCiAgICAgICAgYmFzZV91cmwsIHZlcmlmeSwgZXJyID0gc2VsZi5lbmRwb2lu + dF9kaWFsKHJnd19lbmRwb2ludCwgaXBfdHlwZSwgY2VydD1jZXJ0KQogICAgICAgIGlmIGVyciAh + PSAiIjoKICAgICAgICAgICAgcmV0dXJuICItMSIKCiAgICAgICAgIyBjaGVjayBpZiB0aGUgcmd3 + IGVuZHBvaW50IGJlbG9uZ3MgdG8gdGhlIHNhbWUgY2x1c3RlcgogICAgICAgICMgb25seSBjaGVj + ayBpZiBgaW5mb2AgY2FwIGlzIHN1cHBvcnRlZAogICAgICAgIGlmIGluZm9fY2FwX3N1cHBvcnRl + ZDoKICAgICAgICAgICAgZnNpZCA9IHNlbGYuZ2V0X2ZzaWQoKQogICAgICAgICAgICByZ3dfZnNp + ZCwgZXJyID0gc2VsZi5nZXRfcmd3X2ZzaWQoYmFzZV91cmwsIHZlcmlmeSkKICAgICAgICAgICAg + aWYgZXJyID09ICItMSI6CiAgICAgICAgICAgICAgICByZXR1cm4gIi0xIgogICAgICAgICAgICBp + ZiBmc2lkICE9IHJnd19mc2lkOgogICAgICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZSgKICAg + ICAgICAgICAgICAgICAgICBmIlRoZSBwcm92aWRlZ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gaW4gcmd3X3Bvb2xzX3RvX3Zh + bGlkYXRlOgogICAgICAgICAgICAgICAgaWYgbm90IHNlbGYuY2x1c3Rlci5wb29sX2V4aXN0cyhf + cmd3X3Bvb2xfdG9fdmFsaWRhdGUpOgogICAgICAgICAgICAgICAgICAgIHN5cy5zdGRlcnIud3Jp + dGUoCiAgICAgICAgICAgICAgICAgICAgICAgIGYiVGhlIHByb3ZpZGVkIHBvb2wsICd7X3Jnd19w + b29sX3RvX3ZhbGlkYXRlfScsIGRvZXMgbm90IGV4aXN0IgogICAgICAgICAgICAgICAgICAgICkK + ICAgICAgICAgICAgICAgICAgICByZXR1cm4gIi0xIgoKICAgICAgICByZXR1cm4gIiIKCiAgICBk + ZWYgdmFsaWRhdGVfcmd3X211bHRpc2l0ZShzZWxmLCByZ3dfbXVsdGlzaXRlX2NvbmZpZ19uYW1l + LCByZ3dfbXVsdGlzaXRlX2NvbmZpZyk6CiAgICAgICAgaWYgcmd3X211bHRpc2l0ZV9jb25maWcg + IT0gIiI6CiAgICAgICAgICAgIGNtZCA9IFsKICAgICAgICAgICAgICAgICJyYWRvc2d3LWFkbWlu + IiwKICAgICAgICAgICAgICAgIHJnd19tdWx0aXNpdGVfY29uZmlnLAogICAgICAgICAgICAgICAg + ImdldCIsCiAgICAgICAgICAgICAgICAiLS1yZ3ctIiArIHJnd19tdWx0aXNpdGVfY29uZmlnLAog + ICAgICAgICAgICAgICAgcmd3X211bHRpc2l0ZV9jb25maWdfbmFtZSwKICAgICAgICAgICAgXQog + ICAgICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICBfID0gc3VicHJvY2Vzcy5jaGVja19vdXRw + dXQoY21kLCBzdGRlcnI9c3VicHJvY2Vzcy5QSVBFKQogICAgICAgICAgICBleGNlcHQgc3VicHJv + Y2Vzcy5DYWxsZWRQcm9jZXNzRXJyb3IgYXMgZXhlY0VycjoKICAgICAgICAgICAgICAgIGVycl9t + c2cgPSAoCiAgICAgICAgICAgICAgICAgICAgZiJmYWlsZWQgdG8gZXhlY3V0ZSBjb21tYW5kIHtj + bWR9LiBPdXRwdXQ6IHtleGVjRXJyLm91dHB1dH0uICIKICAgICAgICAgICAgICAgICAgICBmIkNv + ZGU6IHtleGVjRXJyLnJldHVybmNvZGV9LiBFcnJvcjoge2V4ZWNFcnIuc3RkZXJyfSIKICAgICAg + ICAgICAgICAgICkKICAgICAgICAgICAgICAgIHN5cy5zdGRlcnIud3JpdGUoZXJyX21zZykKICAg + ICAgICAgICAgICAgIHJldHVybiAiLTEiCiAgICAgICAgcmV0dXJuICIiCgogICAgZGVmIGNvbnZl + cnRfY29tbWFfc2VwYXJhdGVkX3RvX2FycmF5KHNlbGYsIHZhbHVlKToKICAgICAgICByZXR1cm4g + dmFsdWUuc3BsaXQoIiwiKQoKICAgIGRlZiByYWlzZV9leGNlcHRpb25faWZfYW55X3RvcG9sb2d5 + X2ZsYWdfaXNfbWlzc2luZyhzZWxmKToKICAgICAgICBpZiAoCiAgICAgICAgICAgICgKICAgICAg + ICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIudG9wb2xvZ3lfcG9vbHMgIT0gIiIKICAgICAgICAg + ICAgICAgIGFuZCAoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci50b3BvbG9n + eV9mYWlsdXJlX2RvbWFpbl9sYWJlbCA9PSAiIgogICAgICAgICAgICAgICAgICAgIG9yIHNlbGYu + X2FyZ19wYXJzZXIudG9wb2xvZ3lfZmFpbHVyZV9kb21haW5fdmFsdWVzID09ICIiCiAgICAgICAg + ICAgICAgICApCiAgICAgICAgICAgICkKICAgICAgICAgICAgb3IgKAogICAgICAgICAgICAgICAg + c2VsZi5fYXJnX3BhcnNlci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl9sYWJlbCAhPSAiIgogICAg + ICAgICAgICAgICAgYW5kICgKICAgICAgICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnRv + cG9sb2d5X3Bvb2xzID09ICIiCiAgICAgICAgICAgICAgICAgICAgb3Igc2VsZi5fYXJnX3BhcnNl + ci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl92YWx1ZXMgPT0gIiIKICAgICAgICAgICAgICAgICkK + ICAgICAgICAgICAgKQogICAgICAgICAgICBvciAoCiAgICAgICAgICAgICAgICBzZWxmLl9hcmdf + cGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX3ZhbHVlcyAhPSAiIgogICAgICAgICAgICAg + ICAgYW5kICgKICAgICAgICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X3Bv + b2xzID09ICIiCiAgICAgICAgICAgICAgICAgICAgb3Igc2VsZi5fYXJnX3BhcnNlci50b3BvbG9n + eV9mYWlsdXJlX2RvbWFpbl9sYWJlbCA9PSAiIgogICAgICAgICAgICAgICAgKQogICAgICAgICAg + ICApCiAgICAgICAgKToKICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlv + bigKICAgICAgICAgICAgICAgICJwcm92aWRlIGFsbCB0aGUgdG9wb2xvZ3kgZmxhZ3MgLS10b3Bv + bG9neS1wb29scywgLS10b3BvbG9neS1mYWlsdXJlLWRvbWFpbi1sYWJlbCwgLS10b3BvbG9neS1m + YWlsdXJlLWRvbWFpbi12YWx1ZXMiCiAgICAgICAgICAgICkKCiAgICBkZWYgdmFsaWRhdGVfdG9w + b2xvZ3lfdmFsdWVzKHNlbGYsIHRvcG9sb2d5X3Bvb2xzLCB0b3BvbG9neV9mZCk6CiAgICAgICAg + aWYgbGVuKHRvcG9sb2d5X3Bvb2xzKSAhPSBsZW4odG9wb2xvZ3lfZmQpOgogICAgICAgICAgICBy + YWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgZiJUaGUgcHJv + dmlkZWQgdG9wb2xvZ3kgcG9vbHMsICd7dG9wb2xvZ3lfcG9vbHN9JywgYW5kICIKICAgICAgICA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u + X2FyZ19wYXJzZXIsIGFyZykpOgogICAgICAgICAgICAgICAgIyBweXRob24gdHJlYXRzIGZsYWct + bmFtZSBhcyBmbGFnX25hbWUgaW50ZXJuYWxseSwgc28gY29udmVydGluZyBiYWNrIHRvIGZsYWct + bmFtZSwKICAgICAgICAgICAgICAgICMgc28gd2UgY2FuIGdldCB0aG9zZSB2YWx1ZXMgZnJvbSBj + b25maWcgZmlsZQogICAgICAgICAgICAgICAgYXJnVmFsdWUgPSBhcmcucmVwbGFjZSgiXyIsICIt + IikKICAgICAgICAgICAgICAgICMgZG8gbm90IGFkZCB0aGUgY29uZmlnLWZpbGUgZmxhZyBhbmQg + YWxzbyBub3QgYWRkIHRoZSBib29sZWFuIGZsYWdzIHdoaWNoIGFyZSBzZXQgdG8gRmFsc2UKICAg + ICAgICAgICAgICAgICMgYmVjYXVzZSBjb25maWcuaW5pIGZpbGUgdHJlYXRzIGJvb2xlYW4gZmxh + Z3MgYXMgVHJ1ZSBhbHdheXMKICAgICAgICAgICAgICAgIGlmICgKICAgICAgICAgICAgICAgICAg + ICBhcmdWYWx1ZSAhPSAiY29uZmlnLWZpbGUiCiAgICAgICAgICAgICAgICAgICAgYW5kIGdldGF0 + dHIoc2VsZi5fYXJnX3BhcnNlciwgYXJnKSAhPSBGYWxzZQogICAgICAgICAgICAgICAgKToKICAg + ICAgICAgICAgICAgICAgICBhcmd1bWVudCArPSBmInthcmdWYWx1ZX0gPSB7c3RyKGdldGF0dHIo + c2VsZi5fYXJnX3BhcnNlciwgYXJnKSl9XG4iCiAgICAgICAgcmV0dXJuIGFyZ3VtZW50CgogICAg + ZGVmIF9nZW5fb3V0cHV0X21hcChzZWxmKToKICAgICAgICBpZiBzZWxmLm91dF9tYXA6CiAgICAg + ICAgICAgIHJldHVybgogICAgICAgICMgc3VwcG9ydCBsZWdhY3kgZmxhZyB3aXRoIHVwZ3JhZGVz + CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5jbHVzdGVyX25hbWU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xVTUVfR1JPVVAiXToKICAgICAgICAgICAgICAgIHNlbGYuZ2V0X29yX2Ny + ZWF0ZV9zdWJ2b2x1bWVfZ3JvdXAoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNl + ci5zdWJ2b2x1bWVfZ3JvdXAsCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5j + ZXBoZnNfZmlsZXN5c3RlbV9uYW1lLAogICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAg + c2VsZi5waW5fc3Vidm9sdW1lKAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIu + c3Vidm9sdW1lX2dyb3VwLAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIuY2Vw + aGZzX2ZpbGVzeXN0ZW1fbmFtZSwKICAgICAgICAgICAgICAgICAgICAiZGlzdHJpYnV0ZWQiLAog + ICAgICAgICAgICAgICAgICAgICIxIiwKICAgICAgICAgICAgICAgICkKICAgICAgICBzZWxmLm91 + dF9tYXBbIlJHV19UTFNfQ0VSVCJdID0gIiIKICAgICAgICBzZWxmLm91dF9tYXBbIk1PTklUT1JJ + TkdfRU5EUE9JTlQiXSA9ICIiCiAgICAgICAgc2VsZi5vdXRfbWFwWyJNT05JVE9SSU5HX0VORFBP + SU5UX1BPUlQiXSA9ICIiCiAgICAgICAgaWYgbm90IHNlbGYuX2FyZ19wYXJzZXIuc2tpcF9tb25p + dG9yaW5nX2VuZHBvaW50OgogICAgICAgICAgICAoCiAgICAgICAgICAgICAgICBzZWxmLm91dF9t + YXBbIk1PTklUT1JJTkdfRU5EUE9JTlQiXSwKICAgICAgICAgICAgICAgIHNlbGYub3V0X21hcFsi + TU9OSVRPUklOR19FTkRQT0lOVF9QT1JUIl0sCiAgICAgICAgICAgICkgPSBzZWxmLmdldF9hY3Rp + dmVfYW5kX3N0YW5kYnlfbWdycygpCiAgICAgICAgc2VsZi5vdXRfbWFwWyJSQkRfUE9PTF9OQU1F + Il0gPSBzZWxmLl9hcmdfcGFyc2VyLnJiZF9kYXRhX3Bvb2xfbmFtZQogICAgICAgIHNlbGYub3V0 + X21hcFsiUkJEX01FVEFEQVRBX0VDX1BPT0xfTkFNRSJdID0gKAogICAgICAgICAgICBzZWxmLnZh + bGlkYXRlX3JiZF9tZXRhZGF0YV9lY19wb29sX25hbWUoKQogICAgICAgICkKICAgICAgICBzZWxm + Lm91dF9tYXBbIlRPUE9MT0dZX1BPT0xTIl0gPSBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X3Bv + b2xzCiAgICAgICAgc2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9GQUlMVVJFX0RPTUFJTl9MQUJFTCJd + ID0gKAogICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWlu + X2xhYmVsCiAgICAgICAgKQogICAgICAgIHNlbGYub3V0X21hcFsiVE9QT0xPR1lfRkFJTFVSRV9E + T01BSU5fVkFMVUVTIl0gPSAoCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIudG9wb2xvZ3lf + ZmFpbHVyZV9kb21haW5fdmFsdWVzCiAgICAgICAgKQogICAgICAgIGlmICgKICAgICAgICAgICAg + c2VsZi5fYXJnX3BhcnNlci50b3BvbG9neV9wb29scyAhPSAiIgogICAgICAgICAgICBhbmQgc2Vs + Zi5fYXJnX3BhcnNlci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl9sYWJlbCAhPSAiIgogICAgICAg + ICAgICBhbmQgc2VsZi5fYXJnX3BhcnNlci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl92YWx1ZXMg + IT0gIiIKICAgICAgICApOgogICAgICAgICAgICBzZWxmLnZhbGlkYXRlX3RvcG9sb2d5X3ZhbHVl + cygKICAgICAgICAgICAgICAgIHNlbGYuY29udmVydF9jb21tYV9zZXBhcmF0ZWRfdG9fYXJyYXko + c2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9QT09MUyJdKSwKICAgICAgICAgICAgICAgIHNlbGYuY29u + dmVydF9jb21tYV9zZXBhcmF0ZWRfdG9fYXJyYXkoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5v + dXRfbWFwWyJUT1BPTE9HWV9GQUlMVVJFX0RPTUFJTl9WQUxVRVMiXQogICAgICAgICAgICAgICAg + KSwKICAgICAgICAgICAgKQogICAgICAgICAgICBzZWxmLnZhbGlkYXRlX3RvcG9sb2d5X3JiZF9w + b29scygKICAgICAgICAgICAgICAgIHNlbGYuY29udmVydF9jb21tYV9zZXBhcmF0ZWRfdG9fYXJy + YXkoc2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9QT09MUyJdKQogICAgICAgICAgICApCiAgICAgICAg + ICAgIHNlbGYuaW5pdF90b3BvbG9neV9yYmRfcG9vbHMoCiAgICAgICAgICAgICAgICBzZWxmLmNv + bnZlcnRfY29tbWFfc2VwYXJhdGVkX3RvX2FycmF5KHNlbGYub3V0X21hcFsiVE9QT0xPR1lfUE9P + TFMiXSkKICAgICAgICAgICAgKQogICAgICAgIGVsc2U6CiAgICAgICAgICAgIHNlbGYucmFpc2Vf + ZXhjZXB0aW9uX2lmX2FueV90b3BvbG9neV9mbGFnX2lzX21pc3NpbmcoKQoKICAgICAgICBzZWxm + Lm91dF9tYXBbIlJHV19QT09MX1BSRUZJWCJdID0gc2VsZi5fYXJnX3BhcnNlci5yZ3dfcG9vbF9w + cmVmaXgKICAgICAgICBzZWxmLm91dF9tYXBbIlJHV19FTkRQT0lOVCJdID0gIiIKICAgICAgICBp + ZiBzZWxmLl9hcmdfcGFyc2VyLnJnd19lbmRwb2ludDoKICAgICAgICAgICAgaWYgc2VsZi5fYXJn + X3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICAgICAgc2VsZi5jcmVhdGVfcmd3X2FkbWluX29w + c191c2VyKCkKICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgIGlmICgKICAgICAgICAg + ICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnJnd19yZWFsbV9uYW1lICE9ICIiCiAgICAgICAg + ICAgICAgICAgICAgYW5kIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVncm91cF9uYW1lICE9ICIi + CiAgICAgICAgICAgICAgICAgICAgYW5kIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVfbmFtZSAh + PSAiIgogICAgICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgICAgICBlcnIgPSBzZWxmLnZh + bGlkYXRlX3Jnd19tdWx0aXNpdGUoCiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19w + YXJzZXIucmd3X3JlYWxtX25hbWUsICJyZWFsbSIKICAgICAgICAgICAgICAgICAgICApCiAgICAg + ICAgICAgICAgICAgICAgZXJyID0gc2VsZi52YWxpZGF0ZV9yZ3dfbXVsdGlzaXRlKAogICAgICAg + ICAgICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnJnd196b25lZ3JvdXBfbmFtZSwgInpv + bmVncm91cCIKICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgZXJyID0g + c2VsZi52YWxpZGF0ZV9yZ3dfbXVsdGlzaXRlKAogICAgICAgICAgICAgICAgICAgICAgICBzZWxm + Ll9hcmdfcGFyc2VyLnJnd196b25lX25hbWUsICJ6b25lIgogICAgICAgICAgICAgICAgICAgICkK + CiAgICAgICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNl + ci5yZ3dfcmVhbG1fbmFtZSA9PSAiIgogICAgICAgICAgICAgICAgICAgIGFuZCBzZWxmLl9hcmdf + cGFyc2VyLnJnd196b25lZ3JvdXBfbmFtZSA9PSAiIgogICAgICAgICAgICAgICAgICAgIGFuZCBz + ZWxmLl9hcmdfcGFyc2VyLnJnd196b25lX25hbWUgPT0gIiIKICAgICAgICAgICAgICAgICkgb3Ig KAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3JlYWxtX25hbWUgIT0g IiIKICAgICAgICAgICAgICAgICAgICBhbmQgc2VsZi5fYXJnX3BhcnNlci5yZ3dfem9uZWdyb3Vw X25hbWUgIT0gIiIKICAgICAgICAgICAgICAgICAgICBhbmQgc2VsZi5fYXJnX3BhcnNlci5yZ3df - em9uZV9uYW1lICE9ICIiCiAgICAgICAgICAgICAgICApOgogICAgICAgICAgICAgICAgICAgIGVy - ciA9IHNlbGYudmFsaWRhdGVfcmd3X211bHRpc2l0ZSgKICAgICAgICAgICAgICAgICAgICAgICAg - c2VsZi5fYXJnX3BhcnNlci5yZ3dfcmVhbG1fbmFtZSwgInJlYWxtIgogICAgICAgICAgICAgICAg - ICAgICkKICAgICAgICAgICAgICAgICAgICBlcnIgPSBzZWxmLnZhbGlkYXRlX3Jnd19tdWx0aXNp - dGUoCiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVncm91 - cF9uYW1lLCAiem9uZWdyb3VwIgogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAg - ICAgICBlcnIgPSBzZWxmLnZhbGlkYXRlX3Jnd19tdWx0aXNpdGUoCiAgICAgICAgICAgICAgICAg - ICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVfbmFtZSwgInpvbmUiCiAgICAgICAgICAg - ICAgICAgICAgKQoKICAgICAgICAgICAgICAgIGlmICgKICAgICAgICAgICAgICAgICAgICBzZWxm - Ll9hcmdfcGFyc2VyLnJnd19yZWFsbV9uYW1lID09ICIiCiAgICAgICAgICAgICAgICAgICAgYW5k - IHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVncm91cF9uYW1lID09ICIiCiAgICAgICAgICAgICAg - ICAgICAgYW5kIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVfbmFtZSA9PSAiIgogICAgICAgICAg - ICAgICAgKSBvciAoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5yZ3dfcmVh - bG1fbmFtZSAhPSAiIgogICAgICAgICAgICAgICAgICAgIGFuZCBzZWxmLl9hcmdfcGFyc2VyLnJn - d196b25lZ3JvdXBfbmFtZSAhPSAiIgogICAgICAgICAgICAgICAgICAgIGFuZCBzZWxmLl9hcmdf - cGFyc2VyLnJnd196b25lX25hbWUgIT0gIiIKICAgICAgICAgICAgICAgICk6CiAgICAgICAgICAg - ICAgICAgICAgKAogICAgICAgICAgICAgICAgICAgICAgICBzZWxmLm91dF9tYXBbIlJHV19BRE1J - Tl9PUFNfVVNFUl9BQ0NFU1NfS0VZIl0sCiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYub3V0 - X21hcFsiUkdXX0FETUlOX09QU19VU0VSX1NFQ1JFVF9LRVkiXSwKICAgICAgICAgICAgICAgICAg - ICAgICAgaW5mb19jYXBfc3VwcG9ydGVkLAogICAgICAgICAgICAgICAgICAgICAgICBlcnIsCiAg - ICAgICAgICAgICAgICAgICAgKSA9IHNlbGYuY3JlYXRlX3Jnd19hZG1pbl9vcHNfdXNlcigpCiAg - ICAgICAgICAgICAgICAgICAgZXJyID0gc2VsZi52YWxpZGF0ZV9yZ3dfZW5kcG9pbnQoaW5mb19j - YXBfc3VwcG9ydGVkKQogICAgICAgICAgICAgICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIucmd3 - X3Rsc19jZXJ0X3BhdGg6CiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYub3V0X21hcFsiUkdX - X1RMU19DRVJUIl0gPSAoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnZhbGlkYXRl - X3Jnd19lbmRwb2ludF90bHNfY2VydCgpCiAgICAgICAgICAgICAgICAgICAgICAgICkKICAgICAg - ICAgICAgICAgICAgICAjIGlmIHRoZXJlIGlzIG5vIGVycm9yLCBzZXQgdGhlIFJHV19FTkRQT0lO - VAogICAgICAgICAgICAgICAgICAgIGlmIGVyciAhPSAiLTEiOgogICAgICAgICAgICAgICAgICAg - ICAgICBzZWxmLm91dF9tYXBbIlJHV19FTkRQT0lOVCJdID0gc2VsZi5fYXJnX3BhcnNlci5yZ3df - ZW5kcG9pbnQKICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAgICAgZXJyID0g - IlBsZWFzZSBwcm92aWRlIGFsbCB0aGUgUkdXIG11bHRpc2l0ZSBwYXJhbWV0ZXJzIG9yIG5vbmUg - b2YgdGhlbSIKICAgICAgICAgICAgICAgICAgICBzeXMuc3RkZXJyLndyaXRlKGVycikKCiAgICBk - ZWYgZ2VuX3NoZWxsX291dChzZWxmKToKICAgICAgICBzZWxmLl9nZW5fb3V0cHV0X21hcCgpCiAg - ICAgICAgc2hPdXRJTyA9IFN0cmluZ0lPKCkKICAgICAgICBmb3IgaywgdiBpbiBzZWxmLm91dF9t - YXAuaXRlbXMoKToKICAgICAgICAgICAgaWYgdiBhbmQgayBub3QgaW4gc2VsZi5fZXhjbHVkZWRf - a2V5czoKICAgICAgICAgICAgICAgIHNoT3V0SU8ud3JpdGUoZiJleHBvcnQge2t9PXt2fXtMSU5F - U0VQfSIpCiAgICAgICAgc2hPdXQgPSBzaE91dElPLmdldHZhbHVlKCkKICAgICAgICBzaE91dElP - LmNsb3NlKCkKICAgICAgICByZXR1cm4gc2hPdXQKCiAgICBkZWYgZ2VuX2pzb25fb3V0KHNlbGYp - OgogICAgICAgIHNlbGYuX2dlbl9vdXRwdXRfbWFwKCkKICAgICAgICBpZiBzZWxmLl9hcmdfcGFy - c2VyLmRyeV9ydW46CiAgICAgICAgICAgIHJldHVybiAiIgogICAgICAgIGpzb25fb3V0ID0gWwog - ICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAibmFtZSI6ICJleHRlcm5hbC1jbHVzdGVyLXVz - ZXItY29tbWFuZCIsCiAgICAgICAgICAgICAgICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAg - ICAgICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgImFyZ3MiOiBzZWxmLm91dF9t - YXBbIkFSR1MiXSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH0sCiAgICAgICAgICAg - IHsKICAgICAgICAgICAgICAgICJuYW1lIjogInJvb2stY2VwaC1tb24tZW5kcG9pbnRzIiwKICAg - ICAgICAgICAgICAgICJraW5kIjogIkNvbmZpZ01hcCIsCiAgICAgICAgICAgICAgICAiZGF0YSI6 - IHsKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHNlbGYub3V0X21hcFsiUk9PS19FWFRFUk5B - TF9DRVBIX01PTl9EQVRBIl0sCiAgICAgICAgICAgICAgICAgICAgIm1heE1vbklkIjogIjAiLAog - ICAgICAgICAgICAgICAgICAgICJtYXBwaW5nIjogInt9IiwKICAgICAgICAgICAgICAgIH0sCiAg - ICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJuYW1lIjogInJvb2st - Y2VwaC1tb24iLAogICAgICAgICAgICAgICAgImtpbmQiOiAiU2VjcmV0IiwKICAgICAgICAgICAg - ICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICJhZG1pbi1zZWNyZXQiOiAiYWRtaW4t - c2VjcmV0IiwKICAgICAgICAgICAgICAgICAgICAiZnNpZCI6IHNlbGYub3V0X21hcFsiUk9PS19F - WFRFUk5BTF9GU0lEIl0sCiAgICAgICAgICAgICAgICAgICAgIm1vbi1zZWNyZXQiOiAibW9uLXNl - Y3JldCIsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAg - ICAgICAgICAgICAgICAibmFtZSI6ICJyb29rLWNlcGgtb3BlcmF0b3ItY3JlZHMiLAogICAgICAg - ICAgICAgICAgImtpbmQiOiAiU2VjcmV0IiwKICAgICAgICAgICAgICAgICJkYXRhIjogewogICAg - ICAgICAgICAgICAgICAgICJ1c2VySUQiOiBzZWxmLm91dF9tYXBbIlJPT0tfRVhURVJOQUxfVVNF - Uk5BTUUiXSwKICAgICAgICAgICAgICAgICAgICAidXNlcktleSI6IHNlbGYub3V0X21hcFsiUk9P - S19FWFRFUk5BTF9VU0VSX1NFQ1JFVCJdLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAg - fSwKICAgICAgICBdCgogICAgICAgICMgaWYgJ01PTklUT1JJTkdfRU5EUE9JTlQnIGV4aXN0cywg - dGhlbiBvbmx5IGFkZCAnbW9uaXRvcmluZy1lbmRwb2ludCcgdG8gQ2x1c3RlcgogICAgICAgIGlm - ICgKICAgICAgICAgICAgc2VsZi5vdXRfbWFwWyJNT05JVE9SSU5HX0VORFBPSU5UIl0KICAgICAg - ICAgICAgYW5kIHNlbGYub3V0X21hcFsiTU9OSVRPUklOR19FTkRQT0lOVF9QT1JUIl0KICAgICAg - ICApOgogICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAg - ICAgICAgICAgICAgICAgIm5hbWUiOiAibW9uaXRvcmluZy1lbmRwb2ludCIsCiAgICAgICAgICAg - ICAgICAgICAgImtpbmQiOiAiQ2VwaENsdXN0ZXIiLAogICAgICAgICAgICAgICAgICAgICJkYXRh - IjogewogICAgICAgICAgICAgICAgICAgICAgICAiTW9uaXRvcmluZ0VuZHBvaW50Ijogc2VsZi5v - dXRfbWFwWyJNT05JVE9SSU5HX0VORFBPSU5UIl0sCiAgICAgICAgICAgICAgICAgICAgICAgICJN - b25pdG9yaW5nUG9ydCI6IHNlbGYub3V0X21hcFsiTU9OSVRPUklOR19FTkRQT0lOVF9QT1JUIl0s - CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKQoK - ICAgICAgICAjIGlmICdDU0lfUkJEX05PREVfU0VDUkVUJyBleGlzdHMsIHRoZW4gb25seSBhZGQg - J3Jvb2stY3NpLXJiZC1wcm92aXNpb25lcicgU2VjcmV0CiAgICAgICAgaWYgKAogICAgICAgICAg - ICBzZWxmLm91dF9tYXBbIkNTSV9SQkRfTk9ERV9TRUNSRVQiXQogICAgICAgICAgICBhbmQgc2Vs - Zi5vdXRfbWFwWyJDU0lfUkJEX05PREVfU0VDUkVUX05BTUUiXQogICAgICAgICk6CiAgICAgICAg - ICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAg - ICAibmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfUkJEX05PREVfU0VDUkVUX05BTUUn - XX0iLAogICAgICAgICAgICAgICAgICAgICJraW5kIjogIlNlY3JldCIsCiAgICAgICAgICAgICAg - ICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJ1c2VySUQiOiBzZWxmLm91 - dF9tYXBbIkNTSV9SQkRfTk9ERV9TRUNSRVRfTkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAg - ICAidXNlcktleSI6IHNlbGYub3V0X21hcFsiQ1NJX1JCRF9OT0RFX1NFQ1JFVCJdLAogICAgICAg - ICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAgICAj - IGlmICdDU0lfUkJEX1BST1ZJU0lPTkVSX1NFQ1JFVCcgZXhpc3RzLCB0aGVuIG9ubHkgYWRkICdy - b29rLWNzaS1yYmQtcHJvdmlzaW9uZXInIFNlY3JldAogICAgICAgIGlmICgKICAgICAgICAgICAg - c2VsZi5vdXRfbWFwWyJDU0lfUkJEX1BST1ZJU0lPTkVSX1NFQ1JFVCJdCiAgICAgICAgICAgIGFu - ZCBzZWxmLm91dF9tYXBbIkNTSV9SQkRfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUiXQogICAgICAg - ICk6CiAgICAgICAgICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAg - ICAgICAgICAgICAgICAibmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfUkJEX1BST1ZJ - U0lPTkVSX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAia2luZCI6ICJTZWNy - ZXQiLAogICAgICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICAg - ICAidXNlcklEIjogc2VsZi5vdXRfbWFwWyJDU0lfUkJEX1BST1ZJU0lPTkVSX1NFQ1JFVF9OQU1F - Il0sCiAgICAgICAgICAgICAgICAgICAgICAgICJ1c2VyS2V5Ijogc2VsZi5vdXRfbWFwWyJDU0lf - UkJEX1BST1ZJU0lPTkVSX1NFQ1JFVCJdLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAg - ICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAgICAjIGlmICdDU0lfQ0VQSEZTX1BST1ZJU0lP - TkVSX1NFQ1JFVCcgZXhpc3RzLCB0aGVuIG9ubHkgYWRkICdyb29rLWNzaS1jZXBoZnMtcHJvdmlz - aW9uZXInIFNlY3JldAogICAgICAgIGlmICgKICAgICAgICAgICAgc2VsZi5vdXRfbWFwWyJDU0lf - Q0VQSEZTX1BST1ZJU0lPTkVSX1NFQ1JFVCJdCiAgICAgICAgICAgIGFuZCBzZWxmLm91dF9tYXBb - IkNTSV9DRVBIRlNfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUiXQogICAgICAgICk6CiAgICAgICAg - ICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAg - ICAibmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfQ0VQSEZTX1BST1ZJU0lPTkVSX1NF - Q1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAia2luZCI6ICJTZWNyZXQiLAogICAg - ICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAiYWRtaW5J - RCI6IHNlbGYub3V0X21hcFsiQ1NJX0NFUEhGU19QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSJdLAog - ICAgICAgICAgICAgICAgICAgICAgICAiYWRtaW5LZXkiOiBzZWxmLm91dF9tYXBbIkNTSV9DRVBI - RlNfUFJPVklTSU9ORVJfU0VDUkVUIl0sCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAg - ICAgICAgIH0KICAgICAgICAgICAgKQogICAgICAgICMgaWYgJ0NTSV9DRVBIRlNfTk9ERV9TRUNS - RVQnIGV4aXN0cywgdGhlbiBvbmx5IGFkZCAncm9vay1jc2ktY2VwaGZzLW5vZGUnIFNlY3JldAog - ICAgICAgIGlmICgKICAgICAgICAgICAgc2VsZi5vdXRfbWFwWyJDU0lfQ0VQSEZTX05PREVfU0VD - UkVUIl0KICAgICAgICAgICAgYW5kIHNlbGYub3V0X21hcFsiQ1NJX0NFUEhGU19OT0RFX1NFQ1JF - VF9OQU1FIl0KICAgICAgICApOgogICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAg - ICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiBmInJvb2ste3NlbGYub3V0X21h - cFsnQ1NJX0NFUEhGU19OT0RFX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAi - a2luZCI6ICJTZWNyZXQiLAogICAgICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAg - ICAgICAgICAgICAgICAiYWRtaW5JRCI6IHNlbGYub3V0X21hcFsiQ1NJX0NFUEhGU19OT0RFX1NF - Q1JFVF9OQU1FIl0sCiAgICAgICAgICAgICAgICAgICAgICAgICJhZG1pbktleSI6IHNlbGYub3V0 - X21hcFsiQ1NJX0NFUEhGU19OT0RFX1NFQ1JFVCJdLAogICAgICAgICAgICAgICAgICAgIH0sCiAg - ICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAgICAjIGlmICdST09LX0VYVEVSTkFM - X0RBU0hCT0FSRF9MSU5LJyBleGlzdHMsIHRoZW4gb25seSBhZGQgJ3Jvb2stY2VwaC1kYXNoYm9h - cmQtbGluaycgU2VjcmV0CiAgICAgICAgaWYgc2VsZi5vdXRfbWFwWyJST09LX0VYVEVSTkFMX0RB - U0hCT0FSRF9MSU5LIl06CiAgICAgICAgICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAg - ICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJyb29rLWNlcGgtZGFzaGJvYXJkLWxp - bmsiLAogICAgICAgICAgICAgICAgICAgICJraW5kIjogIlNlY3JldCIsCiAgICAgICAgICAgICAg - ICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJ1c2VySUQiOiAiY2VwaC1k - YXNoYm9hcmQtbGluayIsCiAgICAgICAgICAgICAgICAgICAgICAgICJ1c2VyS2V5Ijogc2VsZi5v - dXRfbWFwWyJST09LX0VYVEVSTkFMX0RBU0hCT0FSRF9MSU5LIl0sCiAgICAgICAgICAgICAgICAg - ICAgfSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKQogICAgICAgICMgaWYgJ1JBRE9T - X05BTUVTUEFDRScgZXhpc3RzLCB0aGVuIG9ubHkgYWRkIHRoZSAiUkFET1NfTkFNRVNQQUNFIiBu - YW1lc3BhY2UKICAgICAgICBpZiAoCiAgICAgICAgICAgIHNlbGYub3V0X21hcFsiUkFET1NfTkFN - RVNQQUNFIl0KICAgICAgICAgICAgYW5kIHNlbGYub3V0X21hcFsiUkVTVFJJQ1RFRF9BVVRIX1BF - Uk1JU1NJT04iXQogICAgICAgICAgICBhbmQgbm90IHNlbGYub3V0X21hcFsiUkJEX01FVEFEQVRB - X0VDX1BPT0xfTkFNRSJdCiAgICAgICAgKToKICAgICAgICAgICAganNvbl9vdXQuYXBwZW5kKAog - ICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICJuYW1lIjogInJhZG9zLW5hbWVz - cGFjZSIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiQ2VwaEJsb2NrUG9vbFJhZG9zTmFt - ZXNwYWNlIiwKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAg - ICAgICAgInJhZG9zTmFtZXNwYWNlTmFtZSI6IHNlbGYub3V0X21hcFsiUkFET1NfTkFNRVNQQUNF - Il0sCiAgICAgICAgICAgICAgICAgICAgICAgICJwb29sIjogc2VsZi5vdXRfbWFwWyJSQkRfUE9P - TF9OQU1FIl0sCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0KICAgICAg - ICAgICAgKQogICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAg - ICAgICAgICAgICAgICAgICAgIm5hbWUiOiAiY2VwaC1yYmQtcmFkb3MtbmFtZXNwYWNlIiwKICAg + em9uZV9uYW1lICE9ICIiCiAgICAgICAgICAgICAgICApOgogICAgICAgICAgICAgICAgICAgICgK + ICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5vdXRfbWFwWyJSR1dfQURNSU5fT1BTX1VTRVJf + QUNDRVNTX0tFWSJdLAogICAgICAgICAgICAgICAgICAgICAgICBzZWxmLm91dF9tYXBbIlJHV19B + RE1JTl9PUFNfVVNFUl9TRUNSRVRfS0VZIl0sCiAgICAgICAgICAgICAgICAgICAgICAgIGluZm9f + Y2FwX3N1cHBvcnRlZCwKICAgICAgICAgICAgICAgICAgICAgICAgZXJyLAogICAgICAgICAgICAg + ICAgICAgICkgPSBzZWxmLmNyZWF0ZV9yZ3dfYWRtaW5fb3BzX3VzZXIoKQogICAgICAgICAgICAg + ICAgICAgIGVyciA9IHNlbGYudmFsaWRhdGVfcmd3X2VuZHBvaW50KGluZm9fY2FwX3N1cHBvcnRl + ZCkKICAgICAgICAgICAgICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJnd190bHNfY2VydF9w + YXRoOgogICAgICAgICAgICAgICAgICAgICAgICBzZWxmLm91dF9tYXBbIlJHV19UTFNfQ0VSVCJd + ID0gKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi52YWxpZGF0ZV9yZ3dfZW5kcG9p + bnRfdGxzX2NlcnQoKQogICAgICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAg + ICAgIyBpZiB0aGVyZSBpcyBubyBlcnJvciwgc2V0IHRoZSBSR1dfRU5EUE9JTlQKICAgICAgICAg + ICAgICAgICAgICBpZiBlcnIgIT0gIi0xIjoKICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5v + dXRfbWFwWyJSR1dfRU5EUE9JTlQiXSA9IHNlbGYuX2FyZ19wYXJzZXIucmd3X2VuZHBvaW50CiAg + ICAgICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgICAgIGVyciA9ICJQbGVhc2UgcHJv + dmlkZSBhbGwgdGhlIFJHVyBtdWx0aXNpdGUgcGFyYW1ldGVycyBvciBub25lIG9mIHRoZW0iCiAg + ICAgICAgICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZShlcnIpCgogICAgZGVmIGdlbl9zaGVs + bF9vdXQoc2VsZik6CiAgICAgICAgc2VsZi5fZ2VuX291dHB1dF9tYXAoKQogICAgICAgIHNoT3V0 + SU8gPSBTdHJpbmdJTygpCiAgICAgICAgZm9yIGssIHYgaW4gc2VsZi5vdXRfbWFwLml0ZW1zKCk6 + CiAgICAgICAgICAgIGlmIHYgYW5kIGsgbm90IGluIHNlbGYuX2V4Y2x1ZGVkX2tleXM6CiAgICAg + ICAgICAgICAgICBzaE91dElPLndyaXRlKGYiZXhwb3J0IHtrfT17dn17TElORVNFUH0iKQogICAg + ICAgIHNoT3V0ID0gc2hPdXRJTy5nZXR2YWx1ZSgpCiAgICAgICAgc2hPdXRJTy5jbG9zZSgpCiAg + ICAgICAgcmV0dXJuIHNoT3V0CgogICAgZGVmIGdlbl9qc29uX291dChzZWxmKToKICAgICAgICBz + ZWxmLl9nZW5fb3V0cHV0X21hcCgpCiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVu + OgogICAgICAgICAgICByZXR1cm4gIiIKICAgICAgICBqc29uX291dCA9IFsKICAgICAgICAgICAg + ewogICAgICAgICAgICAgICAgIm5hbWUiOiAiZXh0ZXJuYWwtY2x1c3Rlci11c2VyLWNvbW1hbmQi + LAogICAgICAgICAgICAgICAgImtpbmQiOiAiQ29uZmlnTWFwIiwKICAgICAgICAgICAgICAgICJk + YXRhIjogewogICAgICAgICAgICAgICAgICAgICJhcmdzIjogc2VsZi5vdXRfbWFwWyJBUkdTIl0s + CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAg + ICAgICAgICAibmFtZSI6ICJyb29rLWNlcGgtbW9uLWVuZHBvaW50cyIsCiAgICAgICAgICAgICAg + ICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAgICAgICAgICAgImRhdGEiOiB7CiAgICAgICAg + ICAgICAgICAgICAgImRhdGEiOiBzZWxmLm91dF9tYXBbIlJPT0tfRVhURVJOQUxfQ0VQSF9NT05f + REFUQSJdLAogICAgICAgICAgICAgICAgICAgICJtYXhNb25JZCI6ICIwIiwKICAgICAgICAgICAg + ICAgICAgICAibWFwcGluZyI6ICJ7fSIsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9 + LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAibmFtZSI6ICJyb29rLWNlcGgtbW9uIiwK + ICAgICAgICAgICAgICAgICJraW5kIjogIlNlY3JldCIsCiAgICAgICAgICAgICAgICAiZGF0YSI6 + IHsKICAgICAgICAgICAgICAgICAgICAiYWRtaW4tc2VjcmV0IjogImFkbWluLXNlY3JldCIsCiAg + ICAgICAgICAgICAgICAgICAgImZzaWQiOiBzZWxmLm91dF9tYXBbIlJPT0tfRVhURVJOQUxfRlNJ + RCJdLAogICAgICAgICAgICAgICAgICAgICJtb24tc2VjcmV0IjogIm1vbi1zZWNyZXQiLAogICAg + ICAgICAgICAgICAgfSwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAg + ICAgIm5hbWUiOiAicm9vay1jZXBoLW9wZXJhdG9yLWNyZWRzIiwKICAgICAgICAgICAgICAgICJr + aW5kIjogIlNlY3JldCIsCiAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAg + ICAgICAidXNlcklEIjogc2VsZi5vdXRfbWFwWyJST09LX0VYVEVSTkFMX1VTRVJOQU1FIl0sCiAg + ICAgICAgICAgICAgICAgICAgInVzZXJLZXkiOiBzZWxmLm91dF9tYXBbIlJPT0tfRVhURVJOQUxf + VVNFUl9TRUNSRVQiXSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH0sCiAgICAgICAg + XQoKICAgICAgICAjIGlmICdNT05JVE9SSU5HX0VORFBPSU5UJyBleGlzdHMsIHRoZW4gb25seSBh + ZGQgJ21vbml0b3JpbmctZW5kcG9pbnQnIHRvIENsdXN0ZXIKICAgICAgICBpZiAoCiAgICAgICAg + ICAgIHNlbGYub3V0X21hcFsiTU9OSVRPUklOR19FTkRQT0lOVCJdCiAgICAgICAgICAgIGFuZCBz + ZWxmLm91dF9tYXBbIk1PTklUT1JJTkdfRU5EUE9JTlRfUE9SVCJdCiAgICAgICAgKToKICAgICAg + ICAgICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAg + ICAgICJuYW1lIjogIm1vbml0b3JpbmctZW5kcG9pbnQiLAogICAgICAgICAgICAgICAgICAgICJr + aW5kIjogIkNlcGhDbHVzdGVyIiwKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAg + ICAgICAgICAgICAgICAgICAgIk1vbml0b3JpbmdFbmRwb2ludCI6IHNlbGYub3V0X21hcFsiTU9O + SVRPUklOR19FTkRQT0lOVCJdLAogICAgICAgICAgICAgICAgICAgICAgICAiTW9uaXRvcmluZ1Bv + cnQiOiBzZWxmLm91dF9tYXBbIk1PTklUT1JJTkdfRU5EUE9JTlRfUE9SVCJdLAogICAgICAgICAg + ICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKCiAgICAgICAgIyBp + ZiAnQ1NJX1JCRF9OT0RFX1NFQ1JFVCcgZXhpc3RzLCB0aGVuIG9ubHkgYWRkICdyb29rLWNzaS1y + YmQtcHJvdmlzaW9uZXInIFNlY3JldAogICAgICAgIGlmICgKICAgICAgICAgICAgc2VsZi5vdXRf + bWFwWyJDU0lfUkJEX05PREVfU0VDUkVUIl0KICAgICAgICAgICAgYW5kIHNlbGYub3V0X21hcFsi + Q1NJX1JCRF9OT0RFX1NFQ1JFVF9OQU1FIl0KICAgICAgICApOgogICAgICAgICAgICBqc29uX291 + dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiBm + InJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9OT0RFX1NFQ1JFVF9OQU1FJ119IiwKICAgICAg + ICAgICAgICAgICAgICAia2luZCI6ICJTZWNyZXQiLAogICAgICAgICAgICAgICAgICAgICJkYXRh + IjogewogICAgICAgICAgICAgICAgICAgICAgICAidXNlcklEIjogc2VsZi5vdXRfbWFwWyJDU0lf + UkJEX05PREVfU0VDUkVUX05BTUUiXSwKICAgICAgICAgICAgICAgICAgICAgICAgInVzZXJLZXki + OiBzZWxmLm91dF9tYXBbIkNTSV9SQkRfTk9ERV9TRUNSRVQiXSwKICAgICAgICAgICAgICAgICAg + ICB9LAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApCiAgICAgICAgIyBpZiAnQ1NJX1JC + RF9QUk9WSVNJT05FUl9TRUNSRVQnIGV4aXN0cywgdGhlbiBvbmx5IGFkZCAncm9vay1jc2ktcmJk + LXByb3Zpc2lvbmVyJyBTZWNyZXQKICAgICAgICBpZiAoCiAgICAgICAgICAgIHNlbGYub3V0X21h + cFsiQ1NJX1JCRF9QUk9WSVNJT05FUl9TRUNSRVQiXQogICAgICAgICAgICBhbmQgc2VsZi5vdXRf + bWFwWyJDU0lfUkJEX1BST1ZJU0lPTkVSX1NFQ1JFVF9OQU1FIl0KICAgICAgICApOgogICAgICAg + ICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAg + ICAgIm5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9QUk9WSVNJT05FUl9TRUNS + RVRfTkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiU2VjcmV0IiwKICAgICAg + ICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgInVzZXJJRCI6 + IHNlbGYub3V0X21hcFsiQ1NJX1JCRF9QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSJdLAogICAgICAg + ICAgICAgICAgICAgICAgICAidXNlcktleSI6IHNlbGYub3V0X21hcFsiQ1NJX1JCRF9QUk9WSVNJ + T05FUl9TRUNSRVQiXSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfQog + ICAgICAgICAgICApCiAgICAgICAgIyBpZiAnQ1NJX0NFUEhGU19QUk9WSVNJT05FUl9TRUNSRVQn + IGV4aXN0cywgdGhlbiBvbmx5IGFkZCAncm9vay1jc2ktY2VwaGZzLXByb3Zpc2lvbmVyJyBTZWNy + ZXQKICAgICAgICBpZiAoCiAgICAgICAgICAgIHNlbGYub3V0X21hcFsiQ1NJX0NFUEhGU19QUk9W + SVNJT05FUl9TRUNSRVQiXQogICAgICAgICAgICBhbmQgc2VsZi5vdXRfbWFwWyJDU0lfQ0VQSEZT + X1BST1ZJU0lPTkVSX1NFQ1JFVF9OQU1FIl0KICAgICAgICApOgogICAgICAgICAgICBqc29uX291 + dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiBm + InJvb2ste3NlbGYub3V0X21hcFsnQ1NJX0NFUEhGU19QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSdd + fSIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiU2VjcmV0IiwKICAgICAgICAgICAgICAg + ICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgImFkbWluSUQiOiBzZWxmLm91 + dF9tYXBbIkNTSV9DRVBIRlNfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUiXSwKICAgICAgICAgICAg + ICAgICAgICAgICAgImFkbWluS2V5Ijogc2VsZi5vdXRfbWFwWyJDU0lfQ0VQSEZTX1BST1ZJU0lP + TkVSX1NFQ1JFVCJdLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9CiAg + ICAgICAgICAgICkKICAgICAgICAjIGlmICdDU0lfQ0VQSEZTX05PREVfU0VDUkVUJyBleGlzdHMs + IHRoZW4gb25seSBhZGQgJ3Jvb2stY3NpLWNlcGhmcy1ub2RlJyBTZWNyZXQKICAgICAgICBpZiAo + CiAgICAgICAgICAgIHNlbGYub3V0X21hcFsiQ1NJX0NFUEhGU19OT0RFX1NFQ1JFVCJdCiAgICAg + ICAgICAgIGFuZCBzZWxmLm91dF9tYXBbIkNTSV9DRVBIRlNfTk9ERV9TRUNSRVRfTkFNRSJdCiAg + ICAgICAgKToKICAgICAgICAgICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAgewog + ICAgICAgICAgICAgICAgICAgICJuYW1lIjogZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9DRVBI + RlNfTk9ERV9TRUNSRVRfTkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiU2Vj + cmV0IiwKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAg + ICAgImFkbWluSUQiOiBzZWxmLm91dF9tYXBbIkNTSV9DRVBIRlNfTk9ERV9TRUNSRVRfTkFNRSJd + LAogICAgICAgICAgICAgICAgICAgICAgICAiYWRtaW5LZXkiOiBzZWxmLm91dF9tYXBbIkNTSV9D + RVBIRlNfTk9ERV9TRUNSRVQiXSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAg + ICAgfQogICAgICAgICAgICApCiAgICAgICAgIyBpZiAnUk9PS19FWFRFUk5BTF9EQVNIQk9BUkRf + TElOSycgZXhpc3RzLCB0aGVuIG9ubHkgYWRkICdyb29rLWNlcGgtZGFzaGJvYXJkLWxpbmsnIFNl + Y3JldAogICAgICAgIGlmIHNlbGYub3V0X21hcFsiUk9PS19FWFRFUk5BTF9EQVNIQk9BUkRfTElO + SyJdOgogICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAg + ICAgICAgICAgICAgICAgIm5hbWUiOiAicm9vay1jZXBoLWRhc2hib2FyZC1saW5rIiwKICAgICAg + ICAgICAgICAgICAgICAia2luZCI6ICJTZWNyZXQiLAogICAgICAgICAgICAgICAgICAgICJkYXRh + IjogewogICAgICAgICAgICAgICAgICAgICAgICAidXNlcklEIjogImNlcGgtZGFzaGJvYXJkLWxp + bmsiLAogICAgICAgICAgICAgICAgICAgICAgICAidXNlcktleSI6IHNlbGYub3V0X21hcFsiUk9P + S19FWFRFUk5BTF9EQVNIQk9BUkRfTElOSyJdLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAg + ICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAgICAjIGlmICdSQURPU19OQU1FU1BBQ0Un + IGV4aXN0cywgdGhlbiBvbmx5IGFkZCB0aGUgIlJBRE9TX05BTUVTUEFDRSIgbmFtZXNwYWNlCiAg + ICAgICAgaWYgKAogICAgICAgICAgICBzZWxmLm91dF9tYXBbIlJBRE9TX05BTUVTUEFDRSJdCiAg + ICAgICAgICAgIGFuZCBzZWxmLm91dF9tYXBbIlJFU1RSSUNURURfQVVUSF9QRVJNSVNTSU9OIl0K + ICAgICAgICAgICAgYW5kIG5vdCBzZWxmLm91dF9tYXBbIlJCRF9NRVRBREFUQV9FQ19QT09MX05B + TUUiXQogICAgICAgICk6CiAgICAgICAgICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAg + ICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJyYWRvcy1uYW1lc3BhY2UiLAogICAg + ICAgICAgICAgICAgICAgICJraW5kIjogIkNlcGhCbG9ja1Bvb2xSYWRvc05hbWVzcGFjZSIsCiAg + ICAgICAgICAgICAgICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJyYWRv + c05hbWVzcGFjZU5hbWUiOiBzZWxmLm91dF9tYXBbIlJBRE9TX05BTUVTUEFDRSJdLAogICAgICAg + ICAgICAgICAgICAgICAgICAicG9vbCI6IHNlbGYub3V0X21hcFsiUkJEX1BPT0xfTkFNRSJdLAog + ICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAg + ICAgICAgICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAg + ICAgICAgICJuYW1lIjogImNlcGgtcmJkLXJhZG9zLW5hbWVzcGFjZSIsCiAgICAgICAgICAgICAg + ICAgICAgImtpbmQiOiAiU3RvcmFnZUNsYXNzIiwKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6 + IHsKICAgICAgICAgICAgICAgICAgICAgICAgInBvb2wiOiBzZWxmLm91dF9tYXBbIlJCRF9QT09M + X05BTUUiXSwKICAgICAgICAgICAgICAgICAgICAgICAgImNzaS5zdG9yYWdlLms4cy5pby9wcm92 + aXNpb25lci1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfUkJEX1BST1ZJ + U0lPTkVSX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAgICAgImNzaS5zdG9y + YWdlLms4cy5pby9jb250cm9sbGVyLWV4cGFuZC1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5v + dXRfbWFwWydDU0lfUkJEX1BST1ZJU0lPTkVSX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAg + ICAgICAgICAgICAgImNzaS5zdG9yYWdlLms4cy5pby9ub2RlLXN0YWdlLXNlY3JldC1uYW1lIjog + ZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfTk9ERV9TRUNSRVRfTkFNRSddfSIsCiAgICAg + ICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKQogICAgICAg + IGVsc2U6CiAgICAgICAgICAgIGlmIHNlbGYub3V0X21hcFsiUkJEX01FVEFEQVRBX0VDX1BPT0xf + TkFNRSJdOgogICAgICAgICAgICAgICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAg + ICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiAiY2VwaC1yYmQiLAogICAgICAg ICAgICAgICAgICAgICAgICAia2luZCI6ICJTdG9yYWdlQ2xhc3MiLAogICAgICAgICAgICAgICAg - ICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAicG9vbCI6IHNlbGYub3V0X21h - cFsiUkJEX1BPT0xfTkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2Uu - azhzLmlvL3Byb3Zpc2lvbmVyLXNlY3JldC1uYW1lIjogZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NT - SV9SQkRfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAgICAgICAg - ICAiY3NpLnN0b3JhZ2UuazhzLmlvL2NvbnRyb2xsZXItZXhwYW5kLXNlY3JldC1uYW1lIjogZiJy - b29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUnXX0iLAog - ICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL25vZGUtc3RhZ2Utc2Vj - cmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9OT0RFX1NFQ1JFVF9OQU1F - J119IiwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfQogICAgICAgICAg - ICApCiAgICAgICAgZWxzZToKICAgICAgICAgICAgaWYgc2VsZi5vdXRfbWFwWyJSQkRfTUVUQURB - VEFfRUNfUE9PTF9OQU1FIl06CiAgICAgICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAg - ICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJjZXBoLXJi - ZCIsCiAgICAgICAgICAgICAgICAgICAgICAgICJraW5kIjogIlN0b3JhZ2VDbGFzcyIsCiAgICAg - ICAgICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAgICAg - ImRhdGFQb29sIjogc2VsZi5vdXRfbWFwWyJSQkRfUE9PTF9OQU1FIl0sCiAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAicG9vbCI6IHNlbGYub3V0X21hcFsiUkJEX01FVEFEQVRBX0VDX1BPT0xf - TkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgImNzaS5zdG9yYWdlLms4cy5pby9w - cm92aXNpb25lci1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfUkJEX1BS - T1ZJU0lPTkVSX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJj - c2kuc3RvcmFnZS5rOHMuaW8vY29udHJvbGxlci1leHBhbmQtc2VjcmV0LW5hbWUiOiBmInJvb2st - e3NlbGYub3V0X21hcFsnQ1NJX1JCRF9QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSddfSIsCiAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL25vZGUtc3RhZ2Utc2Vj - cmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9OT0RFX1NFQ1JFVF9OQU1F - J119IiwKICAgICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB9CiAg - ICAgICAgICAgICAgICApCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBqc29uX291 - dC5hcHBlbmQoCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAi - bmFtZSI6ICJjZXBoLXJiZCIsCiAgICAgICAgICAgICAgICAgICAgICAgICJraW5kIjogIlN0b3Jh - Z2VDbGFzcyIsCiAgICAgICAgICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAgICAg - ICAgICAgICAgICAgICAgInBvb2wiOiBzZWxmLm91dF9tYXBbIlJCRF9QT09MX05BTUUiXSwKICAg + ICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJkYXRhUG9vbCI6 + IHNlbGYub3V0X21hcFsiUkJEX1BPT0xfTkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAgICAg + ICAgInBvb2wiOiBzZWxmLm91dF9tYXBbIlJCRF9NRVRBREFUQV9FQ19QT09MX05BTUUiXSwKICAg ICAgICAgICAgICAgICAgICAgICAgICAgICJjc2kuc3RvcmFnZS5rOHMuaW8vcHJvdmlzaW9uZXIt c2VjcmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9QUk9WSVNJT05FUl9T RUNSRVRfTkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2Uu @@ -1549,147 +1542,159 @@ data: ICAgICAgICAgICAgImNzaS5zdG9yYWdlLms4cy5pby9ub2RlLXN0YWdlLXNlY3JldC1uYW1lIjog ZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfTk9ERV9TRUNSRVRfTkFNRSddfSIsCiAgICAg ICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAg - ICAgKQoKICAgICAgICAjIGlmICdUT1BPTE9HWV9QT09MUycsICdUT1BPTE9HWV9GQUlMVVJFX0RP - TUFJTl9MQUJFTCcsICdUT1BPTE9HWV9GQUlMVVJFX0RPTUFJTl9WQUxVRVMnICBleGlzdHMsCiAg - ICAgICAgIyB0aGVuIG9ubHkgYWRkICd0b3BvbG9neScgU3RvcmFnZUNsYXNzCiAgICAgICAgaWYg - KAogICAgICAgICAgICBzZWxmLm91dF9tYXBbIlRPUE9MT0dZX1BPT0xTIl0KICAgICAgICAgICAg - YW5kIHNlbGYub3V0X21hcFsiVE9QT0xPR1lfRkFJTFVSRV9ET01BSU5fTEFCRUwiXQogICAgICAg - ICAgICBhbmQgc2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9GQUlMVVJFX0RPTUFJTl9WQUxVRVMiXQog - ICAgICAgICk6CiAgICAgICAgICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsK - ICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJjZXBoLXJiZC10b3BvbG9neSIsCiAgICAgICAg - ICAgICAgICAgICAgImtpbmQiOiAiU3RvcmFnZUNsYXNzIiwKICAgICAgICAgICAgICAgICAgICAi - ZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgInRvcG9sb2d5RmFpbHVyZURvbWFpbkxh - YmVsIjogc2VsZi5vdXRfbWFwWwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIlRPUE9MT0dZ - X0ZBSUxVUkVfRE9NQUlOX0xBQkVMIgogICAgICAgICAgICAgICAgICAgICAgICBdLAogICAgICAg - ICAgICAgICAgICAgICAgICAidG9wb2xvZ3lGYWlsdXJlRG9tYWluVmFsdWVzIjogc2VsZi5vdXRf - bWFwWwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIlRPUE9MT0dZX0ZBSUxVUkVfRE9NQUlO - X1ZBTFVFUyIKICAgICAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICAg - ICAgInRvcG9sb2d5UG9vbHMiOiBzZWxmLm91dF9tYXBbIlRPUE9MT0dZX1BPT0xTIl0sCiAgICAg - ICAgICAgICAgICAgICAgICAgICJjc2kuc3RvcmFnZS5rOHMuaW8vcHJvdmlzaW9uZXItc2VjcmV0 - LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9QUk9WSVNJT05FUl9TRUNSRVRf - TkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJjc2kuc3RvcmFnZS5rOHMuaW8vY29u - dHJvbGxlci1leHBhbmQtc2VjcmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JC - RF9QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJj - c2kuc3RvcmFnZS5rOHMuaW8vbm9kZS1zdGFnZS1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5v - dXRfbWFwWydDU0lfUkJEX05PREVfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAgICAg - IH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKCiAgICAgICAgIyBpZiAnQ0VQSEZT - X0ZTX05BTUUnIGV4aXN0cywgdGhlbiBvbmx5IGFkZCAnY2VwaGZzJyBTdG9yYWdlQ2xhc3MKICAg - ICAgICBpZiBzZWxmLm91dF9tYXBbIkNFUEhGU19GU19OQU1FIl06CiAgICAgICAgICAgIGpzb25f - b3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6 - ICJjZXBoZnMiLAogICAgICAgICAgICAgICAgICAgICJraW5kIjogIlN0b3JhZ2VDbGFzcyIsCiAg - ICAgICAgICAgICAgICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJmc05h - bWUiOiBzZWxmLm91dF9tYXBbIkNFUEhGU19GU19OQU1FIl0sCiAgICAgICAgICAgICAgICAgICAg - ICAgICJwb29sIjogc2VsZi5vdXRfbWFwWyJDRVBIRlNfUE9PTF9OQU1FIl0sCiAgICAgICAgICAg - ICAgICAgICAgICAgICJjc2kuc3RvcmFnZS5rOHMuaW8vcHJvdmlzaW9uZXItc2VjcmV0LW5hbWUi - OiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX0NFUEhGU19QUk9WSVNJT05FUl9TRUNSRVRfTkFN - RSddfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJjc2kuc3RvcmFnZS5rOHMuaW8vY29udHJv - bGxlci1leHBhbmQtc2VjcmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX0NFUEhG - U19QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJj - c2kuc3RvcmFnZS5rOHMuaW8vbm9kZS1zdGFnZS1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5v - dXRfbWFwWydDU0lfQ0VQSEZTX05PREVfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAg - ICAgIH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAgICAjIGlmICdSR1df - RU5EUE9JTlQnIGV4aXN0cywgdGhlbiBvbmx5IGFkZCAnY2VwaC1yZ3cnIFN0b3JhZ2VDbGFzcwog - ICAgICAgIGlmIHNlbGYub3V0X21hcFsiUkdXX0VORFBPSU5UIl06CiAgICAgICAgICAgIGpzb25f + ICAgKQogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAganNvbl9vdXQuYXBwZW5kKAog + ICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiAiY2Vw + aC1yYmQiLAogICAgICAgICAgICAgICAgICAgICAgICAia2luZCI6ICJTdG9yYWdlQ2xhc3MiLAog + ICAgICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICJwb29sIjogc2VsZi5vdXRfbWFwWyJSQkRfUE9PTF9OQU1FIl0sCiAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL3Byb3Zpc2lvbmVyLXNlY3JldC1uYW1l + IjogZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUn + XX0iLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgImNzaS5zdG9yYWdlLms4cy5pby9jb250 + cm9sbGVyLWV4cGFuZC1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfUkJE + X1BST1ZJU0lPTkVSX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICJjc2kuc3RvcmFnZS5rOHMuaW8vbm9kZS1zdGFnZS1zZWNyZXQtbmFtZSI6IGYicm9vay17c2Vs + Zi5vdXRfbWFwWydDU0lfUkJEX05PREVfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAg + ICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICkKCiAgICAg + ICAgIyBpZiAnVE9QT0xPR1lfUE9PTFMnLCAnVE9QT0xPR1lfRkFJTFVSRV9ET01BSU5fTEFCRUwn + LCAnVE9QT0xPR1lfRkFJTFVSRV9ET01BSU5fVkFMVUVTJyAgZXhpc3RzLAogICAgICAgICMgdGhl + biBvbmx5IGFkZCAndG9wb2xvZ3knIFN0b3JhZ2VDbGFzcwogICAgICAgIGlmICgKICAgICAgICAg + ICAgc2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9QT09MUyJdCiAgICAgICAgICAgIGFuZCBzZWxmLm91 + dF9tYXBbIlRPUE9MT0dZX0ZBSUxVUkVfRE9NQUlOX0xBQkVMIl0KICAgICAgICAgICAgYW5kIHNl + bGYub3V0X21hcFsiVE9QT0xPR1lfRkFJTFVSRV9ET01BSU5fVkFMVUVTIl0KICAgICAgICApOgog + ICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAg + ICAgICAgICAgIm5hbWUiOiAiY2VwaC1yYmQtdG9wb2xvZ3kiLAogICAgICAgICAgICAgICAgICAg + ICJraW5kIjogIlN0b3JhZ2VDbGFzcyIsCiAgICAgICAgICAgICAgICAgICAgImRhdGEiOiB7CiAg + ICAgICAgICAgICAgICAgICAgICAgICJ0b3BvbG9neUZhaWx1cmVEb21haW5MYWJlbCI6IHNlbGYu + b3V0X21hcFsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJUT1BPTE9HWV9GQUlMVVJFX0RP + TUFJTl9MQUJFTCIKICAgICAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAg + ICAgICAgInRvcG9sb2d5RmFpbHVyZURvbWFpblZhbHVlcyI6IHNlbGYub3V0X21hcFsKICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICJUT1BPTE9HWV9GQUlMVVJFX0RPTUFJTl9WQUxVRVMiCiAg + ICAgICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgICAgICJ0b3BvbG9n + eVBvb2xzIjogc2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9QT09MUyJdLAogICAgICAgICAgICAgICAg + ICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL3Byb3Zpc2lvbmVyLXNlY3JldC1uYW1lIjogZiJy + b29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUnXX0iLAog + ICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL2NvbnRyb2xsZXItZXhw + YW5kLXNlY3JldC1uYW1lIjogZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfUFJPVklTSU9O + RVJfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2Uu + azhzLmlvL25vZGUtc3RhZ2Utc2VjcmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJ + X1JCRF9OT0RFX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAg + ICAgICAgICAgfQogICAgICAgICAgICApCgogICAgICAgICMgaWYgJ0NFUEhGU19GU19OQU1FJyBl + eGlzdHMsIHRoZW4gb25seSBhZGQgJ2NlcGhmcycgU3RvcmFnZUNsYXNzCiAgICAgICAgaWYgc2Vs + Zi5vdXRfbWFwWyJDRVBIRlNfRlNfTkFNRSJdOgogICAgICAgICAgICBqc29uX291dC5hcHBlbmQo + CiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiAiY2VwaGZzIiwK + ICAgICAgICAgICAgICAgICAgICAia2luZCI6ICJTdG9yYWdlQ2xhc3MiLAogICAgICAgICAgICAg + ICAgICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAiZnNOYW1lIjogc2VsZi5v + dXRfbWFwWyJDRVBIRlNfRlNfTkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAgICAicG9vbCI6 + IHNlbGYub3V0X21hcFsiQ0VQSEZTX1BPT0xfTkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAg + ICAiY3NpLnN0b3JhZ2UuazhzLmlvL3Byb3Zpc2lvbmVyLXNlY3JldC1uYW1lIjogZiJyb29rLXtz + ZWxmLm91dF9tYXBbJ0NTSV9DRVBIRlNfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUnXX0iLAogICAg + ICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL2NvbnRyb2xsZXItZXhwYW5k + LXNlY3JldC1uYW1lIjogZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9DRVBIRlNfUFJPVklTSU9O + RVJfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2Uu + azhzLmlvL25vZGUtc3RhZ2Utc2VjcmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJ + X0NFUEhGU19OT0RFX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICB9LAogICAg + ICAgICAgICAgICAgfQogICAgICAgICAgICApCiAgICAgICAgIyBpZiAnUkdXX0VORFBPSU5UJyBl + eGlzdHMsIHRoZW4gb25seSBhZGQgJ2NlcGgtcmd3JyBTdG9yYWdlQ2xhc3MKICAgICAgICBpZiBz + ZWxmLm91dF9tYXBbIlJHV19FTkRQT0lOVCJdOgogICAgICAgICAgICBqc29uX291dC5hcHBlbmQo + CiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiAiY2VwaC1yZ3ci + LAogICAgICAgICAgICAgICAgICAgICJraW5kIjogIlN0b3JhZ2VDbGFzcyIsCiAgICAgICAgICAg + ICAgICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJlbmRwb2ludCI6IHNl + bGYub3V0X21hcFsiUkdXX0VORFBPSU5UIl0sCiAgICAgICAgICAgICAgICAgICAgICAgICJwb29s + UHJlZml4Ijogc2VsZi5vdXRfbWFwWyJSR1dfUE9PTF9QUkVGSVgiXSwKICAgICAgICAgICAgICAg + ICAgICB9LAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApCiAgICAgICAgICAgIGpzb25f b3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6 - ICJjZXBoLXJndyIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiU3RvcmFnZUNsYXNzIiwK - ICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgImVu - ZHBvaW50Ijogc2VsZi5vdXRfbWFwWyJSR1dfRU5EUE9JTlQiXSwKICAgICAgICAgICAgICAgICAg - ICAgICAgInBvb2xQcmVmaXgiOiBzZWxmLm91dF9tYXBbIlJHV19QT09MX1BSRUZJWCJdLAogICAg - ICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAg - ICAgICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAg - ICAgICJuYW1lIjogInJndy1hZG1pbi1vcHMtdXNlciIsCiAgICAgICAgICAgICAgICAgICAgImtp - bmQiOiAiU2VjcmV0IiwKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAg - ICAgICAgICAgICAgImFjY2Vzc0tleSI6IHNlbGYub3V0X21hcFsiUkdXX0FETUlOX09QU19VU0VS - X0FDQ0VTU19LRVkiXSwKICAgICAgICAgICAgICAgICAgICAgICAgInNlY3JldEtleSI6IHNlbGYu - b3V0X21hcFsiUkdXX0FETUlOX09QU19VU0VSX1NFQ1JFVF9LRVkiXSwKICAgICAgICAgICAgICAg - ICAgICB9LAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApCiAgICAgICAgIyBpZiAnUkdX - X1RMU19DRVJUJyBleGlzdHMsIHRoZW4gb25seSBhZGQgdGhlICJjZXBoLXJndy10bHMtY2VydCIg - c2VjcmV0CiAgICAgICAgaWYgc2VsZi5vdXRfbWFwWyJSR1dfVExTX0NFUlQiXToKICAgICAgICAg - ICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAg - ICJuYW1lIjogImNlcGgtcmd3LXRscy1jZXJ0IiwKICAgICAgICAgICAgICAgICAgICAia2luZCI6 - ICJTZWNyZXQiLAogICAgICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAgICAgICAg - ICAgICAgICAiY2VydCI6IHNlbGYub3V0X21hcFsiUkdXX1RMU19DRVJUIl0sCiAgICAgICAgICAg - ICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKQoKICAgICAgICByZXR1 - cm4ganNvbi5kdW1wcyhqc29uX291dCkgKyBMSU5FU0VQCgogICAgZGVmIHVwZ3JhZGVfdXNlcnNf - cGVybWlzc2lvbnMoc2VsZik6CiAgICAgICAgdXNlcnMgPSBbCiAgICAgICAgICAgICJjbGllbnQu - Y3NpLWNlcGhmcy1ub2RlIiwKICAgICAgICAgICAgImNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lv - bmVyIiwKICAgICAgICAgICAgImNsaWVudC5jc2ktcmJkLW5vZGUiLAogICAgICAgICAgICAiY2xp - ZW50LmNzaS1yYmQtcHJvdmlzaW9uZXIiLAogICAgICAgICAgICAiY2xpZW50LmhlYWx0aGNoZWNr - ZXIiLAogICAgICAgIF0KICAgICAgICBpZiBzZWxmLnJ1bl9hc191c2VyICE9ICIiIGFuZCBzZWxm - LnJ1bl9hc191c2VyIG5vdCBpbiB1c2VyczoKICAgICAgICAgICAgdXNlcnMuYXBwZW5kKHNlbGYu - cnVuX2FzX3VzZXIpCiAgICAgICAgZm9yIHVzZXIgaW4gdXNlcnM6CiAgICAgICAgICAgIHNlbGYu - dXBncmFkZV91c2VyX3Blcm1pc3Npb25zKHVzZXIpCgogICAgZGVmIGdldF9yZ3dfcG9vbF9uYW1l - X2R1cmluZ191cGdyYWRlKHNlbGYsIHVzZXIsIGNhcHMpOgogICAgICAgIGlmIHVzZXIgPT0gImNs - aWVudC5oZWFsdGhjaGVja2VyIjoKICAgICAgICAgICAgIyB3aGVuIGFkbWluIGhhcyBub3QgcHJv - dmlkZWQgcmd3IHBvb2wgbmFtZSBkdXJpbmcgdXBncmFkZSwKICAgICAgICAgICAgIyBnZXQgdGhl - IHJndyBwb29sIG5hbWUgZnJvbSBjbGllbnQuaGVhbHRoY2hlY2tlciB1c2VyIHdoaWNoIHdhcyB1 - c2VkIGR1cmluZyBjb25uZWN0aW9uCiAgICAgICAgICAgIGlmIG5vdCBzZWxmLl9hcmdfcGFyc2Vy - LnJnd19wb29sX3ByZWZpeDoKICAgICAgICAgICAgICAgICMgVG8gZ2V0IHZhbHVlICdkZWZhdWx0 - JyB3aGljaCBpcyByZ3cgcG9vbCBuYW1lIGZyb20gJ2FsbG93IHJ3eCBwb29sPWRlZmF1bHQucmd3 - Lm1ldGEnCiAgICAgICAgICAgICAgICBwYXR0ZXJuID0gciJwb29sPSguKj8pXC5yZ3dcLm1ldGEi - CiAgICAgICAgICAgICAgICBtYXRjaCA9IHJlLnNlYXJjaChwYXR0ZXJuLCBjYXBzKQogICAgICAg - ICAgICAgICAgaWYgbWF0Y2g6CiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5y - Z3dfcG9vbF9wcmVmaXggPSBtYXRjaC5ncm91cCgxKQogICAgICAgICAgICAgICAgZWxzZToKICAg - ICAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAg - ICAgICAgICAgICAgICAgICAiZmFpbGVkIHRvIGdldCByZ3cgcG9vbCBuYW1lIGZvciB1cGdyYWRl - IgogICAgICAgICAgICAgICAgICAgICkKCiAgICBkZWYgdXBncmFkZV91c2VyX3Blcm1pc3Npb25z - KHNlbGYsIHVzZXIpOgogICAgICAgICMgY2hlY2sgd2hldGhlciB0aGUgZ2l2ZW4gdXNlciBleGlz - dHMgb3Igbm90CiAgICAgICAgY21kX2pzb24gPSB7InByZWZpeCI6ICJhdXRoIGdldCIsICJlbnRp - dHkiOiBmInt1c2VyfSIsICJmb3JtYXQiOiAianNvbiJ9CiAgICAgICAgcmV0X3ZhbCwganNvbl9v - dXQsIGVycl9tc2cgPSBzZWxmLl9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAg - IGlmIHJldF92YWwgIT0gMCBvciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHByaW50 - KGYidXNlciB7dXNlcn0gbm90IGZvdW5kIGZvciB1cGdyYWRpbmcuIikKICAgICAgICAgICAgcmV0 - dXJuCiAgICAgICAgZXhpc3RpbmdfY2FwcyA9IGpzb25fb3V0WzBdWyJjYXBzIl0KICAgICAgICBz - ZWxmLmdldF9yZ3dfcG9vbF9uYW1lX2R1cmluZ191cGdyYWRlKHVzZXIsIHN0cihleGlzdGluZ19j - YXBzKSkKICAgICAgICBuZXdfY2FwLCBfID0gc2VsZi5nZXRfY2Fwc19hbmRfZW50aXR5KHVzZXIp - CiAgICAgICAgY2FwX2tleXMgPSBbIm1vbiIsICJtZ3IiLCAib3NkIiwgIm1kcyJdCiAgICAgICAg - Y2FwcyA9IFtdCiAgICAgICAgZm9yIGVhY2hDYXAgaW4gY2FwX2tleXM6CiAgICAgICAgICAgIGN1 - cl9jYXBfdmFsdWVzID0gZXhpc3RpbmdfY2Fwcy5nZXQoZWFjaENhcCwgIiIpCiAgICAgICAgICAg - IG5ld19jYXBfdmFsdWVzID0gbmV3X2NhcC5nZXQoZWFjaENhcCwgIiIpCiAgICAgICAgICAgIGN1 - cl9jYXBfcGVybV9saXN0ID0gWwogICAgICAgICAgICAgICAgeC5zdHJpcCgpIGZvciB4IGluIGN1 - cl9jYXBfdmFsdWVzLnNwbGl0KCIsIikgaWYgeC5zdHJpcCgpCiAgICAgICAgICAgIF0KICAgICAg - ICAgICAgbmV3X2NhcF9wZXJtX2xpc3QgPSBbCiAgICAgICAgICAgICAgICB4LnN0cmlwKCkgZm9y - IHggaW4gbmV3X2NhcF92YWx1ZXMuc3BsaXQoIiwiKSBpZiB4LnN0cmlwKCkKICAgICAgICAgICAg - XQogICAgICAgICAgICAjIGFwcGVuZCBuZXdfY2FwX2xpc3QgdG8gY3VyX2NhcF9saXN0IHRvIG1h - aW50YWluIHRoZSBvcmRlciBvZiBjYXBzCiAgICAgICAgICAgIGN1cl9jYXBfcGVybV9saXN0LmV4 - dGVuZChuZXdfY2FwX3Blcm1fbGlzdCkKICAgICAgICAgICAgIyBlbGltaW5hdGUgZHVwbGljYXRl - cyB3aXRob3V0IHVzaW5nICdzZXQnCiAgICAgICAgICAgICMgc2V0IHJlLW9yZGVycyBpdGVtcyBp - biB0aGUgbGlzdCBhbmQgd2UgaGF2ZSB0byBrZWVwIHRoZSBvcmRlcgogICAgICAgICAgICBuZXdf - Y2FwX2xpc3QgPSBbXQogICAgICAgICAgICBbbmV3X2NhcF9saXN0LmFwcGVuZCh4KSBmb3IgeCBp - biBjdXJfY2FwX3Blcm1fbGlzdCBpZiB4IG5vdCBpbiBuZXdfY2FwX2xpc3RdCiAgICAgICAgICAg - IGV4aXN0aW5nX2NhcHNbZWFjaENhcF0gPSAiLCAiLmpvaW4obmV3X2NhcF9saXN0KQogICAgICAg - ICAgICBpZiBleGlzdGluZ19jYXBzW2VhY2hDYXBdOgogICAgICAgICAgICAgICAgY2Fwcy5hcHBl - bmQoZWFjaENhcCkKICAgICAgICAgICAgICAgIGNhcHMuYXBwZW5kKGV4aXN0aW5nX2NhcHNbZWFj - aENhcF0pCiAgICAgICAgY21kX2pzb24gPSB7CiAgICAgICAgICAgICJwcmVmaXgiOiAiYXV0aCBj - YXBzIiwKICAgICAgICAgICAgImVudGl0eSI6IHVzZXIsCiAgICAgICAgICAgICJjYXBzIjogY2Fw - cywKICAgICAgICAgICAgImZvcm1hdCI6ICJqc29uIiwKICAgICAgICB9CiAgICAgICAgcmV0X3Zh - bCwganNvbl9vdXQsIGVycl9tc2cgPSBzZWxmLl9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29u - KQogICAgICAgIGlmIHJldF92YWwgIT0gMDoKICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFp - bHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgIGYiJ2F1dGggY2FwcyB7dXNlcn0nIGNvbW1h - bmQgZmFpbGVkLlxuIEVycm9yOiB7ZXJyX21zZ30iCiAgICAgICAgICAgICkKICAgICAgICBwcmlu - dChmIlVwZGF0ZWQgdXNlciB7dXNlcn0gc3VjY2Vzc2Z1bGx5LiIpCgogICAgZGVmIG1haW4oc2Vs - Zik6CiAgICAgICAgZ2VuZXJhdGVkX291dHB1dCA9ICIiCiAgICAgICAgaWYgc2VsZi5fYXJnX3Bh - cnNlci51cGdyYWRlOgogICAgICAgICAgICBzZWxmLnVwZ3JhZGVfdXNlcnNfcGVybWlzc2lvbnMo - KQogICAgICAgIGVsaWYgc2VsZi5fYXJnX3BhcnNlci5mb3JtYXQgPT0gImpzb24iOgogICAgICAg - ICAgICBnZW5lcmF0ZWRfb3V0cHV0ID0gc2VsZi5nZW5fanNvbl9vdXQoKQogICAgICAgIGVsaWYg - c2VsZi5fYXJnX3BhcnNlci5mb3JtYXQgPT0gImJhc2giOgogICAgICAgICAgICBnZW5lcmF0ZWRf - b3V0cHV0ID0gc2VsZi5nZW5fc2hlbGxfb3V0KCkKICAgICAgICBlbHNlOgogICAgICAgICAgICBy - YWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgZiJVbnN1cHBv - cnRlZCBmb3JtYXQ6IHtzZWxmLl9hcmdfcGFyc2VyLmZvcm1hdH0iCiAgICAgICAgICAgICkKICAg - ICAgICBwcmludChnZW5lcmF0ZWRfb3V0cHV0KQogICAgICAgIGlmIHNlbGYub3V0cHV0X2ZpbGUg - YW5kIGdlbmVyYXRlZF9vdXRwdXQ6CiAgICAgICAgICAgIGZPdXQgPSBvcGVuKHNlbGYub3V0cHV0 - X2ZpbGUsIG1vZGU9InciLCBlbmNvZGluZz0iVVRGLTgiKQogICAgICAgICAgICBmT3V0LndyaXRl - KGdlbmVyYXRlZF9vdXRwdXQpCiAgICAgICAgICAgIGZPdXQuY2xvc2UoKQoKCiMjIyMjIyMjIyMj - IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIyMjIyMjIyMjIyMjIyMjIyMj - IyMgTUFJTiAjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj - IyMjIyMjIyMjIyMjIyMjIyMjIyMjCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICByak9i - aiA9IFJhZG9zSlNPTigpCiAgICB0cnk6CiAgICAgICAgcmpPYmoubWFpbigpCiAgICBleGNlcHQg - RXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbiBhcyBlcnI6CiAgICAgICAgcHJpbnQoZiJFeGVjdXRp - b24gRmFpbGVkOiB7ZXJyfSIpCiAgICAgICAgcmFpc2UgZXJyCiAgICBleGNlcHQgS2V5RXJyb3Ig - YXMga0VycjoKICAgICAgICBwcmludChmIktleUVycm9yOiB7a0Vycn0iKQogICAgZXhjZXB0IE9T - RXJyb3IgYXMgb3NFcnI6CiAgICAgICAgcHJpbnQoZiJFcnJvciB3aGlsZSB0cnlpbmcgdG8gb3V0 - cHV0IHRoZSBkYXRhOiB7b3NFcnJ9IikKICAgIGZpbmFsbHk6CiAgICAgICAgcmpPYmouc2h1dGRv - d24oKQo= + ICJyZ3ctYWRtaW4tb3BzLXVzZXIiLAogICAgICAgICAgICAgICAgICAgICJraW5kIjogIlNlY3Jl + dCIsCiAgICAgICAgICAgICAgICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAg + ICJhY2Nlc3NLZXkiOiBzZWxmLm91dF9tYXBbIlJHV19BRE1JTl9PUFNfVVNFUl9BQ0NFU1NfS0VZ + Il0sCiAgICAgICAgICAgICAgICAgICAgICAgICJzZWNyZXRLZXkiOiBzZWxmLm91dF9tYXBbIlJH + V19BRE1JTl9PUFNfVVNFUl9TRUNSRVRfS0VZIl0sCiAgICAgICAgICAgICAgICAgICAgfSwKICAg + ICAgICAgICAgICAgIH0KICAgICAgICAgICAgKQogICAgICAgICMgaWYgJ1JHV19UTFNfQ0VSVCcg + ZXhpc3RzLCB0aGVuIG9ubHkgYWRkIHRoZSAiY2VwaC1yZ3ctdGxzLWNlcnQiIHNlY3JldAogICAg + ICAgIGlmIHNlbGYub3V0X21hcFsiUkdXX1RMU19DRVJUIl06CiAgICAgICAgICAgIGpzb25fb3V0 + LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJj + ZXBoLXJndy10bHMtY2VydCIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiU2VjcmV0IiwK + ICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgImNl + cnQiOiBzZWxmLm91dF9tYXBbIlJHV19UTFNfQ0VSVCJdLAogICAgICAgICAgICAgICAgICAgIH0s + CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKCiAgICAgICAgcmV0dXJuIGpzb24uZHVt + cHMoanNvbl9vdXQpICsgTElORVNFUAoKICAgIGRlZiB1cGdyYWRlX3VzZXJzX3Blcm1pc3Npb25z + KHNlbGYpOgogICAgICAgIHVzZXJzID0gWwogICAgICAgICAgICAiY2xpZW50LmNzaS1jZXBoZnMt + bm9kZSIsCiAgICAgICAgICAgICJjbGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciIsCiAgICAg + ICAgICAgICJjbGllbnQuY3NpLXJiZC1ub2RlIiwKICAgICAgICAgICAgImNsaWVudC5jc2ktcmJk + LXByb3Zpc2lvbmVyIiwKICAgICAgICAgICAgImNsaWVudC5oZWFsdGhjaGVja2VyIiwKICAgICAg + ICBdCiAgICAgICAgaWYgc2VsZi5ydW5fYXNfdXNlciAhPSAiIiBhbmQgc2VsZi5ydW5fYXNfdXNl + ciBub3QgaW4gdXNlcnM6CiAgICAgICAgICAgIHVzZXJzLmFwcGVuZChzZWxmLnJ1bl9hc191c2Vy + KQogICAgICAgIGZvciB1c2VyIGluIHVzZXJzOgogICAgICAgICAgICBzZWxmLnVwZ3JhZGVfdXNl + cl9wZXJtaXNzaW9ucyh1c2VyKQoKICAgIGRlZiBnZXRfcmd3X3Bvb2xfbmFtZV9kdXJpbmdfdXBn + cmFkZShzZWxmLCB1c2VyLCBjYXBzKToKICAgICAgICBpZiB1c2VyID09ICJjbGllbnQuaGVhbHRo + Y2hlY2tlciI6CiAgICAgICAgICAgICMgd2hlbiBhZG1pbiBoYXMgbm90IHByb3ZpZGVkIHJndyBw + b29sIG5hbWUgZHVyaW5nIHVwZ3JhZGUsCiAgICAgICAgICAgICMgZ2V0IHRoZSByZ3cgcG9vbCBu + YW1lIGZyb20gY2xpZW50LmhlYWx0aGNoZWNrZXIgdXNlciB3aGljaCB3YXMgdXNlZCBkdXJpbmcg + Y29ubmVjdGlvbgogICAgICAgICAgICBpZiBub3Qgc2VsZi5fYXJnX3BhcnNlci5yZ3dfcG9vbF9w + cmVmaXg6CiAgICAgICAgICAgICAgICAjIFRvIGdldCB2YWx1ZSAnZGVmYXVsdCcgd2hpY2ggaXMg + cmd3IHBvb2wgbmFtZSBmcm9tICdhbGxvdyByd3ggcG9vbD1kZWZhdWx0LnJndy5tZXRhJwogICAg + ICAgICAgICAgICAgcGF0dGVybiA9IHIicG9vbD0oLio/KVwucmd3XC5tZXRhIgogICAgICAgICAg + ICAgICAgbWF0Y2ggPSByZS5zZWFyY2gocGF0dGVybiwgY2FwcykKICAgICAgICAgICAgICAgIGlm + IG1hdGNoOgogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3Bvb2xfcHJl + Zml4ID0gbWF0Y2guZ3JvdXAoMSkKICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAg + ICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAg + ICAgICAgImZhaWxlZCB0byBnZXQgcmd3IHBvb2wgbmFtZSBmb3IgdXBncmFkZSIKICAgICAgICAg + ICAgICAgICAgICApCgogICAgZGVmIHVwZ3JhZGVfdXNlcl9wZXJtaXNzaW9ucyhzZWxmLCB1c2Vy + KToKICAgICAgICAjIGNoZWNrIHdoZXRoZXIgdGhlIGdpdmVuIHVzZXIgZXhpc3RzIG9yIG5vdAog + ICAgICAgIGNtZF9qc29uID0geyJwcmVmaXgiOiAiYXV0aCBnZXQiLCAiZW50aXR5IjogZiJ7dXNl + cn0iLCAiZm9ybWF0IjogImpzb24ifQogICAgICAgIHJldF92YWwsIGpzb25fb3V0LCBlcnJfbXNn + ID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRfanNvbikKICAgICAgICBpZiByZXRfdmFs + ICE9IDAgb3IgbGVuKGpzb25fb3V0KSA9PSAwOgogICAgICAgICAgICBwcmludChmInVzZXIge3Vz + ZXJ9IG5vdCBmb3VuZCBmb3IgdXBncmFkaW5nLiIpCiAgICAgICAgICAgIHJldHVybgogICAgICAg + IGV4aXN0aW5nX2NhcHMgPSBqc29uX291dFswXVsiY2FwcyJdCiAgICAgICAgc2VsZi5nZXRfcmd3 + X3Bvb2xfbmFtZV9kdXJpbmdfdXBncmFkZSh1c2VyLCBzdHIoZXhpc3RpbmdfY2FwcykpCiAgICAg + ICAgbmV3X2NhcCwgXyA9IHNlbGYuZ2V0X2NhcHNfYW5kX2VudGl0eSh1c2VyKQogICAgICAgIGNh + cF9rZXlzID0gWyJtb24iLCAibWdyIiwgIm9zZCIsICJtZHMiXQogICAgICAgIGNhcHMgPSBbXQog + ICAgICAgIGZvciBlYWNoQ2FwIGluIGNhcF9rZXlzOgogICAgICAgICAgICBjdXJfY2FwX3ZhbHVl + cyA9IGV4aXN0aW5nX2NhcHMuZ2V0KGVhY2hDYXAsICIiKQogICAgICAgICAgICBuZXdfY2FwX3Zh + bHVlcyA9IG5ld19jYXAuZ2V0KGVhY2hDYXAsICIiKQogICAgICAgICAgICBjdXJfY2FwX3Blcm1f + bGlzdCA9IFsKICAgICAgICAgICAgICAgIHguc3RyaXAoKSBmb3IgeCBpbiBjdXJfY2FwX3ZhbHVl + cy5zcGxpdCgiLCIpIGlmIHguc3RyaXAoKQogICAgICAgICAgICBdCiAgICAgICAgICAgIG5ld19j + YXBfcGVybV9saXN0ID0gWwogICAgICAgICAgICAgICAgeC5zdHJpcCgpIGZvciB4IGluIG5ld19j + YXBfdmFsdWVzLnNwbGl0KCIsIikgaWYgeC5zdHJpcCgpCiAgICAgICAgICAgIF0KICAgICAgICAg + ICAgIyBhcHBlbmQgbmV3X2NhcF9saXN0IHRvIGN1cl9jYXBfbGlzdCB0byBtYWludGFpbiB0aGUg + b3JkZXIgb2YgY2FwcwogICAgICAgICAgICBjdXJfY2FwX3Blcm1fbGlzdC5leHRlbmQobmV3X2Nh + cF9wZXJtX2xpc3QpCiAgICAgICAgICAgICMgZWxpbWluYXRlIGR1cGxpY2F0ZXMgd2l0aG91dCB1 + c2luZyAnc2V0JwogICAgICAgICAgICAjIHNldCByZS1vcmRlcnMgaXRlbXMgaW4gdGhlIGxpc3Qg + YW5kIHdlIGhhdmUgdG8ga2VlcCB0aGUgb3JkZXIKICAgICAgICAgICAgbmV3X2NhcF9saXN0ID0g + W10KICAgICAgICAgICAgW25ld19jYXBfbGlzdC5hcHBlbmQoeCkgZm9yIHggaW4gY3VyX2NhcF9w + ZXJtX2xpc3QgaWYgeCBub3QgaW4gbmV3X2NhcF9saXN0XQogICAgICAgICAgICBleGlzdGluZ19j + YXBzW2VhY2hDYXBdID0gIiwgIi5qb2luKG5ld19jYXBfbGlzdCkKICAgICAgICAgICAgaWYgZXhp + c3RpbmdfY2Fwc1tlYWNoQ2FwXToKICAgICAgICAgICAgICAgIGNhcHMuYXBwZW5kKGVhY2hDYXAp + CiAgICAgICAgICAgICAgICBjYXBzLmFwcGVuZChleGlzdGluZ19jYXBzW2VhY2hDYXBdKQogICAg + ICAgIGNtZF9qc29uID0gewogICAgICAgICAgICAicHJlZml4IjogImF1dGggY2FwcyIsCiAgICAg + ICAgICAgICJlbnRpdHkiOiB1c2VyLAogICAgICAgICAgICAiY2FwcyI6IGNhcHMsCiAgICAgICAg + ICAgICJmb3JtYXQiOiAianNvbiIsCiAgICAgICAgfQogICAgICAgIHJldF92YWwsIGpzb25fb3V0 + LCBlcnJfbXNnID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRfanNvbikKICAgICAgICBp + ZiByZXRfdmFsICE9IDA6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRp + b24oCiAgICAgICAgICAgICAgICBmIidhdXRoIGNhcHMge3VzZXJ9JyBjb21tYW5kIGZhaWxlZC5c + biBFcnJvcjoge2Vycl9tc2d9IgogICAgICAgICAgICApCiAgICAgICAgcHJpbnQoZiJVcGRhdGVk + IHVzZXIge3VzZXJ9IHN1Y2Nlc3NmdWxseS4iKQoKICAgIGRlZiBtYWluKHNlbGYpOgogICAgICAg + IGdlbmVyYXRlZF9vdXRwdXQgPSAiIgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIudXBncmFk + ZToKICAgICAgICAgICAgc2VsZi51cGdyYWRlX3VzZXJzX3Blcm1pc3Npb25zKCkKICAgICAgICBl + bGlmIHNlbGYuX2FyZ19wYXJzZXIuZm9ybWF0ID09ICJqc29uIjoKICAgICAgICAgICAgZ2VuZXJh + dGVkX291dHB1dCA9IHNlbGYuZ2VuX2pzb25fb3V0KCkKICAgICAgICBlbGlmIHNlbGYuX2FyZ19w + YXJzZXIuZm9ybWF0ID09ICJiYXNoIjoKICAgICAgICAgICAgZ2VuZXJhdGVkX291dHB1dCA9IHNl + bGYuZ2VuX3NoZWxsX291dCgpCiAgICAgICAgZWxzZToKICAgICAgICAgICAgcmFpc2UgRXhlY3V0 + aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgIGYiVW5zdXBwb3J0ZWQgZm9ybWF0 + OiB7c2VsZi5fYXJnX3BhcnNlci5mb3JtYXR9IgogICAgICAgICAgICApCiAgICAgICAgcHJpbnQo + Z2VuZXJhdGVkX291dHB1dCkKICAgICAgICBpZiBzZWxmLm91dHB1dF9maWxlIGFuZCBnZW5lcmF0 + ZWRfb3V0cHV0OgogICAgICAgICAgICBmT3V0ID0gb3BlbihzZWxmLm91dHB1dF9maWxlLCBtb2Rl + PSJ3IiwgZW5jb2Rpbmc9IlVURi04IikKICAgICAgICAgICAgZk91dC53cml0ZShnZW5lcmF0ZWRf + b3V0cHV0KQogICAgICAgICAgICBmT3V0LmNsb3NlKCkKCgojIyMjIyMjIyMjIyMjIyMjIyMjIyMj + IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIE1BSU4gIyMj + IyMjIyMjIyMjIyMjIyMjIyMjCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj + IyMjIyMjIyMjIwppZiBfX25hbWVfXyA9PSAiX19tYWluX18iOgogICAgcmpPYmogPSBSYWRvc0pT + T04oKQogICAgdHJ5OgogICAgICAgIHJqT2JqLm1haW4oKQogICAgZXhjZXB0IEV4ZWN1dGlvbkZh + aWx1cmVFeGNlcHRpb24gYXMgZXJyOgogICAgICAgIHByaW50KGYiRXhlY3V0aW9uIEZhaWxlZDog + e2Vycn0iKQogICAgICAgIHJhaXNlIGVycgogICAgZXhjZXB0IEtleUVycm9yIGFzIGtFcnI6CiAg + ICAgICAgcHJpbnQoZiJLZXlFcnJvcjoge2tFcnJ9IikKICAgIGV4Y2VwdCBPU0Vycm9yIGFzIG9z + RXJyOgogICAgICAgIHByaW50KGYiRXJyb3Igd2hpbGUgdHJ5aW5nIHRvIG91dHB1dCB0aGUgZGF0 + YToge29zRXJyfSIpCiAgICBmaW5hbGx5OgogICAgICAgIHJqT2JqLnNodXRkb3duKCkK kind: ConfigMap metadata: name: rook-ceph-external-cluster-script-config diff --git a/build/csv/ceph/rook-ceph-operator.clusterserviceversion.yaml b/build/csv/ceph/rook-ceph-operator.clusterserviceversion.yaml index f8db3f5e62a1..fe419bffa43a 100644 --- a/build/csv/ceph/rook-ceph-operator.clusterserviceversion.yaml +++ b/build/csv/ceph/rook-ceph-operator.clusterserviceversion.yaml @@ -277,1473 +277,1466 @@ metadata: bGxvdyByLCBhbGxvdyBjb21tYW5kIHF1b3J1bV9zdGF0dXMiLCAib3NkIiwgInByb2ZpbGUgcmJk LXJlYWQtb25seSwgYWxsb3cgcnd4IHBvb2w9ZGVmYXVsdC5yZ3cubWV0YSwgYWxsb3cgciBwb29s PS5yZ3cucm9vdCwgYWxsb3cgcncgcG9vbD1kZWZhdWx0LnJndy5jb250cm9sLCBhbGxvdyB4IHBv - b2w9ZGVmYXVsdC5yZ3cuYnVja2V0cy5pbmRleCJdLCAiZW50aXR5IjogImNsaWVudC5oZWFsdGhj - aGVja2VyIiwgImZvcm1hdCI6ICJqc29uIiwgInByZWZpeCI6ICJhdXRoIGdldC1vci1jcmVhdGUi - fSIiIgogICAgICAgIF0gPSAiIiJbeyJlbnRpdHkiOiJjbGllbnQuaGVhbHRoY2hlY2tlciIsImtl - eSI6IkFRREZrYk5lZnQ1YkZSQUFUbmRMTlVTRUtydW96eGlaaTNscmRBPT0iLCJjYXBzIjp7Im1v - biI6ImFsbG93IHIsIGFsbG93IGNvbW1hbmQgcXVvcnVtX3N0YXR1cyIsIm9zZCI6InByb2ZpbGUg - cmJkLXJlYWQtb25seSwgYWxsb3cgcnd4IHBvb2w9ZGVmYXVsdC5yZ3cubWV0YSwgYWxsb3cgciBw - b29sPS5yZ3cucm9vdCwgYWxsb3cgcncgcG9vbD1kZWZhdWx0LnJndy5jb250cm9sLCBhbGxvdyB4 - IHBvb2w9ZGVmYXVsdC5yZ3cuYnVja2V0cy5pbmRleCJ9fV0iIiIKICAgICAgICBzZWxmLmNtZF9v - dXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7ImNhcHMiOiBbIm1vbiIsICJwcm9maW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ICJhdXRoIGdldC1vci1jcmVhdGUifSIiIgogICAgICAgIF0gPSAiIiJbeyJlbnRpdHkiOiJj + bGllbnQuY3NpLXJiZC1wcm92aXNpb25lciIsImtleSI6IkFRQk5nck5lMWdleUt4QUE4ZWtWaVJk + RStoc3M1T3dlWUJrd05nPT0iLCJjYXBzIjp7Im1nciI6ImFsbG93IHJ3IiwibW9uIjoicHJvZmls + ZSByYmQsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xpc3QnIiwib3NkIjoicHJvZmlsZSByYmQi + fX1dIiIiCiAgICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsKICAgICAgICAgICAgIiIieyJjYXBz + IjogWyJtb24iLCAiYWxsb3cgciwgYWxsb3cgY29tbWFuZCAnb3NkIGJsb2NrbGlzdCciLCAibWdy + IiwgImFsbG93IHJ3IiwgIm9zZCIsICJhbGxvdyBydyB0YWcgY2VwaGZzICo9KiIsICJtZHMiLCAi + YWxsb3cgcnciXSwgImVudGl0eSI6ICJjbGllbnQuY3NpLWNlcGhmcy1ub2RlIiwgImZvcm1hdCI6 + ICJqc29uIiwgInByZWZpeCI6ICJhdXRoIGdldC1vci1jcmVhdGUifSIiIgogICAgICAgIF0gPSAi + IiJbeyJlbnRpdHkiOiJjbGllbnQuY3NpLWNlcGhmcy1ub2RlIiwia2V5IjoiQVFCT2dyTmVFTnVu + S3hBQVBDbWdFN1I2RzhEY1huYUoxRjMycWc9PSIsImNhcHMiOnsibWRzIjoiYWxsb3cgcnciLCJt + Z3IiOiJhbGxvdyBydyIsIm1vbiI6ImFsbG93IHIsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xp + c3QnIiwib3NkIjoiYWxsb3cgcncgdGFnIGNlcGhmcyAqPSoifX1dIiIiCiAgICAgICAgc2VsZi5j + bWRfb3V0cHV0X21hcFsKICAgICAgICAgICAgIiIieyJjYXBzIjogWyJtb24iLCAiYWxsb3cgciwg + YWxsb3cgY29tbWFuZCAnb3NkIGJsb2Nr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dyByd3gg - cG9vbD1kZWZhdWx0LnJndy5tZXRhLCBhbGxvdyByIHBvb2w9LnJndy5yb290LCBhbGxvdyBydyBw - b29sPWRlZmF1bHQucmd3LmNvbnRyb2wsIGFsbG93IHJ4IHBvb2w9ZGVmYXVsdC5yZ3cubG9nLCBh - bGxvdyB4IHBvb2w9ZGVmYXVsdC5yZ3cuYnVja2V0cy5pbmRleCJ9fV0iIiIKICAgICAgICBzZWxm - LmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7ImVudGl0eSI6ICJjbGllbnQuY3NpLWNl - cGhmcy1ub2RlIiwgImZvcm1hdCI6ICJqc29uIiwgInByZWZpeCI6ICJhdXRoIGdldCJ9IiIiCiAg - ICAgICAgXSA9ICIiIltdIiIiCiAgICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsKICAgICAgICAg - ICAgIiIieyJlbnRpdHkiOiAiY2xpZW50LmNzaS1yYmQtbm9kZSIsICJmb3JtYXQiOiAianNvbiIs - ICJwcmVmaXgiOiAiYXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJbXSIiIgogICAgICAgIHNl - bGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiZW50aXR5IjogImNsaWVudC5jc2kt - cmJkLXByb3Zpc2lvbmVyIiwgImZvcm1hdCI6ICJqc29uIiwgInByZWZpeCI6ICJhdXRoIGdldCJ9 - IiIiCiAgICAgICAgXSA9ICIiIltdIiIiCiAgICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsKICAg - ICAgICAgICAgIiIieyJlbnRpdHkiOiAiY2xpZW50LmNzaS1jZXBoZnMtcHJvdmlzaW9uZXIiLCAi - Zm9ybWF0IjogImpzb24iLCAicHJlZml4IjogImF1dGggZ2V0In0iIiIKICAgICAgICBdID0gIiIi - W10iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7ImVudGl0 - eSI6ICJjbGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lci1vcGVuc2hpZnQtc3RvcmFnZSIsICJm - b3JtYXQiOiAianNvbiIsICJwcmVmaXgiOiAiYXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJb - XSIiIgogICAgICAgIHNlbGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiZW50aXR5 - IjogImNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lvbmVyLW9wZW5zaGlmdC1zdG9yYWdlLW15ZnMi - LCAiZm9ybWF0IjogImpzb24iLCAicHJlZml4IjogImF1dGggZ2V0In0iIiIKICAgICAgICBdID0g - IiIiW10iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7ImVu - dGl0eSI6ICJjbGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciIsICJmb3JtYXQiOiAianNvbiIs - ICJwcmVmaXgiOiAiYXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJbeyJlbnRpdHkiOiJjbGll - bnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciIsImtleSI6IkFRREZrYk5lZnQ1YkZSQUFUbmRMTlVT - RUtydW96eGlaaTNscmRBPT0iLCJjYXBzIjp7Im1vbiI6ImFsbG93IHIiLCAibWdyIjoiYWxsb3cg - cnciLCAib3NkIjoiYWxsb3cgcncgdGFnIGNlcGhmcyBtZXRhZGF0YT0qIn19XSIiIgogICAgICAg - IHNlbGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiY2FwcyI6IFsibW9uIiwgImFs - bG93IHIsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xpc3QnIiwgIm1nciIsICJhbGxvdyBydyIs - ICJvc2QiLCAiYWxsb3cgcncgdGFnIGNlcGhmcyBtZXRhZGF0YT0qIl0sICJlbnRpdHkiOiAiY2xp - ZW50LmNzaS1jZXBoZnMtcHJvdmlzaW9uZXIiLCAiZm9ybWF0IjogImpzb24iLCAicHJlZml4Ijog - ImF1dGggY2FwcyJ9IiIiCiAgICAgICAgXSA9ICIiIlt7ImVudGl0eSI6ImNsaWVudC5jc2ktY2Vw - aGZzLXByb3Zpc2lvbmVyIiwia2V5IjoiQVFERmtiTmVmdDViRlJBQVRuZExOVVNFS3J1b3p4aVpp - M2xyZEE9PSIsImNhcHMiOnsibW9uIjoiYWxsb3cgciwgIGFsbG93IGNvbW1hbmQgJ29zZCBibG9j - a2xpc3QnIiwgIm1nciI6ImFsbG93IHJ3IiwgIm9zZCI6ImFsbG93IHJ3IHRhZyBjZXBoZnMgbWV0 - YWRhdGE9KiJ9fV0iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWyd7ImZvcm1hdCI6ICJq - c29uIiwgInByZWZpeCI6ICJzdGF0dXMifSddID0gY2VwaF9zdGF0dXNfc3RyCgogICAgZGVmIHNo - dXRkb3duKHNlbGYpOgogICAgICAgIHBhc3MKCiAgICBkZWYgZ2V0X2ZzaWQoc2VsZik6CiAgICAg - ICAgcmV0dXJuICJhZjRlMTY3My0wYjcyLTQwMmQtOTkwYS0yMmQyOTE5ZDBmMWMiCgogICAgZGVm - IGNvbmZfcmVhZF9maWxlKHNlbGYpOgogICAgICAgIHBhc3MKCiAgICBkZWYgY29ubmVjdChzZWxm - KToKICAgICAgICBwYXNzCgogICAgZGVmIHBvb2xfZXhpc3RzKHNlbGYsIHBvb2xfbmFtZSk6CiAg - ICAgICAgcmV0dXJuIFRydWUKCiAgICBkZWYgbW9uX2NvbW1hbmQoc2VsZiwgY21kLCBvdXQpOgog - ICAgICAgIGpzb25fY21kID0ganNvbi5sb2FkcyhjbWQpCiAgICAgICAganNvbl9jbWRfc3RyID0g - anNvbi5kdW1wcyhqc29uX2NtZCwgc29ydF9rZXlzPVRydWUpCiAgICAgICAgY21kX291dHB1dCA9 - IHNlbGYuY21kX291dHB1dF9tYXBbanNvbl9jbWRfc3RyXQogICAgICAgIHJldHVybiBzZWxmLnJl - dHVybl92YWws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c2cgPSBjYW5vbmljYWxfc3RyaW5nLmVuY29kZSgi - dXRmLTgiKQogICAgICAgIGggPSBobWFjLm5ldyhrZXksIG1zZywgZGlnZXN0bW9kPXNoYSkKICAg - ICAgICByZXR1cm4gZW5jb2Rlc3RyaW5nKGguZGlnZXN0KCkpLnN0cmlwKCkKCiAgICBkZWYgZ2V0 - X2Nhbm9uaWNhbF9zdHJpbmcoc2VsZiwgdXJsLCBoZWFkZXJzLCBtZXRob2QpOgogICAgICAgIHBh - cnNlZHVybCA9IHVybHBhcnNlKHVybCkKICAgICAgICBvYmplY3RrZXkgPSBwYXJzZWR1cmwucGF0 - aFsxOl0KCiAgICAgICAgYnVja2V0ID0gcGFyc2VkdXJsLm5ldGxvY1s6IC1sZW4oc2VsZi5zZXJ2 - aWNlX2Jhc2VfdXJsKV0KICAgICAgICBpZiBsZW4oYnVja2V0KSA+IDE6CiAgICAgICAgICAgICMg - cmVtb3ZlIGxhc3QgZG90CiAgICAgICAgICAgIGJ1Y2tldCA9IGJ1Y2tldFs6LTFdCgogICAgICAg - IGludGVyZXN0aW5nX2hlYWRlcnMgPSB7ImNvbnRlbnQtbWQ1IjogIiIsICJjb250ZW50LXR5cGUi - OiAiIiwgImRhdGUiOiAiIn0KICAgICAgICBmb3Iga2V5IGluIGhlYWRlcnM6CiAgICAgICAgICAg - IGxrID0ga2V5Lmxvd2VyKCkKICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgbGsgPSBs - ay5kZWNvZGUoInV0Zi04IikKICAgICAgICAgICAgZXhjZXB0OgogICAgICAgICAgICAgICAgcGFz - cwogICAgICAgICAgICBpZiBoZWFkZXJzW2tleV0gYW5kICgKICAgICAgICAgICAgICAgIGxrIGlu - IGludGVyZXN0aW5nX2hlYWRlcnMua2V5cygpIG9yIGxrLnN0YXJ0c3dpdGgoIngtYW16LSIpCiAg - ICAgICAgICAgICk6CiAgICAgICAgICAgICAgICBpbnRlcmVzdGluZ19oZWFkZXJzW2xrXSA9IGhl - YWRlcnNba2V5XS5zdHJpcCgpCgogICAgICAgICMgSWYgeC1hbXotZGF0ZSBpcyB1c2VkIGl0IHN1 - cGVyc2VkZXMgdGhlIGRhdGUgaGVhZGVyLgogICAgICAgIGlmICJ4LWFtei1kYXRlIiBpbiBpbnRl - cmVzdGluZ19oZWFkZXJzOgogICAgICAgICAgICBpbnRlcmVzdGluZ19oZWFkZXJzWyJkYXRlIl0g - PSAiIgoKICAgICAgICBidWYgPSBmInttZXRob2R9XG4iCiAgICAgICAgZm9yIGtleSBpbiBzb3J0 - ZWQoaW50ZXJlc3RpbmdfaGVhZGVycy5rZXlzKCkpOgogICAgICAgICAgICB2YWwgPSBpbnRlcmVz - dGluZ19oZWFkZXJzW2tleV0KICAgICAgICAgICAgaWYga2V5LnN0YXJ0c3dpdGgoIngtYW16LSIp - OgogICAgICAgICAgICAgICAgYnVmICs9IGYie2tleX06e3ZhbH1cbiIKICAgICAgICAgICAgZWxz - ZToKICAgICAgICAgICAgICAgIGJ1ZiArPSBmInt2YWx9XG4iCgogICAgICAgICMgYXBwZW5kIHRo - ZSBidWNrZXQgaWYgaXQgZXhpc3RzCiAgICAgICAgaWYgYnVja2V0ICE9ICIiOgogICAgICAgICAg - ICBidWYgKz0gZiIve2J1Y2tldH0iCgogICAgICAgICMgYWRkIHRoZSBvYmplY3RrZXkuIGV2ZW4g - aWYgaXQgZG9lc24ndCBleGlzdCwgYWRkIHRoZSBzbGFzaAogICAgICAgIGJ1ZiArPSBmIi97b2Jq - ZWN0a2V5fSIKCiAgICAgICAgcmV0dXJuIGJ1ZgoKCmNsYXNzIFJhZG9zSlNPTjoKICAgIEVYVEVS - TkFMX1VTRVJfTkFNRSA9ICJjbGllbnQuaGVhbHRoY2hlY2tlciIKICAgIEVYVEVSTkFMX1JHV19B - RE1JTl9PUFNfVVNFUl9OQU1FID0gInJndy1hZG1pbi1vcHMtdXNlciIKICAgIEVNUFRZX09VVFBV - VF9MSVNUID0gIkVtcHR5IG91dHB1dCBs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XR1cywgbXVzdCBiZSBwcmVmaXhl - ZCBieSAnY2xpZW50LiciLAogICAgICAgICkKICAgICAgICBjb21tb25fZ3JvdXAuYWRkX2FyZ3Vt - ZW50KAogICAgICAgICAgICAiLS1jbHVzdGVyLW5hbWUiLAogICAgICAgICAgICBkZWZhdWx0PSIi - LAogICAgICAgICAgICBoZWxwPSJLdWJlcm5ldGVzIGNsdXN0ZXIgbmFtZShsZWdhY3kgZmxhZyks - IE5vdGU6IEVpdGhlciB1c2UgdGhpcyBvciAtLWs4cy1jbHVzdGVyLW5hbWUiLAogICAgICAgICkK - ICAgICAgICBjb21tb25fZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1rOHMtY2x1 - c3Rlci1uYW1lIiwgZGVmYXVsdD0iIiwgaGVscD0iS3ViZXJuZXRlcyBjbHVzdGVyIG5hbWUiCiAg - ICAgICAgKQogICAgICAgIGNvbW1vbl9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICIt - LW5hbWVzcGFjZSIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIGhlbHA9Ik5h - bWVzcGFjZSB3aGVyZSBDZXBoQ2x1c3RlciBpcyBydW5uaW5nIiwKICAgICAgICApCiAgICAgICAg - Y29tbW9uX2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmd3LXBvb2wtcHJlZml4 - IiwgZGVmYXVsdD0iIiwgaGVscD0iUkdXIFBvb2wgcHJlZml4IgogICAgICAgICkKICAgICAgICBj - b21tb25fZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1yZXN0cmljdGVkLWF1dGgt - cGVybWlzc2lvbiIsCiAgICAgICAgICAgIGRlZmF1bHQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9 - IlJlc3RyaWN0IGNlcGhDU0lLZXlyaW5ncyBhdXRoIHBlcm1pc3Npb25zIHRvIHNwZWNpZmljIHBv - b2xzLC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JndW1lbnQo - CiAgICAgICAgICAgICItLXYyLXBvcnQtZW5hYmxlIiwKICAgICAgICAgICAgYWN0aW9uPSJzdG9y - ZV90cnVlIiwKICAgICAgICAgICAgZGVmYXVsdD1GYWxzZSwKICAgICAgICAgICAgaGVscD0iRW5h - YmxlIHYyIG1vbiBwb3J0KDMzMDApIGZvciBtb25zIiwKICAgICAgICApCgogICAgICAgIG91dHB1 - dF9ncm91cCA9IGFyZ1AuYWRkX2FyZ3VtZW50X2dyb3VwKCJvdXRwdXQiKQogICAgICAgIG91dHB1 - dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLWZvcm1hdCIsCiAgICAgICAgICAg - ICItdCIsCiAgICAgICAgICAgIGNob2ljZXM9WyJqc29uIiwgImJhc2giXSwKICAgICAgICAgICAg - ZGVmYXVsdD0ianNvbiIsCiAgICAgICAgICAgIGhlbHA9IlByb3ZpZGVzIHRoZSBvdXRwdXQgZm9y - bWF0IChqc29uIHwgYmFzaCkiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2Fy - Z3VtZW50KAogICAgICAgICAgICAiLS1vdXRwdXQiLAogICAgICAgICAgICAiLW8iLAogICAgICAg - ICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICBoZWxwPSJPdXRwdXQgd2lsbCBiZSBzdG9yZWQg - aW50byB0aGUgcHJvdmlkZWQgZmlsZSIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5h - ZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLWNlcGhmcy1maWxlc3lzdGVtLW5hbWUiLAogICAg - ICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyB0aGUgbmFtZSBv - ZiB0aGUgQ2VwaCBmaWxlc3lzdGVtIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFk - ZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tY2VwaGZzLW1ldGFkYXRhLXBvb2wtbmFtZSIsCiAg - ICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIGhlbHA9IlByb3ZpZGVzIHRoZSBuYW1l - IG9mIHRoZSBjZXBoZnMgbWV0YWRhdGEgcG9vbCIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9n - cm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLWNlcGhmcy1kYXRhLXBvb2wtbmFtZSIs - CiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIGhlbHA9IlByb3ZpZGVzIHRoZSBu - YW1lIG9mIHRoZSBjZXBoZnMgZGF0YSBwb29sIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dy - b3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmJkLWRhdGEtcG9vbC1uYW1lIiwKICAg - ICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAgICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAg - ICAgIGhlbHA9IlByb3ZpZGVzIHRoZSBuYW1lIG9mIHRoZSBSQkQgZGF0YXBvb2wiLAogICAgICAg - ICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1hbGlh - cy1yYmQtZGF0YS1wb29sLW5hbWUiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAg - ICByZXF1aXJlZD1GYWxzZSwKICAgICAgICAgICAgaGVscD0iUHJvdmlkZXMgYW4gYWxpYXMgZm9y - IHRoZSAgUkJEIGRhdGEgcG9vbCBuYW1lLCBuZWNlc3NhcnkgaWYgYSBzcGVjaWFsIGNoYXJhY3Rl - ciBpcyBwcmVzZW50IGluIHRoZSBwb29sIG5hbWUgc3VjaCBhcyBhIHBlcmlvZCBvciB1bmRlcnNj - b3JlIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAg - ICAgICAgIi0tcmd3LWVuZHBvaW50IiwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAg - ICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9IlJBRE9TIEdhdGV3YXkgZW5kcG9p - bnQgKGluIGA8SVB2ND46PFBPUlQ+YCBvciBgPFtJUHY2XT46PFBPUlQ+YCBvciBgPEZRRE4+OjxQ - T1JUPmAgZm9ybWF0KSIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1l - bnQoCiAgICAgICAgICAgICItLXJndy10bHMtY2VydC1wYXRoIiwKICAgICAgICAgICAgZGVmYXVs - dD0iIiwKICAgICAgICAgICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9IlJBRE9T - IEdhdGV3YXkgZW5kcG9pbnQgVExTIGNlcnRpZmljYXRlIiwKICAgICAgICApCiAgICAgICAgb3V0 - cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmd3LXNraXAtdGxzIiwKICAg - ICAgICAgICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAgICAgIGRlZmF1bHQ9RmFsc2UsCiAgICAg - ICAgICAgIGhlbHA9Iklnbm9yZSBUTFMgY2VydGlmaWNhdGlvbiB2YWxpZGF0aW9uIHdoZW4gYSBz - ZWxmLXNpZ25lZCBjZXJ0aWZpY2F0ZSBpcyBwcm92aWRlZCAoTk9UIFJFQ09NTUVOREVEIiwKICAg - ICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0t - bW9uaXRvcmluZy1lbmRwb2ludCIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAg - IHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJDZXBoIE1hbmFnZXIgcHJvbWV0aGV1 - cyBleHBvcnRlciBlbmRwb2ludHMgKGNvbW1hIHNlcGFyYXRlZCBsaXN0IG9mIChmb3JtYXQgYDxJ - UHY0PmAgb3IgYDxbSVB2Nl0+YCBvciBgPEZRRE4+YCkgZW50cmllcyBvZiBhY3RpdmUgYW5kIHN0 - YW5kYnkgbWdycykiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50 - KAogICAgICAgICAgICAiLS1tb25pdG9yaW5nLWVuZHBvaW50LXBvcnQiLAogICAgICAgICAgICBk - ZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxzZSwKICAgICAgICAgICAgaGVscD0i - Q2VwaCBNYW5hZ2VyIHByb21ldGhldXMgZXhwb3J0ZXIgcG9ydCIsCiAgICAgICAgKQogICAgICAg - IG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXNraXAtbW9uaXRvcmlu - Zy1lbmRwb2ludCIsCiAgICAgICAgICAgIGRlZmF1bHQ9RmFsc2UsCiAgICAgICAgICAgIGFjdGlv - bj0ic3RvcmVfdHJ1ZSIsCiAgICAgICAgICAgIGhlbHA9IkRvIG5vdCBjaGVjayBmb3IgYSBtb25p - dG9yaW5nIGVuZHBvaW50IGZvciB0aGUgQ2VwaCBjbHVzdGVyIiwKICAgICAgICApCiAgICAgICAg - b3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmJkLW1ldGFkYXRhLWVj - LXBvb2wtbmFtZSIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVk - PUZhbHNlLAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyB0aGUgbmFtZSBvZiBlcmFzdXJlIGNv - ZGVkIFJCRCBtZXRhZGF0YSBwb29sIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFk - ZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tZHJ5LXJ1biIsCiAgICAgICAg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md3LnJvb3Qs + IGFsbG93IHJ3IHBvb2w9ZGVmYXVsdC5yZ3cuY29udHJvbCwgYWxsb3cgcnggcG9vbD1kZWZhdWx0 + LnJndy5sb2csIGFsbG93IHggcG9vbD1kZWZhdWx0LnJndy5idWNrZXRzLmluZGV4IiwibWRzIjoi + YWxsb3cgKiJ9fV0iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWyIiInsiZm9ybWF0Ijog + Impzb24iLCAicHJlZml4IjogIm1nciBzZXJ2aWNlcyJ9IiIiXSA9ICgKICAgICAgICAgICAgIiIi + eyJkYXNoYm9hcmQiOiAiaHR0cDovL3Jvb2stY2VwaC1tZ3ItYS01N2NmOWY4NGJjLWY0am5sOjcw + MDAvIiwgInByb21ldGhldXMiOiAiaHR0cDovL3Jvb2stY2VwaC1tZ3ItYS01N2NmOWY4NGJjLWY0 + am5sOjkyODMvIn0iIiIKICAgICAgICApCiAgICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsKICAg + ICAgICAgICAgIiIieyJlbnRpdHkiOiAiY2xpZW50LmhlYWx0aGNoZWNrZXIiLCAiZm9ybWF0Ijog + Impzb24iLCAicHJlZml4IjogImF1dGggZ2V0In0iIiIKICAgICAgICBdID0gIiIieyJkYXNoYm9h + cmQiOiAiaHR0cDovL3Jvb2stY2VwaC1tZ3ItYS01N2NmOWY4NGJjLWY0am5sOjcwMDAvIiwgInBy + b21ldGhldXMiOiAiaHR0cDovL3Jvb2stY2VwaC1tZ3ItYS01N2NmOWY4NGJjLWY0am5sOjkyODMv + In0iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7ImVudGl0 + eSI6ICJjbGllbnQuaGVhbHRoY2hlY2tlciIsICJmb3JtYXQiOiAianNvbiIsICJwcmVmaXgiOiAi + YXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJbeyJlbnRpdHkiOiJjbGllbnQuaGVhbHRoY2hl + Y2tlciIsImtleSI6IkFRREZrYk5lZnQ1YkZSQUFUbmRMTlVTRUtydW96eGlaaTNscmRBPT0iLCJj + YXBzIjp7Im1vbiI6ICJhbGxvdyByLCBhbGxvdyBjb21tYW5kIHF1b3J1bV9zdGF0dXMsIGFsbG93 + IGNvbW1hbmQgdmVyc2lvbiIsICJtZ3IiOiAiYWxsb3cgY29tbWFuZCBjb25maWciLCAib3NkIjog + InByb2ZpbGUgcmJkLXJlYWQtb25seSwgYWxsb3cgcnd4IHBvb2w9ZGVmYXVsdC5yZ3cubWV0YSwg + YWxsb3cgciBwb29sPS5yZ3cucm9vdCwgYWxsb3cgcncgcG9vbD1kZWZhdWx0LnJndy5jb250cm9s + LCBhbGxvdyByeCBwb29sPWRlZmF1bHQucmd3LmxvZywgYWxsb3cgeCBwb29sPWRlZmF1bHQucmd3 + LmJ1Y2tldHMuaW5kZXgiLCJtZHMiOiJhbGxvdyAqIn19XSIiIgogICAgICAgIHNlbGYuY21kX291 + dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiZW50aXR5IjogImNsaWVudC5jc2ktY2VwaGZzLW5v + ZGUiLCAiZm9ybWF0IjogImpzb24iLCAicHJlZml4IjogImF1dGggZ2V0In0iIiIKICAgICAgICBd + ID0gIiIiW10iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAgICAiIiJ7 + ImVudGl0eSI6ICJjbGllbnQuY3NpLXJiZC1ub2RlIiwgImZvcm1hdCI6ICJqc29uIiwgInByZWZp + eCI6ICJhdXRoIGdldCJ9IiIiCiAgICAgICAgXSA9ICIiIltdIiIiCiAgICAgICAgc2VsZi5jbWRf + b3V0cHV0X21hcFsKICAgICAgICAgICAgIiIieyJlbnRpdHkiOiAiY2xpZW50LmNzaS1yYmQtcHJv + dmlzaW9uZXIiLCAiZm9ybWF0IjogImpzb24iLCAicHJlZml4IjogImF1dGggZ2V0In0iIiIKICAg + ICAgICBdID0gIiIiW10iIiIKICAgICAgICBzZWxmLmNtZF9vdXRwdXRfbWFwWwogICAgICAgICAg + ICAiIiJ7ImVudGl0eSI6ICJjbGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciIsICJmb3JtYXQi + OiAianNvbiIsICJwcmVmaXgiOiAiYXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJbXSIiIgog + ICAgICAgIHNlbGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiZW50aXR5IjogImNs + aWVudC5jc2ktY2VwaGZzLXByb3Zpc2lvbmVyLW9wZW5zaGlmdC1zdG9yYWdlIiwgImZvcm1hdCI6 + ICJqc29uIiwgInByZWZpeCI6ICJhdXRoIGdldCJ9IiIiCiAgICAgICAgXSA9ICIiIltdIiIiCiAg + ICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsKICAgICAgICAgICAgIiIieyJlbnRpdHkiOiAiY2xp + ZW50LmNzaS1jZXBoZnMtcHJvdmlzaW9uZXItb3BlbnNoaWZ0LXN0b3JhZ2UtbXlmcyIsICJmb3Jt + YXQiOiAianNvbiIsICJwcmVmaXgiOiAiYXV0aCBnZXQifSIiIgogICAgICAgIF0gPSAiIiJbXSIi + IgogICAgICAgIHNlbGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiZW50aXR5Ijog + ImNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lvbmVyIiwgImZvcm1hdCI6ICJqc29uIiwgInByZWZp + eCI6ICJhdXRoIGdldCJ9IiIiCiAgICAgICAgXSA9ICIiIlt7ImVudGl0eSI6ImNsaWVudC5jc2kt + Y2VwaGZzLXByb3Zpc2lvbmVyIiwia2V5IjoiQVFERmtiTmVmdDViRlJBQVRuZExOVVNFS3J1b3p4 + aVppM2xyZEE9PSIsImNhcHMiOnsibW9uIjoiYWxsb3cgciIsICJtZ3IiOiJhbGxvdyBydyIsICJv + c2QiOiJhbGxvdyBydyB0YWcgY2VwaGZzIG1ldGFkYXRhPSoiLCJtZHMiOiJhbGxvdyAqIn19XSIi + IgogICAgICAgIHNlbGYuY21kX291dHB1dF9tYXBbCiAgICAgICAgICAgICIiInsiY2FwcyI6IFsi + bW9uIiwgImFsbG93IHIsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xpc3QnIiwgIm1nciIsICJh + bGxvdyBydyIsICJvc2QiLCAiYWxsb3cgcncgdGFnIGNlcGhmcyBtZXRhZGF0YT0qIiwgIm1kcyIs + ICJhbGxvdyAqIl0sICJlbnRpdHkiOiAiY2xpZW50LmNzaS1jZXBoZnMtcHJvdmlzaW9uZXIiLCAi + Zm9ybWF0IjogImpzb24iLCAicHJlZml4IjogImF1dGggY2FwcyJ9IiIiCiAgICAgICAgXSA9ICIi + Ilt7ImVudGl0eSI6ImNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lvbmVyIiwia2V5IjoiQVFERmti + TmVmdDViRlJBQVRuZExOVVNFS3J1b3p4aVppM2xyZEE9PSIsImNhcHMiOnsibW9uIjoiYWxsb3cg + ciwgIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xpc3QnIiwgIm1nciI6ImFsbG93IHJ3IiwgIm9z + ZCI6ImFsbG93IHJ3IHRhZyBjZXBoZnMgbWV0YWRhdGE9KiIsIm1kcyI6ImFsbG93ICoifX1dIiIi + CiAgICAgICAgc2VsZi5jbWRfb3V0cHV0X21hcFsneyJmb3JtYXQiOiAianNvbiIsICJwcmVmaXgi + OiAic3RhdHVzIn0nXSA9IGNlcGhfc3RhdHVzX3N0cgoKICAgIGRlZiBzaHV0ZG93bihzZWxmKToK + ICAgICAgICBwYXNzCgogICAgZGVmIGdldF9mc2lkKHNlbGYpOgogICAgICAgIHJldHVybiAiYWY0 + ZTE2NzMtMGI3Mi00MDJkLTk5MGEtMjJkMjkxOWQwZjFjIgoKICAgIGRlZiBjb25mX3JlYWRfZmls + ZShzZWxmKToKICAgICAgICBwYXNzCgogICAgZGVmIGNvbm5lY3Qoc2VsZik6CiAgICAgICAgcGFz + cwoKICAgIGRlZiBwb29sX2V4aXN0cyhzZWxmLCBwb29sX25hbWUpOgogICAgICAgIHJldHVybiBU + cnVlCgogICAgZGVmIG1vbl9jb21tYW5kKHNlbGYsIGNtZCwgb3V0KToKICAgICAgICBqc29uX2Nt + ZCA9IGpzb24ubG9hZHMoY21kKQogICAgICAgIGpzb25fY21kX3N0ciA9IGpzb24uZHVtcHMoanNv + bl9jbWQsIHNvcnRfa2V5cz1UcnVlKQogICAgICAgIGNtZF9vdXRwdXQgPSBzZWxmLmNtZF9vdXRw + dXRfbWFwW2pzb25fY21kX3N0cl0KICAgICAgICByZXR1cm4gc2VsZi5yZXR1cm5fdmFsLCBjbWRf + b3V0cHV0LCBzdHIoc2VsZi5lcnJfbWVzc2FnZS5lbmNvZGUoInV0Zi04IikpCgogICAgZGVmIF9j + b252ZXJ0X2hvc3RuYW1lX3RvX2lwKHNlbGYsIGhvc3RfbmFtZSk6CiAgICAgICAgaXBfcmVnX3gg + PSByZS5jb21waWxlKHIiXGR7MSwzfS5cZHsxLDN9LlxkezEsM30uXGR7MSwzfSIpCiAgICAgICAg + IyBpZiBwcm92aWRlZCBob3N0IGlzIGRpcmVjdGx5IGFuIElQIGFkZHJlc3MsIHJldHVybiB0aGUg + c2FtZQogICAgICAgIGlmIGlwX3JlZ194Lm1hdGNoKGhvc3RfbmFtZSk6CiAgICAgICAgICAgIHJl + dHVybiBob3N0X25hbWUKICAgICAgICBpbXBvcnQgcmFuZG9tCgogICAgICAgIGhvc3RfaXAgPSBz + ZWxmLmR1bW15X2hvc3RfaXBfbWFwLmdldChob3N0X25hbWUsICIiKQogICAgICAgIGlmIG5vdCBo + b3N0X2lwOgogICAgICAgICAgICBob3N0X2lwID0gZiIxNzIuOS57cmFuZG9tLnJhbmRpbnQoMCwg + MjU0KX0ue3JhbmRvbS5yYW5kaW50KDAsIDI1NCl9IgogICAgICAgICAgICBzZWxmLmR1bW15X2hv + c3RfaXBfbWFwW2hvc3RfbmFtZV0gPSBob3N0X2lwCiAgICAgICAgZ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HIuaGVhZGVyc1si + QXV0aG9yaXphdGlvbiJdID0gZiJBV1Mge3NlbGYuYWNjZXNzX2tleX06e3NpZ25hdHVyZX0iCiAg + ICAgICAgcmV0dXJuIHIKCiAgICBkZWYgZ2V0X3NpZ25hdHVyZShzZWxmLCByKToKICAgICAgICBj + YW5vbmljYWxfc3RyaW5nID0gc2VsZi5nZXRfY2Fub25pY2FsX3N0cmluZyhyLnVybCwgci5oZWFk + ZXJzLCByLm1ldGhvZCkKICAgICAgICBrZXkgPSBzZWxmLnNlY3JldF9rZXkuZW5jb2RlKCJ1dGYt + OCIpCiAgICAgICAgbXNnID0gY2Fub25pY2FsX3N0cmluZy5lbmNvZGUoInV0Zi04IikKICAgICAg + ICBoID0gaG1hYy5uZXcoa2V5LCBtc2csIGRpZ2VzdG1vZD1zaGEpCiAgICAgICAgcmV0dXJuIGVu + Y29kZXN0cmluZyhoLmRpZ2VzdCgpKS5zdHJpcCgpCgogICAgZGVmIGdldF9jYW5vbmljYWxfc3Ry + aW5nKHNlbGYsIHVybCwgaGVhZGVycywgbWV0aG9kKToKICAgICAgICBwYXJzZWR1cmwgPSB1cmxw + YXJzZSh1cmwpCiAgICAgICAgb2JqZWN0a2V5ID0gcGFyc2VkdXJsLnBhdGhbMTpdCgogICAgICAg + IGJ1Y2tldCA9IHBhcnNlZHVybC5uZXRsb2NbOiAtbGVuKHNlbGYuc2VydmljZV9iYXNlX3VybCld + CiAgICAgICAgaWYgbGVuKGJ1Y2tldCkgPiAxOgogICAgICAgICAgICAjIHJlbW92ZSBsYXN0IGRv + dAogICAgICAgICAgICBidWNrZXQgPSBidWNrZXRbOi0xXQoKICAgICAgICBpbnRlcmVzdGluZ19o + ZWFkZXJzID0geyJjb250ZW50LW1kNSI6ICIiLCAiY29udGVudC10eXBlIjogIiIsICJkYXRlIjog + IiJ9CiAgICAgICAgZm9yIGtleSBpbiBoZWFkZXJzOgogICAgICAgICAgICBsayA9IGtleS5sb3dl + cigpCiAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgIGxrID0gbGsuZGVjb2RlKCJ1dGYt + OCIpCiAgICAgICAgICAgIGV4Y2VwdDoKICAgICAgICAgICAgICAgIHBhc3MKICAgICAgICAgICAg + aWYgaGVhZGVyc1trZXldIGFuZCAoCiAgICAgICAgICAgICAgICBsayBpbiBpbnRlcmVzdGluZ19o + ZWFkZXJzLmtleXMoKSBvciBsay5zdGFydHN3aXRoKCJ4LWFtei0iKQogICAgICAgICAgICApOgog + ICAgICAgICAgICAgICAgaW50ZXJlc3RpbmdfaGVhZGVyc1tsa10gPSBoZWFkZXJzW2tleV0uc3Ry + aXAoKQoKICAgICAgICAjIElmIHgtYW16LWRhdGUgaXMgdXNlZCBpdCBzdXBlcnNlZGVzIHRoZSBk + YXRlIGhlYWRlci4KICAgICAgICBpZiAieC1hbXotZGF0ZSIgaW4gaW50ZXJlc3RpbmdfaGVhZGVy + czoKICAgICAgICAgICAgaW50ZXJlc3RpbmdfaGVhZGVyc1siZGF0ZSJdID0gIiIKCiAgICAgICAg + YnVmID0gZiJ7bWV0aG9kfVxuIgogICAgICAgIGZvciBrZXkgaW4gc29ydGVkKGludGVyZXN0aW5n + X2hlYWRlcnMua2V5cygpKToKICAgICAgICAgICAgdmFsID0gaW50ZXJlc3RpbmdfaGVhZGVyc1tr + ZXldCiAgICAgICAgICAgIGlmIGtleS5zdGFydHN3aXRoKCJ4LWFtei0iKToKICAgICAgICAgICAg + ICAgIGJ1ZiArPSBmIntrZXl9Ont2YWx9XG4iCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAg + ICAgICBidWYgKz0gZiJ7dmFsfVxuIgoKICAgICAgICAjIGFwcGVuZCB0aGUgYnVja2V0IGlmIGl0 + IGV4aXN0cwogICAgICAgIGlmIGJ1Y2tldCAhPSAiIjoKICAgICAgICAgICAgYnVmICs9IGYiL3ti + dWNrZXR9IgoKICAgICAgICAjIGFkZCB0aGUgb2JqZWN0a2V5LiBldmVuIGlmIGl0IGRvZXNuJ3Qg + ZXhpc3QsIGFkZCB0aGUgc2xhc2gKICAgICAgICBidWYgKz0gZiIve29iamVjdGtleX0iCgogICAg + ICAgIHJldHVybiBidWYKCgpjbGFzcyBSYWRvc0pTT046CiAgICBFWFRFUk5BTF9VU0VSX05BTUUg + PSAiY2xpZW50LmhlYWx0aGNoZWNrZXIiCiAgICBFWFRFUk5BTF9SR1dfQURNSU5fT1BTX1VTRVJf + TkFNRSA9ICJyZ3ctYWRtaW4tb3BzLXVzZXIiCiAgICBFTVBUWV9PVVRQVVRfTElTVCA9ICJFbXB0 + eSBvdXRwdXQgbGlzdCIKICAgIERFRkFVTFRfUkdXX1BPT0xfUFJFRklYID0gImRlZmF1bHQiCiAg + ICBERUZBVUxUX01PTklUT1JJTkdfRU5EUE9JTlRfUE9SVCA9ICI5MjgzIgoKICAgIEBjbGFzc21l + dGhvZAogICAgZGVmIGdlbl9hcmdfcGFyc2VyKGNscywgYXJnc190b19wYXJzZT1Ob25lKToKICAg + ICAgICBhcmdQID0gYXJncGFyc2UuQXJndW1lbnRQYXJzZXIoKQoKICAgICAgICBjb21tb25fZ3Jv + dXAgPSBhcmdQLmFkZF9hcmd1bWVudF9ncm91cCgiY29tbW9uIikKICAgICAgICBjb21tb25fZ3Jv + dXAuYWRkX2FyZ3VtZW50KCItLXZlcmJvc2UiLCAiLXYiLCBhY3Rpb249InN0b3JlX3RydWUiLCBk + ZWZhdWx0PUZhbHNlKQogICAgICAgIGNvbW1vbl9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAg + ICAgICItLWNlcGgtY29uZiIsICItYyIsIGhlbHA9IlByb3ZpZGUgYSBjZXBoIGNvbmYgZmlsZS4i + LCB0eXBlPXN0ciwgZGVmYXVsdD0iIgogICAgICAgICkKICAgICAgICBjb21tb25fZ3JvdXAuYWRk + X2FyZ3VtZW50KAogICAgICAgICAgICAiLS1rZXlyaW5nIiwgIi1rIiwgaGVscD0iUGF0aCB0byBj + ZXBoIGtleXJpbmcgZmlsZS4iLCB0eXBlPXN0ciwgZGVmYXVsdD0iIgogICAgICAgICkKICAgICAg + ICBjb21tb25fZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1ydW4tYXMtdXNlciIs + CiAgICAgICAgICAgICItdSIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHR5 + cGU9c3RyLAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyBhIHVzZXIgbmFtZSB0byBjaGVjayB0 + aGUgY2x1c3RlcidzIGhlYWx0aCBzdGF0dXMsIG11c3QgYmUgcHJlZml4ZWQgYnkgJ2NsaWVudC4n + IiwKICAgICAgICApCiAgICAgICAgY29tbW9uX2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAg + ICAgIi0tY2x1c3Rlci1uYW1lIiwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAgICAg + aGVscD0iS3ViZXJuZXRlcyBjbHVzdGVyIG5hbWUobGVnYWN5IGZsYWcpLCBOb3RlOiBFaXRoZXIg + dXNlIHRoaXMgb3IgLS1rOHMtY2x1c3Rlci1uYW1lIiwKICAgICAgICApCiAgICAgICAgY29tbW9u + X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tazhzLWNsdXN0ZXItbmFtZSIsIGRl + ZmF1bHQ9IiIsIGhlbHA9Ikt1YmVybmV0ZXMgY2x1c3RlciBuYW1lIgogICAgICAgICkKICAgICAg + ICBjb21tb25fZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1uYW1lc3BhY2UiLAog + ICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICBoZWxwPSJOYW1lc3BhY2Ugd2hlcmUg + Q2VwaENsdXN0ZXIgaXMgcnVubmluZyIsCiAgICAgICAgKQogICAgICAgIGNvbW1vbl9ncm91cC5h + ZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXJndy1wb29sLXByZWZpeCIsIGRlZm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WF0aW5nIG5l + dyBjc2ktdXNlcnMgYW5kIG5ldyBzZWNyZXRzIGZvciB0aGF0IGNzaS11c2Vycy4iCiAgICAgICAg + ICAgICsgIlNvIGFwcGx5IHRoZXNlIHNlY3JldHMgb25seSB0byBuZXcgYENvbnN1bWVyIGNsdXN0 + ZXJgIGRlcGxveW1lbnQgd2hpbGUgdXNpbmcgdGhlIHNhbWUgYFNvdXJjZSBjbHVzdGVyYC4iLAog + ICAgICAgICkKICAgICAgICBjb21tb25fZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAi + LS12Mi1wb3J0LWVuYWJsZSIsCiAgICAgICAgICAgIGFjdGlvbj0ic3RvcmVfdHJ1ZSIsCiAgICAg + ICAgICAgIGRlZmF1bHQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9IkVuYWJsZSB2MiBtb24gcG9y + dCgzMzAwKSBmb3IgbW9ucyIsCiAgICAgICAgKQoKICAgICAgICBvdXRwdXRfZ3JvdXAgPSBhcmdQ + LmFkZF9hcmd1bWVudF9ncm91cCgib3V0cHV0IikKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2Fy + Z3VtZW50KAogICAgICAgICAgICAiLS1mb3JtYXQiLAogICAgICAgICAgICAiLXQiLAogICAgICAg + ICAgICBjaG9pY2VzPVsianNvbiIsICJiYXNoIl0sCiAgICAgICAgICAgIGRlZmF1bHQ9Impzb24i + LAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyB0aGUgb3V0cHV0IGZvcm1hdCAoanNvbiB8IGJh + c2gpIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAg + ICAgICAgIi0tb3V0cHV0IiwKICAgICAgICAgICAgIi1vIiwKICAgICAgICAgICAgZGVmYXVsdD0i + IiwKICAgICAgICAgICAgaGVscD0iT3V0cHV0IHdpbGwgYmUgc3RvcmVkIGludG8gdGhlIHByb3Zp + ZGVkIGZpbGUiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAog + ICAgICAgICAgICAiLS1jZXBoZnMtZmlsZXN5c3RlbS1uYW1lIiwKICAgICAgICAgICAgZGVmYXVs + dD0iIiwKICAgICAgICAgICAgaGVscD0iUHJvdmlkZXMgdGhlIG5hbWUgb2YgdGhlIENlcGggZmls + ZXN5c3RlbSIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAg + ICAgICAgICAgICItLWNlcGhmcy1tZXRhZGF0YS1wb29sLW5hbWUiLAogICAgICAgICAgICBkZWZh + dWx0PSIiLAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyB0aGUgbmFtZSBvZiB0aGUgY2VwaGZz + IG1ldGFkYXRhIHBvb2wiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3Vt + ZW50KAogICAgICAgICAgICAiLS1jZXBoZnMtZGF0YS1wb29sLW5hbWUiLAogICAgICAgICAgICBk + ZWZhdWx0PSIiLAogICAgICAgICAgICBoZWxwPSJQcm92aWRlcyB0aGUgbmFtZSBvZiB0aGUgY2Vw + aGZzIGRhdGEgcG9vbCIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1l + bnQoCiAgICAgICAgICAgICItLXJiZC1kYXRhLXBvb2wtbmFtZSIsCiAgICAgICAgICAgIGRlZmF1 + bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJQcm92 + aWRlcyB0aGUgbmFtZSBvZiB0aGUgUkJEIGRhdGFwb29sIiwKICAgICAgICApCiAgICAgICAgb3V0 + cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tYWxpYXMtcmJkLWRhdGEtcG9v + bC1uYW1lIiwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAgICAgcmVxdWlyZWQ9RmFs + c2UsCiAgICAgICAgICAgIGhlbHA9IlByb3ZpZGVzIGFuIGFsaWFzIGZvciB0aGUgIFJCRCBkYXRh + IHBvb2wgbmFtZSwgbmVjZXNzYXJ5IGlmIGEgc3BlY2lhbCBjaGFyYWN0ZXIgaXMgcHJlc2VudCBp + biB0aGUgcG9vbCBuYW1lIHN1Y2ggYXMgYSBwZXJpb2Qgb3IgdW5kZXJzY29yZSIsCiAgICAgICAg + KQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXJndy1l + bmRwb2ludCIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVkPUZh + bHNlLAogICAgICAgICAgICBoZWxwPSJSQURPUyBHYXRld2F5IGVuZHBvaW50IChpbiBgPElQdjQ+ + OjxQT1JUPmAgb3IgYDxbSVB2Nl0+OjxQT1JUPmAgb3IgYDxGUUROPjo8UE9SVD5gIGZvcm1hdCki + LAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAg + ICAiLS1yZ3ctdGxzLWNlcnQtcGF0aCIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAg + ICAgIHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJSQURPUyBHYXRld2F5IGVuZHBv + aW50IFRMUyBjZXJ0aWZpY2F0ZSIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRf + YXJndW1lbnQoCiAgICAgICAgICAgICItLXJndy1za2lwLXRscyIsCiAgICAgICAgICAgIHJlcXVp + cmVkPUZhbHNlLAogICAgICAgICAgICBkZWZhdWx0PUZhbHNlLAogICAgICAgICAgICBoZWxwPSJJ + Z25vcmUgVExTIGNlcnRpZmljYXRpb24gdmFsaWRhdGlvbiB3aGVuIGEgc2VsZi1zaWduZWQgY2Vy + dGlmaWNhdGUgaXMgcHJvdmlkZWQgKE5PVCBSRUNPTU1FTkRFRCIsCiAgICAgICAgKQogICAgICAg + IG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLW1vbml0b3JpbmctZW5k + cG9pbnQiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxz + ZSwKICAgICAgICAgICAgaGVscD0iQ2VwaCBNYW5hZ2VyIHByb21ldGhldXMgZXhwb3J0ZXIgZW5k + cG9pbnRzIChjb21tYSBzZXBhcmF0ZWQgbGlzdCBvZiAoZm9ybWF0IGA8SVB2ND5gIG9yIGA8W0lQ + djZdPmAgb3IgYDxGUUROPmApIGVudHJpZXMgb2YgYWN0aXZlIGFuZCBzdGFuZGJ5IG1ncnMpIiwK ICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAg - Ii0tc3Vidm9sdW1lLWdyb3VwIiwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAgICAg - cmVxdWlyZWQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9InByb3ZpZGVzIHRoZSBuYW1lIG9mIHRo - ZSBzdWJ2b2x1bWUgZ3JvdXAiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2Fy - Z3VtZW50KAogICAgICAgICAgICAiLS1yZ3ctcmVhbG0tbmFtZSIsCiAgICAgICAgICAgIGRlZmF1 - bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJwcm92 - aWRlcyB0aGUgbmFtZSBvZiB0aGUgcmd3LXJlYWxtIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0 - X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmd3LXpvbmUtbmFtZSIsCiAgICAg - ICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAg - ICBoZWxwPSJwcm92aWRlcyB0aGUgbmFtZSBvZiB0aGUgcmd3LXpvbmUiLAogICAgICAgICkKICAg - ICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1yZ3ctem9uZWdy - b3VwLW5hbWUiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1G - YWxzZSwKICAgICAgICAgICAgaGVscD0icHJvdmlkZXMgdGhlIG5hbWUgb2YgdGhlIHJndy16b25l - Z3JvdXAiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAg - ICAgICAgICAiLS10b3BvbG9neS1wb29scyIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAg - ICAgICAgIHJlcXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJjb21tYS1zZXBhcmF0ZWQg - bGlzdCBvZiB0b3BvbG9neS1jb25zdHJhaW5lZCByYmQgcG9vbHMiLAogICAgICAgICkKICAgICAg - ICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS10b3BvbG9neS1mYWls - dXJlLWRvbWFpbi1sYWJlbCIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHJl - cXVpcmVkPUZhbHNlLAogICAgICAgICAgICBoZWxwPSJrOHMgY2x1c3RlciBmYWlsdXJlIGRvbWFp - biBsYWJlbCAoZXhhbXBsZTogem9uZSwgcmFjaywgb3IgaG9zdCkgZm9yIHRoZSB0b3BvbG9neS1w - b29scyB0aGF0IG1hdGNoIHRoZSBjZXBoIGRvbWFpbiIsCiAgICAgICAgKQogICAgICAgIG91dHB1 - dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXRvcG9sb2d5LWZhaWx1cmUtZG9t - YWluLXZhbHVlcyIsCiAgICAgIC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G91bGQgb25seSBiZSB1c2VkIHRvIGFwcGVuZCBuZXcgcGVybWlzc2lvbnMgdG8gdXNlcnMs - IGl0IHNob3VsZG4ndCBiZSB1c2VkIGZvciBjaGFuZ2luZyB1c2VyIGFscmVhZHkgYXBwbGllZCBw - ZXJtaXNzaW9uLCBmb3IgZXhhbXBsZSB5b3Ugc2hvdWxkbid0IGNoYW5nZSBpbiB3aGljaCBwb29s - IHVzZXIgaGFzIGFjY2VzcyIsCiAgICAgICAgKQoKICAgICAgICAjIEFkZCBjb21tYW5kLWxpbmUg - YXJndW1lbnRzCiAgICAgICAgY29uZmlnX2dyb3VwID0gYXJnUC5hZGRfYXJndW1lbnRfZ3JvdXAo - ImNvbmZpZyIpCiAgICAgICAgY29uZmlnX2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAg - Ii0tY29uZmlnLWZpbGUiLAogICAgICAgICAgICB0eXBlPXN0ciwKICAgICAgICAgICAgaGVscD0i - UGF0aCB0byB0aGUgY29uZmlndXJhdGlvbiBmaWxlLCBQcmlvcml0eTogY29tbWFuZC1saW5lLWFy - Z3MgPiBjb25maWcuaW5pIGZpbGUgdmFsdWVzID4gZGVmYXVsdCB2YWx1ZXMiLAogICAgICAgICAg - ICByZXF1aXJlZD1GYWxzZSwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICApCgogICAg - ICAgIGlmIGFyZ3NfdG9fcGFyc2U6CiAgICAgICAgICAgIGFzc2VydCAoCiAgICAgICAgICAgICAg - ICB0eXBlKGFyZ3NfdG9fcGFyc2UpID09IGxpc3QKICAgICAgICAgICAgKSwgIkFyZ3VtZW50IHRv - ICdnZW5fYXJnX3BhcnNlcicgc2hvdWxkIGJlIGEgbGlzdCIKICAgICAgICBlbHNlOgogICAgICAg - ICAgICBhcmdzX3RvX3BhcnNlID0gc3lzLmFyZ3ZbMTpdCiAgICAgICAgcmV0dXJuIGFyZ1AucGFy - c2VfYXJncyhhcmdzX3RvX3BhcnNlKQoKICAgIGRlZiB2YWxpZGF0ZV9yYmRfbWV0YWRhdGFfZWNf - cG9vbF9uYW1lKHNlbGYpOgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIucmJkX21ldGFkYXRh - X2VjX3Bvb2xfbmFtZToKICAgICAgICAgICAgcmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZSA9IHNl - bGYuX2FyZ19wYXJzZXIucmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZQogICAgICAgICAgICByYmRf - cG9vbF9uYW1lID0gc2VsZi5fYXJnX3BhcnNlci5yYmRfZGF0YV9wb29sX25hbWUKCiAgICAgICAg - ICAgIGlmIHJiZF9wb29sX25hbWUgPT0gIiI6CiAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRp - b25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgICJGbGFnICctLXJiZC1kYXRh - LXBvb2wtbmFtZScgc2hvdWxkIG5vdCBiZSBlbXB0eSIKICAgICAgICAgICAgICAgICkKCiAgICAg - ICAgICAgIGlmIHJiZF9tZXRhZGF0YV9lY19wb29sX25hbWUgPT0gIiI6CiAgICAgICAgICAgICAg - ICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgICJG - bGFnICctLXJiZC1tZXRhZGF0YS1lYy1wb29sLW5hbWUnIHNob3VsZCBub3QgYmUgZW1wdHkiCiAg - ICAgICAgICAgICAgICApCgogICAgICAgICAgICBjbWRfanNvbiA9IHsicHJlZml4IjogIm9zZCBk - dW1wIiwgImZvcm1hdCI6ICJqc29uIn0KICAgICAgICAgICAgcmV0X3ZhbCwganNvbl9vdXQsIGVy - cl9tc2cgPSBzZWxmLl9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAgICAgICBp - ZiByZXRfdmFsICE9IDAgb3IgbGVuKGpzb25fb3V0KSA9PSAwOgogICAgICAgICAgICAgICAgcmFp - c2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICBmIntjbWRf - anNvblsncHJlZml4J119IGNvbW1hbmQgZmFpbGVkLlxuIgogICAgICAgICAgICAgICAgICAgIGYi - RXJyb3I6IHtlcnJfbXNnIGlmIHJldF92YWwgIT0gMCBlbHNlIHNlbGYuRU1QVFlfT1VUUFVUX0xJ - U1R9IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBtZXRhZGF0YV9wb29sX2V4aXN0LCBw - b29sX2V4aXN0ID0gRmFsc2UsIEZhbHNlCgogICAgICAgICAgICBmb3Iga2V5IGluIGpzb25fb3V0 - WyJwb29scyJdOgogICAgICAgICAgICAgICAgIyBpZiBlcmFzdXJlX2NvZGVfcHJvZmlsZSBpcyBl - bXB0eSBhbmQgcG9vbCBuYW1lIGV4aXN0cyB0aGVuIGl0IHJlcGxpY2EgcG9vbAogICAgICAgICAg - ICAgICAgaWYgKAogICAgICAgICAgICAgICAgICAgIGtleVsiZXJhc3VyZV9jb2RlX3Byb2ZpbGUi - XSA9PSAiIgogICAgICAgICAgICAgICAgICAgIGFuZCBrZXlbInBvb2xfbmFtZSJdID09IHJiZF9t - ZXRhZGF0YV9lY19wb29sX25hbWUKICAgICAgICAgICAgICAgICk6CiAgICAgICAgICAgICAgICAg - ICAgbWV0YWRhdGFfcG9vbF9leGlzdCA9IFRydWUKICAgICAgICAgICAgICAgICMgaWYgZXJhc3Vy - ZV9jb2RlX3Byb2ZpbGUgaXMgbm90IGVtcHR5IGFuZCBwb29sIG5hbWUgZXhpc3RzIHRoZW4gaXQg - aXMgZWMgcG9vbAogICAgICAgICAgICAgICAgaWYga2V5WyJlcmFzdXJlX2NvZGVfcHJvZmlsZSJd - IGFuZCBrZXlbInBvb2xfbmFtZSJdID09IHJiZF9wb29sX25hbWU6CiAgICAgICAgICAgICAgICAg - ICAgcG9vbF9leGlzdCA9IFRydWUKCiAgICAgICAgICAgIGlmIG5vdCBtZXRhZGF0YV9wb29sX2V4 - aXN0OgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAg - ICAgICAgICAgICAgICAgICAiUHJvdmlkZWQgcmJkX2VjX21ldGFkYXRhX3Bvb2wgbmFtZSwiCiAg - ICAgICAgICAgICAgICAgICAgZiIge3JiZF9tZXRhZGF0YV9lY19wb29sX25hbWV9LCBkb2VzIG5v - dCBleGlzdCIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgbm90IHBvb2xfZXhpc3Q6 - CiAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAg - ICAgICAgICAgICAgIGYiUHJvdmlkZWQgcmJkX2RhdGFfcG9vbCBuYW1lLCB7cmJkX3Bvb2xfbmFt - ZX0sIGRvZXMgbm90IGV4aXN0IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICByZXR1cm4g - cmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZQoKICAgIGRlZiBkcnlfcnVuKHNlbGYsIG1zZyk6CiAg - ICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICBwcmludCgiRXhl - Y3V0ZTogIiArICInIiArIG1zZyArICInIikKCiAgICBkZWYgdmFsaWRhdGVfcmd3X2VuZHBvaW50 - X3Rsc19jZXJ0KHNlbGYpOgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIucmd3X3Rsc19jZXJ0 - X3BhdGg6CiAgICAgICAgICAgIHdpdGggb3BlbihzZWxmLl9hcmdfcGFyc2VyLnJnd190bHNfY2Vy - dF9wYXRoLCBlbmNvZGluZz0idXRmOCIpIGFzIGY6CiAgICAgICAgICAgICAgICBjb250ZW50cyA9 - IGYucmVhZCgpCiAgICAgICAgICAgICAgICByZXR1cm4gY29udGVudHMucnN0cmlwKCkKCiAgICBk - ZWYgX2NoZWNrX2NvbmZsaWN0aW5nX29wdGlvbnMoc2VsZik6CiAgICAgICAgaWYgbm90IHNlbGYu - X2FyZ19wYXJzZXIudXBncmFkZSBhbmQgbm90IHNlbGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9v - bF9uYW1lOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAg - ICAgICAgICAgICAgIkVpdGhlciAnLS11cGdyYWRlJyBvciAnLS1yYmQtZGF0YS1wb29sLW5hbWUg - PHBvb2xfbmFtZT4nIHNob3VsZCBiZSBzcGVjaWZpZWQiCiAgICAgICAgICAgICkKCiAgICBkZWYg - X2ludmFsaWRfZW5kcG9pbnQoc2VsZiwgZW5kcG9pbnRfc3RyKToKICAgICAgICAjIGV4dHJhY3Qg - dGhlIHBvcnQgYnkgZ2V0dGluZyB0aGUgbGFzdCBzcGxpdCBvbiBgOmAgZGVsaW1pdGVyCiAgICAg - ICAgdHJ5OgogICAgICAgICAgICBlbmRwb2ludF9zdHJfaXAsIHBvcnQgPSBlbmRwb2ludF9zdHIu - cnNwbGl0KCI6IiwgMSkKICAgICAgICBleGNlcHQgVmFsdWVFcnJvcjoKICAgICAgICAgICAgcmFp - c2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbihmIk5vdCBhIHByb3BlciBlbmRwb2ludDoge2Vu - ZHBvaW50X3N0cn0iKQoKICAgICAgICB0cnk6CiAgICAgICAgICAgIGlmIGVuZHBvaW50X3N0cl9p - cFswXSA9PSAiWyI6CiAgICAgICAgICAgICAgICBlbmRwb2ludF9zdHJfaXAgPSBlbmRwb2ludF9z - dHJfaXBbMSA6IGxlbihlbmRwb2ludF9zdHJfaXApIC0gMV0KICAgICAgICAgICAgaXBfdHlwZSA9 - ICgKICAgICAgICAgICAgICAgICJJUHY0IiBpZiB0eXBlKGlwX2FkZHJlc3MoZW5kcG9pbnRfc3Ry - X2lwKSkgaXMgSVB2NEFkZHJlc3MgZWxzZSAiSVB2NiIKICAgICAgICAgICAgKQogICAgICAgIGV4 - Y2VwdCBWYWx1ZUVycm9yOgogICAgICAgICAgICBpcF90eXBlID0gIkZRRE4iCiAgICAgICAgaWYg - bm90IHBvcnQuaXNkaWdpdCgpOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhj - ZXB0aW9uKGYiUG9ydCBub3QgdmFsaWQ6IHtwb3J0fSIpCiAgICAgICAgaW50UG9ydCA9IGludChw - b3J0KQogICAgICAgIGlmIGludFBvcnQgPCAxIG9yIGludFBvcnQgPiAyKioxNiAtIDE6CiAgICAg - ICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oZiJPdXQgb2YgcmFuZ2UgcG9y - dCBudW1iZXI6IHtwb3J0fSIpCgogICAgICAgIHJldHVybiBpcF90eXBlCgogICAgZGVmIGVuZHBv - aW50X2RpYWwoc2VsZiwgZW5kcG9pbnRfc3RyLCBpcF90eXBlLCB0aW1lb3V0PTMsIGNlcnQ9Tm9u - ZSk6CiAgICAgICAgIyBpZiB0aGUgJ2NsdXN0ZXInIGluc3RhbmNlIGlzIGEgZHVtbXkgb25lLAog - ICAgICAgICMgZG9uJ3QgdHJ5IHRvIHJlYWNoIG91dCB0byB0aGUgZW5kcG9pbnQKICAgICAgICBp - ZiBpc2luc3RhbmNlKHNlbGYuY2x1c3RlciwgRHVtbXlSYWRvcyk6CiAgICAgICAgICAgIHJldHVy - biAiIiwgIiIsICIiCiAgICAgICAgaWYgaXBfdHlwZSA9PSAiSVB2NiI6CiAgICAgICAgICAgIHRy - eToKICAgICAgICAgICAgICAgIGVuZHBvaW50X3N0cl9pcCwgZW5kcG9pbnRfc3RyX3BvcnQgPSBl - bmRwb2ludF9zdHIucnNwbGl0KCI6IiwgMSkKICAgICAgICAgICAgZXhjZXB0IFZhbHVlRXJyb3I6 - CiAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAg - ICAgICAgICAgICAgIGYiTm90IGEgcHJvcGVyIGVuZHBvaW50OiB7ZW5kcG9pbnRfc3RyfSIKICAg - ICAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgZW5kcG9pbnRfc3RyX2lwWzBdICE9ICJbIjoK - ICAgICAgICAgICAgICAgIGVuZHBvaW50X3N0cl9pcCA9ICJbIiArIGVuZHBvaW50X3N0cl9pcCAr - ICJdIgogICAgICAgICAgICBlbmRwb2ludF9zdHIgPSAiOiIuam9pbihbZW5kcG9pbnRfc3RyX2lw - LCBlbmRwb2ludF9zdHJfcG9ydF0pCgogICAgICAgIHByb3RvY29scyA9IFsiaHR0cCIsICJodHRw - cyJdCiAgICAgICAgcmVzcG9uc2VfZXJyb3IgPSBOb25lCiAgICAgICAgZm9yIHByZWZpeCBpbiBw - cm90b2NvbHM6CiAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgIGVwID0gZiJ7cHJlZml4 - fTovL3tlbmRwb2ludF9zdHJ9IgogICAgICAgICAgICAgICAgdmVyaWZ5ID0gTm9uZQogICAgICAg - ICAgICAgICAgIyBJZiB2ZXJpZnkgaXMgc2V0IHRvIGEgcGF0aCB0byBhIGRpcmVjdG9yeSwKICAg - ICAgICAgICAgICAgICMgdGhlIGRpcmVjdG9yeSBtdXN0IGhhdmUgYmVlbiBwcm9jZXNzZWQgdXNp - bmcgdGhlIGNfcmVoYXNoIHV0aWxpdHkgc3VwcGxpZWQgd2l0aCBPcGVuU1NMLgogICAgICAgICAg - ICAgICAgaWYgcHJlZml4ID09ICJodHRwcyIgYW5kIHNlbGYuX2FyZ19wYXJzZXIucmd3X3NraXBf - dGxzOgogICAgICAgICAgICAgICAgICAgIHZlcmlmeSA9IEZhbHNlCiAgICAgICAgICAgICAgICAg - ICAgciA9IHJlcXVlc3RzLmhlYWQoZXAsIHRpbWVvdXQ9dGltZW91dCwgdmVyaWZ5PUZhbHNlKQog - ICAgICAgICAgICAgICAgZWxpZiBwcmVmaXggPT0gImh0dHBzIiBhbmQgY2VydDoKICAgICAgICAg - ICAgICAgICAgICB2ZXJpZnkgPSBjZXJ0CiAgICAgICAgICAgICAgICAgICAgciA9IHJlcXVlc3Rz - LmhlYWQoZXAsIHRpbWVvdXQ9dGltZW91dCwgdmVyaWZ5PWNlcnQpCiAgICAgICAgICAgICAgICBl - bHNlOgogICAgICAgICAgICAgICAgICAgIHIgPSByZXF1ZXN0cy5oZWFkKGVwLCB0aW1lb3V0PXRp - bWVvdXQpCiAgICAgICAgICAgICAgICBpZiByLnN0YXR1c19jb2RlID09IDIwMDoKICAgICAgICAg - ICAgICAgICAgICByZXR1cm4gcHJlZml4LCB2ZXJpZnksICIiCiAgICAgICAgICAgIGV4Y2VwdCBF - eGNlcHRpb24gYXMgZXJyOgogICAgICAgICAgICAgICAgcmVzcG9uc2VfZXJyb3IgPSBlcnIKICAg - ICAgICAgICAgICAgIGNvbnRpbnVlCiAgICAgICAgc3lzLnN0ZGVyci53cml0ZSgKICAgICAgICAg - ICAgZiJ1bmFibGUgdG8gY29ubmVjdCB0byBlbmRwb2ludDoge2VuZHBvaW50X3N0cn0sIGZhaWxl - ZCBlcnJvcjoge3Jlc3BvbnNlX2Vycm9yfSIKICAgICAgICApCiAgICAgICAgcmV0dXJuICgKICAg - ICAgICAgICAgIiIsCiAgICAgICAgICAgICIiLAogICAgICAgICAgICAoIi0xIiksCiAgICAgICAg - KQoKICAgIGRlZiBwYXJzZV9jb25maWdfZmlsZShzZWxmLCBjb25maWdfZmlsZSk6CiAgICAgICAg - Y29uZmlnID0gY29uZmlncGFyc2VyLkNvbmZpZ1BhcnNlcigpCiAgICAgICAgY29uZmlnLnJlYWQo - Y29uZmlnX2ZpbGUpCiAgICAgICAgZm9yIGFyZyBpbiBsaXN0KHZhcnMoc2VsZi5fYXJnX3BhcnNl - cikpOgogICAgICAgICAgICAjIHB5dGhvbiB0cmVhdHMgZmxhZy1uYW1lIGFzIGZsYWdfbmFtZSBp - bnRlcm5hbGx5LCBzbyBjb252ZXJ0aW5nIGJhY2sgdG8gZmxhZy1uYW1lLAogICAgICAgICAgICAj - IHNvIHdlIGNhbiBnZXQgdGhvc2UgdmFsdWVzIGZyb20gY29uZmlnIGZpbGUKICAgICAgICAgICAg - YXJndW1lbnQgPSBhcmcucmVwbGFjZSgiXyIsICItIikKICAgICAgICAgICAgYXJndW1lbnRWYWx1 - ZSA9IHN0cihnZXRhdHRyKHNlbGYuX2FyZ19wYXJzZXIsIGFyZykpCiAgICAgICAgICAgIGNvbmZp - Z192YWx1ZSA9IGNvbmZpZy5nZXQoIkNvbmZpZ3VyYXRpb25zIiwgYXJndW1lbnQsIGZhbGxiYWNr - PU5vbmUpCiAgICAgICAgICAgICMgZ2l2ZSBwcmlvcml0eSB0byBjb21tYW5kIGxpbmUgYXJndW1l - bnQsIGlmIGNvbW1hbmQgbGluZSBhcmd1bWVudCBpcyBub3QgcHJlc2VudCB1c2UgY29uZmlnLmlu - aSB2YWx1ZSwKICAgICAgICAgICAgaWYgKHN0cihzeXMuYXJndikuZmluZChhcmd1bWVudCkgPT0g - LTEpIGFuZCAoCiAgICAgICAgICAgICAgICAoY29uZmlnX3ZhbHVlICE9IE5vbmUpIGFuZCAoY29u - ZmlnX3ZhbHVlICE9ICIiKQogICAgICAgICAgICApOgogICAgICAgICAgICAgICAgc2VsZi5fYXJn - X3BhcnNlci5fX3NldGF0dHJfXyhhcmcsIGNvbmZpZ192YWx1ZSkKCiAgICAgICAgcmV0dXJuIGNv - bmZpZwoKICAgIGRlZiBfX2luaXRfXyhzZWxmLCBhcmdfbGlzdD1Ob25lKToKICAgICAgICBzZWxm - Lm91dF9tYXAgPSB7fQogICAgICAgIHNlbGYuX2V4Y2x1ZGVkX2tleXMgPSBzZXQoKQogICAgICAg - IHNlbGYuX2FyZ19wYXJzZXIgPSBzZWxmLmdlbl9hcmdfcGFyc2VyKGFyZ3NfdG9fcGFyc2U9YXJn - X2xpc3QpCiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5jb25maWdfZmlsZToKICAgICAgICA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30KICAgICAgICAgICAgc2VsZi5jbHVzdGVyID0gcmFkb3MuUmFkb3MoY29uZmZpbGU9c2Vs - Zi5jZXBoX2NvbmYsICoqa3dhcmdzKQogICAgICAgIGVsc2U6CiAgICAgICAgICAgIHNlbGYuY2x1 - c3RlciA9IHJhZG9zLlJhZG9zKCkKICAgICAgICAgICAgc2VsZi5jbHVzdGVyLmNvbmZfcmVhZF9m - aWxlKCkKICAgICAgICBzZWxmLmNsdXN0ZXIuY29ubmVjdCgpCgogICAgZGVmIHNodXRkb3duKHNl - bGYpOgogICAgICAgIGlmIHNlbGYuY2x1c3Rlci5zdGF0ZSA9PSAiY29ubmVjdGVkIjoKICAgICAg - ICAgICAgc2VsZi5jbHVzdGVyLnNodXRkb3duKCkKCiAgICBkZWYgZ2V0X2ZzaWQoc2VsZik6CiAg - ICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICByZXR1cm4gc2Vs - Zi5kcnlfcnVuKCJjZXBoIGZzaWQiKQogICAgICAgIHJldHVybiBzdHIoc2VsZi5jbHVzdGVyLmdl - dF9mc2lkKCkpCgogICAgZGVmIF9jb21tb25fY21kX2pzb25fZ2VuKHNlbGYsIGNtZF9qc29uKToK - ICAgICAgICBjbWQgPSBqc29uLmR1bXBzKGNtZF9qc29uLCBzb3J0X2tleXM9VHJ1ZSkKICAgICAg - ICByZXRfdmFsLCBjbWRfb3V0LCBlcnJfbXNnID0gc2VsZi5jbHVzdGVyLm1vbl9jb21tYW5kKGNt - ZCwgYiIiKQogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIudmVyYm9zZToKICAgICAgICAgICAg - cHJpbnQoZiJDb21tYW5kIElucHV0OiB7Y21kfSIpCiAgICAgICAgICAgIHByaW50KAogICAgICAg - ICAgICAgICAgZiJSZXR1cm4gVmFsOiB7cmV0X3ZhbH1cbkNvbW1hbmQgT3V0cHV0OiB7Y21kX291 - dH1cbiIKICAgICAgICAgICAgICAgIGYiRXJyb3IgTWVzc2FnZToge2Vycl9tc2d9XG4tLS0tLS0t - LS0tXG4iCiAgICAgICAgICAgICkKICAgICAgICBqc29uX291dCA9IHt9CiAgICAgICAgIyBpZiB0 - aGVyZSBpcyBubyBlcnJvciAoaS5lOyByZXRfdmFsIGlzIFpFUk8pIGFuZCAnY21kX291dCcgaXMg - bm90IGVtcHR5CiAgICAgICAgIyB0aGVuIGNvbnZlcnQgJ2NtZF9vdXQnIHRvIGEganNvbiBvdXRw - dXQKICAgICAgICBpZiByZXRfdmFsID09IDAgYW5kIGNtZF9vdXQ6CiAgICAgICAgICAgIGpzb25f - b3V0ID0ganNvbi5sb2FkcyhjbWRfb3V0KQogICAgICAgIHJldHVybiByZXRfdmFsLCBqc29uX291 - dCwgZXJyX21zZwoKICAgIGRlZiBnZXRfY2VwaF9leHRlcm5hbF9tb25fZGF0YShzZWxmKToKICAg - ICAgICBjbWRfanNvbiA9IHsicHJlZml4IjogInF1b3J1bV9zdGF0dXMiLCAiZm9ybWF0IjogImpz - b24ifQogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIuZHJ5X3J1bjoKICAgICAgICAgICAgcmV0 - dXJuIHNlbGYuZHJ5X3J1bigiY2VwaCAiICsgY21kX2pzb25bInByZWZpeCJdKQogICAgICAgIHJl - dF92YWwsIGpzb25fb3V0LCBlcnJfbXNnID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRf - anNvbikKICAgICAgICAjIGlmIHRoZXJlIGlzIGFuIHVuc3VjY2Vzc2Z1bCBhdHRlbXB0LAogICAg - ICAgIGlmIHJldF92YWwgIT0gMCBvciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHJh - aXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAiJ3F1b3J1bV9z - dGF0dXMnIGNvbW1hbmQgZmFpbGVkLlxuIgogICAgICAgICAgICAgICAgZiJFcnJvcjoge2Vycl9t - c2c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kciJdCiAgICAgICAgICAgIGVsaWYgbGVuKHFfbGVhZGVyX2FkZHJ2ZWMpID4gMSBh - bmQgcV9sZWFkZXJfYWRkcnZlY1sxXVsidHlwZSJdID09ICJ2MiI6CiAgICAgICAgICAgICAgICBp - cF9hZGRyID0gcV9sZWFkZXJfYWRkcnZlY1sxXVsiYWRkciJdCiAgICAgICAgICAgIGVsc2U6CiAg - ICAgICAgICAgICAgICBzeXMuc3RkZXJyLndyaXRlKAogICAgICAgICAgICAgICAgICAgICIndjIn - IGFkZHJlc3MgdHlwZSBub3QgcHJlc2VudCwgYW5kICd2Mi1wb3J0LWVuYWJsZScgZmxhZyBpcyBw - cm92aWRlZCIKICAgICAgICAgICAgICAgICkKCiAgICAgICAgcmV0dXJuIGYie3N0cihxX2xlYWRl - cl9uYW1lKX09e2lwX2FkZHJ9IgoKICAgIGRlZiBfY29udmVydF9ob3N0bmFtZV90b19pcChzZWxm - LCBob3N0X25hbWUsIHBvcnQsIGlwX3R5cGUpOgogICAgICAgICMgaWYgJ2NsdXN0ZXInIGluc3Rh - bmNlIGlzIGEgZHVtbXkgdHlwZSwKICAgICAgICAjIGNhbGwgdGhlIGR1bW15IGluc3RhbmNlJ3Mg - ImNvbnZlcnQiIG1ldGhvZAogICAgICAgIGlmIG5vdCBob3N0X25hbWU6CiAgICAgICAgICAgIHJh - aXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oIkVtcHR5IGhvc3RuYW1lIHByb3ZpZGVkIikK - ICAgICAgICBpZiBpc2luc3RhbmNlKHNlbGYuY2x1c3RlciwgRHVtbXlSYWRvcyk6CiAgICAgICAg - ICAgIHJldHVybiBzZWxmLmNsdXN0ZXIuX2NvbnZlcnRfaG9zdG5hbWVfdG9faXAoaG9zdF9uYW1l - KQoKICAgICAgICBpZiBpcF90eXBlID09ICJGUUROIjoKICAgICAgICAgICAgIyBjaGVjayB3aGlj - aCBpcCBGUUROIHNob3VsZCBiZSBjb252ZXJ0ZWQgdG8sIElQdjQgb3IgSVB2NgogICAgICAgICAg - ICAjIGNoZWNrIHRoZSBob3N0IGlwLCB0aGUgZW5kcG9pbnQgaXAgdHlwZSB3b3VsZCBiZSBzaW1p - bGFyIHRvIGhvc3QgaXAKICAgICAgICAgICAgY21kX2pzb24gPSB7InByZWZpeCI6ICJvcmNoIGhv - c3QgbHMiLCAiZm9ybWF0IjogImpzb24ifQogICAgICAgICAgICByZXRfdmFsLCBqc29uX291dCwg - ZXJyX21zZyA9IHNlbGYuX2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pzb24pCiAgICAgICAgICAg - ICMgaWYgdGhlcmUgaXMgYW4gdW5zdWNjZXNzZnVsIGF0dGVtcHQsCiAgICAgICAgICAgIGlmIHJl - dF92YWwgIT0gMCBvciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgICAgICByYWlzZSBF - eGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgICInb3JjaCBob3N0 - IGxzJyBjb21tYW5kIGZhaWxlZC5cbiIKICAgICAgICAgICAgICAgICAgICBmIkVycm9yOiB7ZXJy - X21zZyBpZiByZXRfdmFsICE9IDAgZWxzZSBzZWxmLkVNUFRZX09VVFBVVF9MSVNUfSIKICAgICAg - ICAgICAgICAgICkKICAgICAgICAgICAgaG9zdF9hZGRyID0ganNvbl9vdXRbMF1bImFkZHIiXQog - ICAgICAgICAgICAjIGFkZCA6ODAgc2FtcGxlIHBvcnQgaW4gaXBfdHlwZSwgYXMgX2ludmFsaWRf - ZW5kcG9pbnQgYWxzbyB2ZXJpZnkgcG9ydAogICAgICAgICAgICBob3N0X2lwX3R5cGUgPSBzZWxm - Ll9pbnZhbGlkX2VuZHBvaW50KGhvc3RfYWRkciArICI6ODAiKQogICAgICAgICAgICBpbXBvcnQg - c29ja2V0CgogICAgICAgICAgICBpcCA9IFtdCiAgICAgICAgICAgICMgZXhhbXBsZSBvdXRwdXQg - Wyg8QWRkcmVzc0ZhbWlseS5BRl9JTkVUOiAyPiwgPFNvY2tldEtpbmQuU09DS19TVFJFQU06IDE+ - LCA2LCAnJywgKCc5My4xODQuMjE2LjM0JywgODApKSwgLi4uXQogICAgICAgICAgICAjIHdlIG5l - ZWQgdG8gZ2V0IDkzLjE4NC4yMTYuMzQgc28gaXQgd291bGQgYmUgaXBbMF1bNF1bMF0KICAgICAg - ICAgICAgaWYgaG9zdF9pcF90eXBlID09ICJJUHY2IjoKICAgICAgICAgICAgICAgIGlwID0gc29j - a2V0LmdldGFkZHJpbmZvKAogICAgICAgICAgICAgICAgICAgIGhvc3RfbmFtZSwgcG9ydCwgZmFt - aWx5PXNvY2tldC5BRl9JTkVUNiwgcHJvdG89c29ja2V0LklQUFJPVE9fVENQCiAgICAgICAgICAg - ICAgICApCiAgICAgICAgICAgIGVsaWYgaG9zdF9pcF90eXBlID09ICJJUHY0IjoKICAgICAgICAg - ICAgICAgIGlwID0gc29ja2V0LmdldGFkZHJpbmZvKAogICAgICAgICAgICAgICAgICAgIGhvc3Rf - bmFtZSwgcG9ydCwgZmFtaWx5PXNvY2tldC5BRl9JTkVULCBwcm90bz1zb2NrZXQuSVBQUk9UT19U - Q1AKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgZGVsIHNvY2tldAogICAgICAgICAgICBy - ZXR1cm4gaXBbMF1bNF1bMF0KICAgICAgICByZXR1cm4gaG9zdF9uYW1lCgogICAgZGVmIGdldF9h - Y3RpdmVfYW5kX3N0YW5kYnlfbWdycyhzZWxmKToKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2Vy - LmRyeV9ydW46CiAgICAgICAgICAgIHJldHVybiAiIiwgc2VsZi5kcnlfcnVuKCJjZXBoIHN0YXR1 - cyIpCiAgICAgICAgbW9uaXRvcmluZ19lbmRwb2ludF9wb3J0ID0gc2VsZi5fYXJnX3BhcnNlci5t - b25pdG9yaW5nX2VuZHBvaW50X3BvcnQKICAgICAgICBtb25pdG9yaW5nX2VuZHBvaW50X2lwX2xp - c3QgPSBzZWxmLl9hcmdfcGFyc2VyLm1vbml0b3JpbmdfZW5kcG9pbnQKICAgICAgICBzdGFuZGJ5 - X21ncnMgPSBbXQogICAgICAgIGlmIG5vdCBtb25pdG9yaW5nX2VuZHBvaW50X2lwX2xpc3Q6CiAg - ICAgICAgICAgIGNtZF9qc29uID0geyJwcmVmaXgiOiAic3RhdHVzIiwgImZvcm1hdCI6ICJqc29u - In0KICAgICAgICAgICAgcmV0X3ZhbCwganNvbl9vdXQsIGVycl9tc2cgPSBzZWxmLl9jb21tb25f - Y21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAgICAgICAjIGlmIHRoZXJlIGlzIGFuIHVuc3Vj - Y2Vzc2Z1bCBhdHRlbXB0LAogICAgICAgICAgICBpZiByZXRfdmFsICE9IDAgb3IgbGVuKGpzb25f - b3V0KSA9PSAwOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlv - bigKICAgICAgICAgICAgICAgICAgICAiJ21nciBzZXJ2aWNlcycgY29tbWFuZCBmYWlsZWQuXG4i - CiAgICAgICAgICAgICAgICAgICAgZiJFcnJvcjoge2Vycl9tc2cgaWYgcmV0X3ZhbCAhPSAwIGVs - c2Ugc2VsZi5FTVBUWV9PVVRQVVRfTElTVH0iCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAg - IG1vbml0b3JpbmdfZW5kcG9pbnQgPSAoCiAgICAgICAgICAgICAgICBqc29uX291dC5nZXQoIm1n - cm1hcCIsIHt9KS5nZXQoInNlcnZpY2VzIiwge30pLmdldCgicHJvbWV0aGV1cyIsICIiKQogICAg - ICAgICAgICApCiAgICAgICAgICAgIGlmIG5vdCBtb25pdG9yaW5nX2VuZHBvaW50OgogICAgICAg + Ii0tbW9uaXRvcmluZy1lbmRwb2ludC1wb3J0IiwKICAgICAgICAgICAgZGVmYXVsdD0iIiwKICAg + ICAgICAgICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAgICAgIGhlbHA9IkNlcGggTWFuYWdlciBw + cm9tZXRoZXVzIGV4cG9ydGVyIHBvcnQiLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAu + YWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1za2lwLW1vbml0b3JpbmctZW5kcG9pbnQiLAog + ICAgICAgICAgICBkZWZhdWx0PUZhbHNlLAogICAgICAgICAgICBhY3Rpb249InN0b3JlX3RydWUi + LAogICAgICAgICAgICBoZWxwPSJEbyBub3QgY2hlY2sgZm9yIGEgbW9uaXRvcmluZyBlbmRwb2lu + dCBmb3IgdGhlIENlcGggY2x1c3RlciIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5h + ZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXJiZC1tZXRhZGF0YS1lYy1wb29sLW5hbWUiLAog + ICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxzZSwKICAgICAg + ICAgICAgaGVscD0iUHJvdmlkZXMgdGhlIG5hbWUgb2YgZXJhc3VyZSBjb2RlZCBSQkQgbWV0YWRh + dGEgcG9vbCIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAg + ICAgICAgICAgICItLWRyeS1ydW4iLAogICAgICAgICAgICBkZWZhdWx0PUZhbHNlLAogICAgICAg + ICAgICBhY3Rpb249InN0b3JlX3RydWUiLAogICAgICAgICAgICBoZWxwPSJEcnkgcnVuIHByaW50 + cyB0aGUgZXhlY3V0ZWQgY29tbWFuZHMgd2l0aG91dCBydW5uaW5nIHRoZW0iLAogICAgICAgICkK + ICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2FyZ3VtZW50KAogICAgICAgICAgICAiLS1yYWRvcy1u + YW1lc3BhY2UiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1G + YWxzZSwKICAgICAgICAgICAgaGVscD0iRGl2aWRlcyBhIHBvb2wgaW50byBzZXBhcmF0ZSBsb2dp + Y2FsIG5hbWVzcGFjZXMsIHVzZWQgZm9yIGNyZWF0aW5nIFJCRCBQVkMgaW4gYSBDZXBoQmxvY2tQ + b29sUmFkb3NOYW1lc3BhY2UgKHNob3VsZCBiZSBsb3dlciBjYXNlKSIsCiAgICAgICAgKQogICAg + ICAgIG91dHB1dF9ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLXN1YnZvbHVtZS1n + cm91cCIsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgICAgIHJlcXVpcmVkPUZhbHNl + LAogICAgICAgICAgICBoZWxwPSJwcm92aWRlcyB0aGUgbmFtZSBvZiB0aGUgc3Vidm9sdW1lIGdy + b3VwIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAg + ICAgICAgIi0tcmd3LXJlYWxtLW5hbWUiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAg + ICAgICByZXF1aXJlZD1GYWxzZSwKICAgICAgICAgICAgaGVscD0icHJvdmlkZXMgdGhlIG5hbWUg + b2YgdGhlIHJndy1yZWFsbSIsCiAgICAgICAgKQogICAgICAgIG91dHB1dF9ncm91cC5hZGRfYXJn + dW1lbnQoCiAgICAgICAgICAgICItLXJndy16b25lLW5hbWUiLAogICAgICAgICAgICBkZWZhdWx0 + PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxzZSwKICAgICAgICAgICAgaGVscD0icHJvdmlk + ZXMgdGhlIG5hbWUgb2YgdGhlIHJndy16b25lIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dy + b3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tcmd3LXpvbmVncm91cC1uYW1lIiwKICAg + ICAgICAgICAgZGVmYXVsdD0iIiwKICAgICAgICAgICAgcmVxdWlyZWQ9RmFsc2UsCiAgICAgICAg + ICAgIGhlbHA9InByb3ZpZGVzIHRoZSBuYW1lIG9mIHRoZSByZ3ctem9uZWdyb3VwIiwKICAgICAg + ICApCiAgICAgICAgb3V0cHV0X2dyb3VwLmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tdG9w + b2xvZ3ktcG9vbHMiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJl + ZD1GYWxzZSwKICAgICAgICAgICAgaGVscD0iY29tbWEtc2VwYXJhdGVkIGxpc3Qgb2YgdG9wb2xv + Z3ktY29uc3RyYWluZWQgcmJkIHBvb2xzIiwKICAgICAgICApCiAgICAgICAgb3V0cHV0X2dyb3Vw + LmFkZF9hcmd1bWVudCgKICAgICAgICAgICAgIi0tdG9wb2xvZ3ktZmFpbHVyZS1kb21haW4tbGFi + ZWwiLAogICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxzZSwK + ICAgICAgICAgICAgaGVscD0iazhzIGNsdXN0ZXIgZmFpbHVyZSBkb21haW4gbGFiZWwgKGV4YW1w + bGU6IHpvbmUsIHJhY2ssIG9yIGhvc3QpIGZvciB0aGUgdG9wb2xvZ3ktcG9vbHMgdGhhdCBtYXRj + aCB0aGUgY2VwaCBkb21haW4iLAogICAgICAgICkKICAgICAgICBvdXRwdXRfZ3JvdXAuYWRkX2Fy + Z3VtZW50KAogICAgICAgICAgICAiLS10b3BvbG9neS1mYWlsdXJlLWRvbWFpbi12YWx1ZXMiLAog + ICAgICAgICAgICBkZWZhdWx0PSIiLAogICAgICAgICAgICByZXF1aXJlZD1GYWxzZSwKICAgICAg + ICAgICAgaGVscD0iY29tbWEtc2VwYXJhdGVkIGxpc3Qgb2YgdGhlIGs4cyBjbHVzdGVyIGZhaWx1 + cmUgZG9tYWluIHZhbHVlcyBjb3JyZXNwb25kaW5nIHRvIGVhY2ggb2YgdGhlIHBvb2xzIGluIHRo + ZSBgdG9wb2xvZ3ktcG9vbHNgIGxpc3QiLAogICAgICAgICk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AgICAgIyBBZGQgY29tbWFuZC1saW5lIGFyZ3VtZW50cwogICAg + ICAgIGNvbmZpZ19ncm91cCA9IGFyZ1AuYWRkX2FyZ3VtZW50X2dyb3VwKCJjb25maWciKQogICAg + ICAgIGNvbmZpZ19ncm91cC5hZGRfYXJndW1lbnQoCiAgICAgICAgICAgICItLWNvbmZpZy1maWxl + IiwKICAgICAgICAgICAgdHlwZT1zdHIsCiAgICAgICAgICAgIGhlbHA9IlBhdGggdG8gdGhlIGNv + bmZpZ3VyYXRpb24gZmlsZSwgUHJpb3JpdHk6IGNvbW1hbmQtbGluZS1hcmdzID4gY29uZmlnLmlu + aSBmaWxlIHZhbHVlcyA+IGRlZmF1bHQgdmFsdWVzIiwKICAgICAgICAgICAgcmVxdWlyZWQ9RmFs + c2UsCiAgICAgICAgICAgIGRlZmF1bHQ9IiIsCiAgICAgICAgKQoKICAgICAgICBpZiBhcmdzX3Rv + X3BhcnNlOgogICAgICAgICAgICBhc3NlcnQgKAogICAgICAgICAgICAgICAgdHlwZShhcmdzX3Rv + X3BhcnNlKSA9PSBsaXN0CiAgICAgICAgICAgICksICJBcmd1bWVudCB0byAnZ2VuX2FyZ19wYXJz + ZXInIHNob3VsZCBiZSBhIGxpc3QiCiAgICAgICAgZWxzZToKICAgICAgICAgICAgYXJnc190b19w + YXJzZSA9IHN5cy5hcmd2WzE6XQogICAgICAgIHJldHVybiBhcmdQLnBhcnNlX2FyZ3MoYXJnc190 + b19wYXJzZSkKCiAgICBkZWYgdmFsaWRhdGVfcmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZShzZWxm + KToKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJiZF9tZXRhZGF0YV9lY19wb29sX25hbWU6 + CiAgICAgICAgICAgIHJiZF9tZXRhZGF0YV9lY19wb29sX25hbWUgPSBzZWxmLl9hcmdfcGFyc2Vy + LnJiZF9tZXRhZGF0YV9lY19wb29sX25hbWUKICAgICAgICAgICAgcmJkX3Bvb2xfbmFtZSA9IHNl + bGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9vbF9uYW1lCgogICAgICAgICAgICBpZiByYmRfcG9v + bF9uYW1lID09ICIiOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2Vw + dGlvbigKICAgICAgICAgICAgICAgICAgICAiRmxhZyAnLS1yYmQtZGF0YS1wb29sLW5hbWUnIHNo + b3VsZCBub3QgYmUgZW1wdHkiCiAgICAgICAgICAgICAgICApCgogICAgICAgICAgICBpZiByYmRf + bWV0YWRhdGFfZWNfcG9vbF9uYW1lID09ICIiOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0 + aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICAiRmxhZyAnLS1yYmQtbWV0 + YWRhdGEtZWMtcG9vbC1uYW1lJyBzaG91bGQgbm90IGJlIGVtcHR5IgogICAgICAgICAgICAgICAg + KQoKICAgICAgICAgICAgY21kX2pzb24gPSB7InByZWZpeCI6ICJvc2QgZHVtcCIsICJmb3JtYXQi + OiAianNvbiJ9CiAgICAgICAgICAgIHJldF92YWwsIGpzb25fb3V0LCBlcnJfbXNnID0gc2VsZi5f + Y29tbW9uX2NtZF9qc29uX2dlbihjbWRfanNvbikKICAgICAgICAgICAgaWYgcmV0X3ZhbCAhPSAw + IG9yIGxlbihqc29uX291dCkgPT0gMDoKICAgICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZh + aWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgZiJ7Y21kX2pzb25bJ3ByZWZpeCdd + fSBjb21tYW5kIGZhaWxlZC5cbiIKICAgICAgICAgICAgICAgICAgICBmIkVycm9yOiB7ZXJyX21z + ZyBpZiByZXRfdmFsICE9IDAgZWxzZSBzZWxmLkVNUFRZX09VVFBVVF9MSVNUfSIKICAgICAgICAg + ICAgICAgICkKICAgICAgICAgICAgbWV0YWRhdGFfcG9vbF9leGlzdCwgcG9vbF9leGlzdCA9IEZh + bHNlLCBGYWxzZQoKICAgICAgICAgICAgZm9yIGtleSBpbiBqc29uX291dFsicG9vbHMiXToKICAg + ICAgICAgICAgICAgICMgaWYgZXJhc3VyZV9jb2RlX3Byb2ZpbGUgaXMgZW1wdHkgYW5kIHBvb2wg + bmFtZSBleGlzdHMgdGhlbiBpdCByZXBsaWNhIHBvb2wKICAgICAgICAgICAgICAgIGlmICgKICAg + ICAgICAgICAgICAgICAgICBrZXlbImVyYXN1cmVfY29kZV9wcm9maWxlIl0gPT0gIiIKICAgICAg + ICAgICAgICAgICAgICBhbmQga2V5WyJwb29sX25hbWUiXSA9PSByYmRfbWV0YWRhdGFfZWNfcG9v + bF9uYW1lCiAgICAgICAgICAgICAgICApOgogICAgICAgICAgICAgICAgICAgIG1ldGFkYXRhX3Bv + b2xfZXhpc3QgPSBUcnVlCiAgICAgICAgICAgICAgICAjIGlmIGVyYXN1cmVfY29kZV9wcm9maWxl + IGlzIG5vdCBlbXB0eSBhbmQgcG9vbCBuYW1lIGV4aXN0cyB0aGVuIGl0IGlzIGVjIHBvb2wKICAg + ICAgICAgICAgICAgIGlmIGtleVsiZXJhc3VyZV9jb2RlX3Byb2ZpbGUiXSBhbmQga2V5WyJwb29s + X25hbWUiXSA9PSByYmRfcG9vbF9uYW1lOgogICAgICAgICAgICAgICAgICAgIHBvb2xfZXhpc3Qg + PSBUcnVlCgogICAgICAgICAgICBpZiBub3QgbWV0YWRhdGFfcG9vbF9leGlzdDoKICAgICAgICAg + ICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAg + ICAgIlByb3ZpZGVkIHJiZF9lY19tZXRhZGF0YV9wb29sIG5hbWUsIgogICAgICAgICAgICAgICAg + ICAgIGYiIHtyYmRfbWV0YWRhdGFfZWNfcG9vbF9uYW1lfSwgZG9lcyBub3QgZXhpc3QiCiAgICAg + ICAgICAgICAgICApCiAgICAgICAgICAgIGlmIG5vdCBwb29sX2V4aXN0OgogICAgICAgICAgICAg + ICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICBm + IlByb3ZpZGVkIHJiZF9kYXRhX3Bvb2wgbmFtZSwge3JiZF9wb29sX25hbWV9LCBkb2VzIG5vdCBl + eGlzdCIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgcmV0dXJuIHJiZF9tZXRhZGF0YV9l + Y19wb29sX25hbWUKCiAgICBkZWYgZHJ5X3J1bihzZWxmLCBtc2cpOgogICAgICAgIGlmIHNlbGYu + X2FyZ19wYXJzZXIuZHJ5X3J1bjoKICAgICAgICAgICAgcHJpbnQoIkV4ZWN1dGU6ICIgKyAiJyIg + KyBtc2cgKyAiJyIpCgogICAgZGVmIHZhbGlkYXRlX3Jnd19lbmRwb2ludF90bHNfY2VydChzZWxm + KToKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJnd190bHNfY2VydF9wYXRoOgogICAgICAg + ICAgICB3aXRoIG9wZW4oc2VsZi5fYXJnX3BhcnNlci5yZ3dfdGxzX2NlcnRfcGF0aCwgZW5jb2Rp + bmc9InV0ZjgiKSBhcyBmOgogICAgICAgICAgICAgICAgY29udGVudHMgPSBmLnJlYWQoKQogICAg + ICAgICAgICAgICAgcmV0dXJuIGNvbnRlbnRzLnJzdHJpcCgpCgogICAgZGVmIF9jaGVja19jb25m + bGljdGluZ19vcHRpb25zKHNlbGYpOgogICAgICAgIGlmIG5vdCBzZWxmLl9hcmdfcGFyc2VyLnVw + Z3JhZGUgYW5kIG5vdCBzZWxmLl9hcmdfcGFyc2VyLnJiZF9kYXRhX3Bvb2xfbmFtZToKICAgICAg + ICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICJF + aXRoZXIgJy0tdXBncmFkZScgb3IgJy0tcmJkLWRhdGEtcG9vbC1uYW1lIDxwb29sX25hbWU+JyBz + aG91bGQgYmUgc3BlY2lmaWVkIgogICAgICAgICAgICApCgogICAgZGVmIF9pbnZhbGlkX2VuZHBv + aW50KHNlbGYsIGVuZHBvaW50X3N0cik6CiAgICAgICAgIyBleHRyYWN0IHRoZSBwb3J0IGJ5IGdl + dHRpbmcgdGhlIGxhc3Qgc3BsaXQgb24gYDpgIGRlbGltaXRlcgogICAgICAgIHRyeToKICAgICAg + ICAgICAgZW5kcG9pbnRfc3RyX2lwLCBwb3J0ID0gZW5kcG9pbnRfc3RyLnJzcGxpdCgiOiIsIDEp + CiAgICAgICAgZXhjZXB0IFZhbHVlRXJyb3I6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZh + aWx1cmVFeGNlcHRpb24oZiJOb3QgYSBwcm9wZXIgZW5kcG9pbnQ6IHtlbmRwb2ludF9zdHJ9IikK + CiAgICAgICAgdHJ5OgogICAgICAgICAgICBpZiBlbmRwb2ludF9zdHJfaXBbMF0gPT0gIlsiOgog + ICAgICAgICAgICAgICAgZW5kcG9pbnRfc3RyX2lwID0gZW5kcG9pbnRfc3RyX2lwWzEgOiBsZW4o + ZW5kcG9pbnRfc3RyX2lwKSAtIDFdCiAgICAgICAgICAgIGlwX3R5cGUgPSAoCiAgICAgICAgICAg + ICAgICAiSVB2NCIgaWYgdHlwZShpcF9hZGRyZXNzKGVuZHBvaW50X3N0cl9pcCkpIGlzIElQdjRB + ZGRyZXNzIGVsc2UgIklQdjYiCiAgICAgICAgICAgICkKICAgICAgICBleGNlcHQgVmFsdWVFcnJv + cjoKICAgICAgICAgICAgaXBfdHlwZSA9ICJGUUROIgogICAgICAgIGlmIG5vdCBwb3J0LmlzZGln + aXQoKToKICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbihmIlBvcnQg + bm90IHZhbGlkOiB7cG9ydH0iKQogICAgICAgIGludFBvcnQgPSBpbnQocG9ydCkKICAgICAgICBp + ZiBpbnRQb3J0IDwgMSBvciBpbnRQb3J0ID4gMioqMTYgLSAxOgogICAgICAgICAgICByYWlzZSBF + eGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKGYiT3V0IG9mIHJhbmdlIHBvcnQgbnVtYmVyOiB7cG9y + dH0iKQoKICAgICAgICByZXR1cm4gaXBfdHlwZQoKICAgIGRlZiBlbmRwb2ludF9kaWFsKHNlbGYs + IGVuZHBvaW50X3N0ciwgaXBfdHlwZSwgdGltZW91dD0zLCBjZXJ0PU5vbmUpOgogICAgICAgICMg + aWYgdGhlICdjbHVzdGVyJyBpbnN0YW5jZSBpcyBhIGR1bW15IG9uZSwKICAgICAgICAjIGRvbid0 + IHRyeSB0byByZWFjaCBvdXQgdG8gdGhlIGVuZHBvaW50CiAgICAgICAgaWYgaXNpbnN0YW5jZShz + ZWxmLmNsdXN0ZXIsIER1bW15UmFkb3MpOgogICAgICAgICAgICByZXR1cm4gIiIsICIiLCAiIgog + ICAgICAgIGlmIGlwX3R5cGUgPT0gIklQdjYiOgogICAgICAgICAgICB0cnk6CiAgICAgICAgICAg + ICAgICBlbmRwb2ludF9zdHJfaXAsIGVuZHBvaW50X3N0cl9wb3J0ID0gZW5kcG9pbnRfc3RyLnJz + cGxpdCgiOiIsIDEpCiAgICAgICAgICAgIGV4Y2VwdCBWYWx1ZUVycm9yOgogICAgICAgICAgICAg + ICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICBm + Ik5vdCBhIHByb3BlciBlbmRwb2ludDoge2VuZHBvaW50X3N0cn0iCiAgICAgICAgICAgICAgICAp + CiAgICAgICAgICAgIGlmIGVuZHBvaW50X3N0cl9pcFswXSAhPSAiWyI6CiAgICAgICAgICAgICAg + ICBlbmRwb2ludF9zdHJfaXAgPSAiWyIgKyBlbmRwb2ludF9zdHJfaXAgKyAiXSIKICAgICAgICAg + ICAgZW5kcG9pbnRfc3RyID0gIjoiLmpvaW4oW2VuZHBvaW50X3N0cl9pcCwgZW5kcG9pbnRfc3Ry + X3BvcnRdKQoKICAgICAgICBwcm90b2NvbHMgPSBbImh0dHAiLCAiaHR0cHMiXQogICAgICAgIHJl + c3BvbnNlX2Vycm9yID0gTm9uZQogICAgICAgIGZvciBwcmVmaXggaW4gcHJvdG9jb2xzOgogICAg + ICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICBlcCA9IGYie3ByZWZpeH06Ly97ZW5kcG9pbnRf + c3RyfSIKICAgICAgICAgICAgICAgIHZlcmlmeSA9IE5vbmUKICAgICAgICAgICAgICAgICMgSWYg + dmVyaWZ5IGlzIHNldCB0byBhIHBhdGggdG8gYSBkaXJlY3RvcnksCiAgICAgICAgICAgICAgICAj + IHRoZSBkaXJlY3RvcnkgbXVzdCBoYXZlIGJlZW4gcHJvY2Vzc2VkIHVzaW5nIHRoZSBjX3JlaGFz + aCB1dGlsaXR5IHN1cHBsaWVkIHdpdGggT3BlblNTTC4KICAgICAgICAgICAgICAgIGlmIHByZWZp + eCA9PSAiaHR0cHMiIGFuZCBzZWxmLl9hcmdfcGFyc2VyLnJnd19za2lwX3RsczoKICAgICAgICAg + ICAgICAgICAgICB2ZXJpZnkgPSBGYWxzZQogICAgICAgICAgICAgICAgICAgIHIgPSByZXF1ZXN0 + cy5oZWFkKGVwLCB0aW1lb3V0PXRpbWVvdXQsIHZlcmlmeT1GYWxzZSkKICAgICAgICAgICAgICAg + IGVsaWYgcHJlZml4ID09ICJodHRwcyIgYW5kIGNlcnQ6CiAgICAgICAgICAgICAgICAgICAgdmVy + aWZ5ID0gY2VydAogICAgICAgICAgICAgICAgICAgIHIgPSByZXF1ZXN0cy5oZWFkKGVwLCB0aW1l + b3V0PXRpbWVvdXQsIHZlcmlmeT1jZXJ0KQogICAgICAgICAgICAgICAgZWxzZToKICAgICAgICAg + ICAgICAgICAgICByID0gcmVxdWVzdHMuaGVhZChlcCwgdGltZW91dD10aW1lb3V0KQogICAgICAg + ICAgICAgICAgaWYgci5zdGF0dXNfY29kZSA9PSAyMDA6CiAgICAgICAgICAgICAgICAgICAgcmV0 + dXJuIHByZWZpeCwgdmVyaWZ5LCAiIgogICAgICAgICAgICBleGNlcHQgRXhjZXB0aW9uIGFzIGVy + cjoKICAgICAgICAgICAgICAgIHJlc3BvbnNlX2Vycm9yID0gZXJyCiAgICAgICAgICAgICAgICBj + b250aW51ZQogICAgICAgIHN5cy5zdGRlcnIud3JpdGUoCiAgICAgICAgICAgIGYidW5hYmxlIHRv + IGNvbm5lY3QgdG8gZW5kcG9pbnQ6IHtlbmRwb2ludF9zdHJ9LCBmYWlsZWQgZXJyb3I6IHtyZXNw + b25zZV9lcnJvcn0iCiAgICAgICAgKQogICAgICAgIHJldHVybiAoCiAgICAgICAgICAgICIiLAog + ICAgICAgICAgICAiIiwKICAgICAgICAgICAgKCItMSIpLAogICAgICAgICkKCiAgICBkZWYgcGFy + c2VfY29uZmlnX2ZpbGUoc2VsZiwgY29uZmlnX2ZpbGUpOgogICAgICAgIGNvbmZpZyA9IGNvbmZp + Z3BhcnNlci5Db25maWdQYXJzZXIoKQogICAgICAgIGNvbmZpZy5yZWFkKGNvbmZpZ19maWxlKQog + ICAgICAgIGZvciBhcmcgaW4gbGlzdCh2YXJzKHNlbGYuX2FyZ19wYXJzZXIpKToKICAgICAgICAg + ICAgIyBweXRob24gdHJlYXRzIGZsYWctbmFtZSBhcyBmbGFnX25hbWUgaW50ZXJuYWxseSwgc28g + Y29udmVydGluZyBiYWNrIHRvIGZsYWctbmFtZSwKICAgICAgICAgICAgIyBzbyB3ZSBjYW4gZ2V0 + IHRob3NlIHZhbHVlcyBmcm9tIGNvbmZpZyBmaWxlCiAgICAgICAgICAgIGFyZ3VtZW50ID0gYXJn + LnJlcGxhY2UoIl8iLCAiLSIpCiAgICAgICAgICAgIGFyZ3VtZW50VmFsdWUgPSBzdHIoZ2V0YXR0 + cihzZWxmLl9hcmdfcGFyc2VyLCBhcmcpKQogICAgICAgICAgICBjb25maWdfdmFsdWUgPSBjb25m + aWcuZ2V0KCJDb25maWd1cmF0aW9ucyIsIGFyZ3VtZW50LCBmYWxsYmFjaz1Ob25lKQogICAgICAg + ICAgICAjIGdpdmUgcHJpb3JpdHkgdG8gY29tbWFuZCBsaW5lIGFyZ3VtZW50LCBpZiBjb21tYW5k + IGxpbmUgYXJndW1lbnQgaXMgbm90IHByZXNlbnQgdXNlIGNvbmZpZy5pbmkgdmFsdWUsCiAgICAg + ICAgICAgIGlmIChzdHIoc3lzLmFyZ3YpLmZpbmQoYXJndW1lbnQpID09IC0xKSBhbmQgKAogICAg + ICAgICAgICAgICAgKGNvbmZpZ192YWx1ZSAhPSBOb25lKSBhbmQgKGNvbmZpZ192YWx1ZSAhPSAi + IikKICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIuX19zZXRh + dHRyX18oYXJnLCBjb25maWdfdmFsdWUpCgogICAgICAgIHJldHVybiBjb25maWcKCiAgICBkZWYg + X19pbml0X18oc2VsZiwgYXJnX2xpc3Q9Tm9uZSk6CiAgICAgICAgc2VsZi5vdXRfbWFwID0ge30K + ICAgICAgICBzZWxmLl9leGNsdWRlZF9rZXlzID0gc2V0KCkKICAgICAgICBzZWxmLl9hcmdfcGFy + c2VyID0gc2VsZi5nZW5fYXJnX3BhcnNlcihhcmdzX3RvX3BhcnNlPWFyZ19saXN0KQogICAgICAg + IGlmIHNlbGYuX2FyZ19wYXJzZXIuY29uZmlnX2ZpbGU6CiAgICAgICAgICAgIHNlbGYuY29uZmln + ID0gc2VsZi5wYXJzZV9jb25maWdfZmlsZShzZWxmLl9hcmdfcGFyc2VyLmNvbmZpZ19maWxlKQog + ICAgICAgIHNlbGYuX2NoZWNrX2NvbmZsaWN0aW5nX29wdGlvbnMoKQogICAgICAgIHNlbGYucnVu + X2FzX3VzZXIgPSBzZWxmLl9hcmdfcGFyc2VyLnJ1bl9hc191c2VyCiAgICAgICAgc2VsZi5vdXRw + dXRfZmlsZSA9IHNl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gIGRlZiBzaHV0ZG93bihzZWxmKToKICAgICAgICBp + ZiBzZWxmLmNsdXN0ZXIuc3RhdGUgPT0gImNvbm5lY3RlZCI6CiAgICAgICAgICAgIHNlbGYuY2x1 + c3Rlci5zaHV0ZG93bigpCgogICAgZGVmIGdldF9mc2lkKHNlbGYpOgogICAgICAgIGlmIHNlbGYu + X2FyZ19wYXJzZXIuZHJ5X3J1bjoKICAgICAgICAgICAgcmV0dXJuIHNlbGYuZHJ5X3J1bigiY2Vw + aCBmc2lkIikKICAgICAgICByZXR1cm4gc3RyKHNlbGYuY2x1c3Rlci5nZXRfZnNpZCgpKQoKICAg + IGRlZiBfY29tbW9uX2NtZF9qc29uX2dlbihzZWxmLCBjbWRfanNvbik6CiAgICAgICAgY21kID0g + anNvbi5kdW1wcyhjbWRfanNvbiwgc29ydF9rZXlzPVRydWUpCiAgICAgICAgcmV0X3ZhbCwgY21k + X291dCwgZXJyX21zZyA9IHNlbGYuY2x1c3Rlci5tb25fY29tbWFuZChjbWQsIGIiIikKICAgICAg + ICBpZiBzZWxmLl9hcmdfcGFyc2VyLnZlcmJvc2U6CiAgICAgICAgICAgIHByaW50KGYiQ29tbWFu + ZCBJbnB1dDoge2NtZH0iKQogICAgICAgICAgICBwcmludCgKICAgICAgICAgICAgICAgIGYiUmV0 + dXJuIFZhbDoge3JldF92YWx9XG5Db21tYW5kIE91dHB1dDoge2NtZF9vdXR9XG4iCiAgICAgICAg + ICAgICAgICBmIkVycm9yIE1lc3NhZ2U6IHtlcnJfbXNnfVxuLS0tLS0tLS0tLVxuIgogICAgICAg + ICAgICApCiAgICAgICAganNvbl9vdXQgPSB7fQogICAgICAgICMgaWYgdGhlcmUgaXMgbm8gZXJy + b3IgKGkuZTsgcmV0X3ZhbCBpcyBaRVJPKSBhbmQgJ2NtZF9vdXQnIGlzIG5vdCBlbXB0eQogICAg + ICAgICMgdGhlbiBjb252ZXJ0ICdjbWRfb3V0JyB0byBhIGpzb24gb3V0cHV0CiAgICAgICAgaWYg + cmV0X3ZhbCA9PSAwIGFuZCBjbWRfb3V0OgogICAgICAgICAgICBqc29uX291dCA9IGpzb24ubG9h + ZHMoY21kX291dCkKICAgICAgICByZXR1cm4gcmV0X3ZhbCwganNvbl9vdXQsIGVycl9tc2cKCiAg + ICBkZWYgZ2V0X2NlcGhfZXh0ZXJuYWxfbW9uX2RhdGEoc2VsZik6CiAgICAgICAgY21kX2pzb24g + PSB7InByZWZpeCI6ICJxdW9ydW1fc3RhdHVzIiwgImZvcm1hdCI6ICJqc29uIn0KICAgICAgICBp + ZiBzZWxmLl9hcmdfcGFyc2VyLmRyeV9ydW46CiAgICAgICAgICAgIHJldHVybiBzZWxmLmRyeV9y + dW4oImNlcGggIiArIGNtZF9qc29uWyJwcmVmaXgiXSkKICAgICAgICByZXRfdmFsLCBqc29uX291 + dCwgZXJyX21zZyA9IHNlbGYuX2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pzb24pCiAgICAgICAg + IyBpZiB0aGVyZSBpcyBhbiB1bnN1Y2Nlc3NmdWwgYXR0ZW1wdCwKICAgICAgICBpZiByZXRfdmFs + ICE9IDAgb3IgbGVuKGpzb25fb3V0KSA9PSAwOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25G + YWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgIidxdW9ydW1fc3RhdHVzJyBjb21tYW5k + IGZhaWxlZC5cbiIKICAgICAgICAgICAgICAgIGYiRXJyb3I6IHtlcnJfbXNnIGlmIHJldF92YWwg + IT0gMCBlbHNlIHNlbGYuRU1QVFlfT1VUUFVUX0xJU1R9IgogICAgICAgICAgICApCiAgICAgICAg + cV9sZWFkZXJfbmFtZSA9IGpzb25fb3V0WyJxdW9ydW1fbGVhZGVyX25hbWUiXQogICAgICAgIHFf + bGVhZGVyX2RldGFpbHMgPSB7fQogICAgICAgIHFfbGVhZGVyX21hdGNoaW5nX2xpc3QgPSBbCiAg + ICAgICAgICAgIGwgZm9yIGwgaW4ganNvbl9vdXRbIm1vbm1hcCJdWyJtb25zIl0gaWYgbFsibmFt + ZSJdID09IHFfbGVhZGVyX25hbWUKICAgICAgICBdCiAgICAgICAgaWYgbGVuKHFfbGVhZGVyX21h + dGNoaW5nX2xpc3QpID09IDA6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNl + cHRpb24oIk5vIG1hdGNoaW5nICdtb24nIGRldGFpbHMgZm91bmQiKQogICAgICAgIHFfbGVhZGVy + X2RldGFpbHMgPSBxX2xlYWRlcl9tYXRjaGluZ19saXN0WzBdCiAgICAgICAgIyBnZXQgdGhlIGFk + ZHJlc3MgdmVjdG9yIG9mIHRoZSBxdW9ydW0tbGVhZGVyCiAgICAgICAgcV9sZWFkZXJfYWRkcnZl + YyA9IHFfbGVhZGVyX2RldGFpbHMuZ2V0KCJwdWJsaWNfYWRkcnMiLCB7fSkuZ2V0KCJhZGRydmVj + IiwgW10pCiAgICAgICAgaXBfYWRkciA9IHN0cihxX2xlYWRlcl9kZXRhaWxzWyJwdWJsaWNfYWRk + ciJdLnNwbGl0KCIvIilbMF0pCgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIudjJfcG9ydF9l + bmFibGU6CiAgICAgICAgICAgIGlmIHFfbGVhZGVyX2FkZHJ2ZWNbMF1bInR5cGUiXSA9PSAidjIi + OgogICAgICAgICAgICAgICAgaXBfYWRkciA9IHFfbGVhZGVyX2FkZHJ2ZWNbMF1bImFkZHIiXQog + ICAgICAgICAgICBlbGlmIGxlbihxX2xlYWRlcl9hZGRydmVjKSA+IDEgYW5kIHFfbGVhZGVyX2Fk + ZHJ2ZWNbMV1bInR5cGUiXSA9PSAidjIiOgogICAgICAgICAgICAgICAgaXBfYWRkciA9IHFfbGVh + ZGVyX2FkZHJ2ZWNbMV1bImFkZHIiXQogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAg + c3lzLnN0ZGVyci53cml0ZSgKICAgICAgICAgICAgICAgICAgICAiJ3YyJyBhZGRyZXNzIHR5cGUg + bm90IHByZXNlbnQsIGFuZCAndjItcG9ydC1lbmFibGUnIGZsYWcgaXMgcHJvdmlkZWQiCiAgICAg + ICAgICAgICAgICApCgogICAgICAgIHJldHVybiBmIntzdHIocV9sZWFkZXJfbmFtZSl9PXtpcF9h + ZGRyfSIKCiAgICBkZWYgX2NvbnZlcnRfaG9zdG5hbWVfdG9faXAoc2VsZiwgaG9zdF9uYW1lLCBw + b3J0LCBpcF90eXBlKToKICAgICAgICAjIGlmICdjbHVzdGVyJyBpbnN0YW5jZSBpcyBhIGR1bW15 + IHR5cGUsCiAgICAgICAgIyBjYWxsIHRoZSBkdW1teSBpbnN0YW5jZSdzICJjb252ZXJ0IiBtZXRo + b2QKICAgICAgICBpZiBub3QgaG9zdF9uYW1lOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25G + YWlsdXJlRXhjZXB0aW9uKCJFbXB0eSBob3N0bmFtZSBwcm92aWRlZCIpCiAgICAgICAgaWYgaXNp + bnN0YW5jZShzZWxmLmNsdXN0ZXIsIER1bW15UmFkb3MpOgogICAgICAgICAgICByZXR1cm4gc2Vs + Zi5jbHVzdGVyLl9jb252ZXJ0X2hvc3RuYW1lX3RvX2lwKGhvc3RfbmFtZSkKCiAgICAgICAgaWYg + aXBfdHlwZSA9PSAiRlFETiI6CiAgICAgICAgICAgICMgY2hlY2sgd2hpY2ggaXAgRlFETiBzaG91 + bGQgYmUgY29udmVydGVkIHRvLCBJUHY0IG9yIElQdjYKICAgICAgICAgICAgIyBjaGVjayB0aGUg + aG9zdCBpcCwgdGhlIGVuZHBvaW50IGlwIHR5cGUgd291bGQgYmUgc2ltaWxhciB0byBob3N0IGlw + CiAgICAgICAgICAgIGNtZF9qc29uID0geyJwcmVmaXgiOiAib3JjaCBob3N0IGxzIiwgImZvcm1h + dCI6ICJqc29uIn0KICAgICAgICAgICAgcmV0X3ZhbCwganNvbl9vdXQsIGVycl9tc2cgPSBzZWxm + Ll9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAgICAgICAjIGlmIHRoZXJlIGlz + IGFuIHVuc3VjY2Vzc2Z1bCBhdHRlbXB0LAogICAgICAgICAgICBpZiByZXRfdmFsICE9IDAgb3Ig + bGVuKGpzb25fb3V0KSA9PSAwOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVy + ZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICAiJ29yY2ggaG9zdCBscycgY29tbWFuZCBm + YWlsZWQuXG4iCiAgICAgICAgICAgICAgICAgICAgZiJFcnJvcjoge2Vycl9tc2cgaWYgcmV0X3Zh + bCAhPSAwIGVsc2Ugc2VsZi5FTVBUWV9PVVRQVVRfTElTVH0iCiAgICAgICAgICAgICAgICApCiAg + ICAgICAgICAgIGhvc3RfYWRkciA9IGpzb25fb3V0WzBdWyJhZGRyIl0KICAgICAgICAgICAgIyBh + ZGQgOjgwIHNhbXBsZSBwb3J0IGluIGlwX3R5cGUsIGFzIF9pbnZhbGlkX2VuZHBvaW50IGFsc28g + dmVyaWZ5IHBvcnQKICAgICAgICAgICAgaG9zdF9pcF90eXBlID0gc2VsZi5faW52YWxpZF9lbmRw + b2ludChob3N0X2FkZHIgKyAiOjgwIikKICAgICAgICAgICAgaW1wb3J0IHNvY2tldAoKICAgICAg + ICAgICAgaXAgPSBbXQogICAgICAgICAgICAjIGV4YW1wbGUgb3V0cHV0IFsoPEFkZHJlc3NGYW1p + bHkuQUZfSU5FVDogMj4sIDxTb2NrZXRLaW5kLlNPQ0tfU1RSRUFNOiAxPiwgNiwgJycsICgnOTMu + MTg0LjIxNi4zNCcsIDgwKSksIC4uLl0KICAgICAgICAgICAgIyB3ZSBuZWVkIHRvIGdldCA5My4x + ODQuMjE2LjM0IHNvIGl0IHdvdWxkIGJlIGlwWzBdWzRdWzBdCiAgICAgICAgICAgIGlmIGhvc3Rf + aXBfdHlwZSA9PSAiSVB2NiI6CiAgICAgICAgICAgICAgICBpcCA9IHNvY2tldC5nZXRhZGRyaW5m + bygKICAgICAgICAgICAgICAgICAgICBob3N0X25hbWUsIHBvcnQsIGZhbWlseT1zb2NrZXQuQUZf + SU5FVDYsIHByb3RvPXNvY2tldC5JUFBST1RPX1RDUAogICAgICAgICAgICAgICAgKQogICAgICAg + ICAgICBlbGlmIGhvc3RfaXBfdHlwZSA9PSAiSVB2NCI6CiAgICAgICAgICAgICAgICBpcCA9IHNv + Y2tldC5nZXRhZGRyaW5mbygKICAgICAgICAgICAgICAgICAgICBob3N0X25hbWUsIHBvcnQsIGZh + bWlseT1zb2NrZXQuQUZfSU5FVCwgcHJvdG89c29ja2V0LklQUFJPVE9fVENQCiAgICAgICAgICAg + ICAgICApCiAgICAgICAgICAgIGRlbCBzb2NrZXQKICAgICAgICAgICAgcmV0dXJuIGlwWzBdWzRd + WzBdCiAgICAgICAgcmV0dXJuIGhvc3RfbmFtZQoKICAgIGRlZiBnZXRfYWN0aXZlX2FuZF9zdGFu + ZGJ5X21ncnMoc2VsZik6CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAg + ICAgICAgICByZXR1cm4gIiIsIHNlbGYuZHJ5X3J1bigiY2VwaCBzdGF0dXMiKQogICAgICAgIG1v + bml0b3JpbmdfZW5kcG9pbnRfcG9ydCA9IHNlbGYuX2FyZ19wYXJzZXIubW9uaXRvcmluZ19lbmRw + b2ludF9wb3J0CiAgICAgICAgbW9uaXRvcmluZ19lbmRwb2ludF9pcF9saXN0ID0gc2VsZi5fYXJn + X3BhcnNlci5tb25pdG9yaW5nX2VuZHBvaW50CiAgICAgICAgc3RhbmRieV9tZ3JzID0gW10KICAg + ICAgICBpZiBub3QgbW9uaXRvcmluZ19lbmRwb2ludF9pcF9saXN0OgogICAgICAgICAgICBjbWRf + anNvbiA9IHsicHJlZml4IjogInN0YXR1cyIsICJmb3JtYXQiOiAianNvbiJ9CiAgICAgICAgICAg + IHJldF92YWwsIGpzb25fb3V0LCBlcnJfbXNnID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihj + bWRfanNvbikKICAgICAgICAgICAgIyBpZiB0aGVyZSBpcyBhbiB1bnN1Y2Nlc3NmdWwgYXR0ZW1w + dCwKICAgICAgICAgICAgaWYgcmV0X3ZhbCAhPSAwIG9yIGxlbihqc29uX291dCkgPT0gMDoKICAg + ICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAg + ICAgICAgICAgIidtZ3Igc2VydmljZXMnIGNvbW1hbmQgZmFpbGVkLlxuIgogICAgICAgICAgICAg + ICAgICAgIGYiRXJyb3I6IHtlcnJfbXNnIGlmIHJldF92YWwgIT0gMCBlbHNlIHNlbGYuRU1QVFlf + T1VUUFVUX0xJU1R9IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBtb25pdG9yaW5nX2Vu + ZHBvaW50ID0gKAogICAgICAgICAgICAgICAganNvbl9vdXQuZ2V0KCJtZ3JtYXAiLCB7fSkuZ2V0 + KCJzZXJ2aWNlcyIsIHt9KS5nZXQoInByb21ldGhldXMiLCAiIikKICAgICAgICAgICAgKQogICAg + ICAgICAgICBpZiBub3QgbW9uaXRvcmluZ19lbmRwb2ludDoKICAgICAgICAgICAgICAgIHJhaXNl + IEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgImNhbid0IGZp + bmQgbW9uaXRvcmluZ19lbmRwb2ludCwgcHJvbWV0aGV1cyBtb2R1bGUgbWlnaHQgbm90IGJlIGVu + YWJsZWQsICIKICAgICAgICAgICAgICAgICAgICAiZW5hYmxlIHRoZSBtb2R1bGUgYnkgcnVubmlu + ZyAnY2VwaCBtZ3IgbW9kdWxlIGVuYWJsZSBwcm9tZXRoZXVzJyIKICAgICAgICAgICAgICAgICkK + ICAgICAgICAgICAgIyBub3cgY2hlY2sgdGhlIHN0YW5kLWJ5IG1nci1zCiAgICAgICAgICAgIHN0 + YW5kYnlfYXJyID0ganNvbl9vdXQuZ2V0KCJtZ3JtYXAiLCB7fSkuZ2V0KCJzdGFuZGJ5cyIsIFtd + KQogICAgICAgICAgICBmb3IgZWFjaF9zdGFuZGJ5IGluIHN0YW5kYnlfYXJyOgogICAgICAgICAg + ICAgICAgaWYgIm5hbWUiIGluIGVhY2hfc3RhbmRieS5rZXlzKCk6CiAgICAgICAgICAgICAgICAg + ICAgc3RhbmRieV9tZ3JzLmFwcGVuZChlYWNoX3N0YW5kYnlbIm5hbWUiXSkKICAgICAgICAgICAg + dHJ5OgogICAgICAgICAgICAgICAgcGFyc2VkX2VuZHBvaW50ID0gdXJscGFyc2UobW9uaXRvcmlu + Z19lbmRwb2ludCkKICAgICAgICAgICAgZXhjZXB0IFZhbHVlRXJyb3I6CiAgICAgICAgICAgICAg + ICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgIGYi + aW52YWxpZCBlbmRwb2ludDoge21vbml0b3JpbmdfZW5kcG9pbnR9IgogICAgICAgICAgICAgICAg + KQogICAgICAgICAgICBtb25pdG9yaW5nX2VuZHBvaW50X2lwX2xpc3QgPSBwYXJzZWRfZW5kcG9p + bnQuaG9zdG5hbWUKICAgICAgICAgICAgaWYgbm90IG1vbml0b3JpbmdfZW5kcG9pbnRfcG9ydDoK + ICAgICAgICAgICAgICAgIG1vbml0b3JpbmdfZW5kcG9pbnRfcG9ydCA9IHN0cihwYXJzZWRfZW5k + cG9pbnQucG9ydCkKCiAgICAgICAgIyBpZiBtb25pdG9yaW5nIGVuZHBvaW50IHBvcnQgaXMgbm90 + IHNldCwgcHV0IGEgZGVmYXVsdCBtb24gcG9ydAogICAgICAgIGlmIG5vdCBtb25pdG9yaW5nX2Vu + ZHBvaW50X3BvcnQ6CiAgICAgICAgICAgIG1vbml0b3JpbmdfZW5kcG9pbnRfcG9ydCA9IHNlbGYu + REVGQVVMVF9NT05JVE9SSU5HX0VOR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5nX2VuZHBvaW50ID0gIjoiLmpvaW4oCiAgICAg + ICAgICAgIFttb25pdG9yaW5nX2VuZHBvaW50X2lwLCBtb25pdG9yaW5nX2VuZHBvaW50X3BvcnRd + CiAgICAgICAgKQogICAgICAgIGlwX3R5cGUgPSBzZWxmLl9pbnZhbGlkX2VuZHBvaW50KG1vbml0 + b3JpbmdfZW5kcG9pbnQpCiAgICAgICAgdHJ5OgogICAgICAgICAgICBtb25pdG9yaW5nX2VuZHBv + aW50X2lwID0gc2VsZi5fY29udmVydF9ob3N0bmFtZV90b19pcCgKICAgICAgICAgICAgICAgIG1v + bml0b3JpbmdfZW5kcG9pbnRfaXAsIG1vbml0b3JpbmdfZW5kcG9pbnRfcG9ydCwgaXBfdHlwZQog + ICAgICAgICAgICApCiAgICAgICAgICAgICMgY29sbGVjdCBhbGwgdGhlICdzdGFuZC1ieScgbWdy + IGlwcwogICAgICAgICAgICBtZ3JfaXBzID0gW10KICAgICAgICAgICAgZm9yIGVhY2hfc3RhbmRi + eV9tZ3IgaW4gc3RhbmRieV9tZ3JzOgogICAgICAgICAgICAgICAgZmFpbGVkX2lwID0gZWFjaF9z + dGFuZGJ5X21ncgogICAgICAgICAgICAgICAgbWdyX2lwcy5hcHBlbmQoCiAgICAgICAgICAgICAg + ICAgICAgc2VsZi5fY29udmVydF9ob3N0bmFtZV90b19pcCgKICAgICAgICAgICAgICAgICAgICAg + ICAgZWFjaF9zdGFuZGJ5X21nciwgbW9uaXRvcmluZ19lbmRwb2ludF9wb3J0LCBpcF90eXBlCiAg + ICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgKQogICAgICAgIGV4Y2VwdDoKICAg ICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAg - ICAgICAiY2FuJ3QgZmluZCBtb25pdG9yaW5nX2VuZHBvaW50LCBwcm9tZXRoZXVzIG1vZHVsZSBt - aWdodCBub3QgYmUgZW5hYmxlZCwgIgogICAgICAgICAgICAgICAgICAgICJlbmFibGUgdGhlIG1v - ZHVsZSBieSBydW5uaW5nICdjZXBoIG1nciBtb2R1bGUgZW5hYmxlIHByb21ldGhldXMnIgogICAg - ICAgICAgICAgICAgKQogICAgICAgICAgICAjIG5vdyBjaGVjayB0aGUgc3RhbmQtYnkgbWdyLXMK - ICAgICAgICAgICAgc3RhbmRieV9hcnIgPSBqc29uX291dC5nZXQoIm1ncm1hcCIsIHt9KS5nZXQo - InN0YW5kYnlzIiwgW10pCiAgICAgICAgICAgIGZvciBlYWNoX3N0YW5kYnkgaW4gc3RhbmRieV9h - cnI6CiAgICAgICAgICAgICAgICBpZiAibmFtZSIgaW4gZWFjaF9zdGFuZGJ5LmtleXMoKToKICAg - ICAgICAgICAgICAgICAgICBzdGFuZGJ5X21ncnMuYXBwZW5kKGVhY2hfc3RhbmRieVsibmFtZSJd - KQogICAgICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICBwYXJzZWRfZW5kcG9pbnQgPSB1cmxw - YXJzZShtb25pdG9yaW5nX2VuZHBvaW50KQogICAgICAgICAgICBleGNlcHQgVmFsdWVFcnJvcjoK - ICAgICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAg - ICAgICAgICAgICAgZiJpbnZhbGlkIGVuZHBvaW50OiB7bW9uaXRvcmluZ19lbmRwb2ludH0iCiAg - ICAgICAgICAgICAgICApCiAgICAgICAgICAgIG1vbml0b3JpbmdfZW5kcG9pbnRfaXBfbGlzdCA9 - IHBhcnNlZF9lbmRwb2ludC5ob3N0bmFtZQogICAgICAgICAgICBpZiBub3QgbW9uaXRvcmluZ19l - bmRwb2ludF9wb3J0OgogICAgICAgICAgICAgICAgbW9uaXRvcmluZ19lbmRwb2ludF9wb3J0ID0g - c3RyKHBhcnNlZF9lbmRwb2ludC5wb3J0KQoKICAgICAgICAjIGlmIG1vbml0b3JpbmcgZW5kcG9p - bnQgcG9yd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lfbWdycycgbGlzdAogICAgICAgIHN0YW5kYnlfbWdycy5leHRlbmQo - bW9uaXRvcmluZ19lbmRwb2ludF9pcF9saXN0X3NwbGl0WzE6XSkKICAgICAgICBmYWlsZWRfaXAg - PSBtb25pdG9yaW5nX2VuZHBvaW50X2lwCgogICAgICAgIG1vbml0b3JpbmdfZW5kcG9pbnQgPSAi - OiIuam9pbigKICAgICAgICAgICAgW21vbml0b3JpbmdfZW5kcG9pbnRfaXAsIG1vbml0b3Jpbmdf - ZW5kcG9pbnRfcG9ydF0KICAgICAgICApCiAgICAgICAgaXBfdHlwZSA9IHNlbGYuX2ludmFsaWRf - ZW5kcG9pbnQobW9uaXRvcmluZ19lbmRwb2ludCkKICAgICAgICB0cnk6CiAgICAgICAgICAgIG1v - bml0b3JpbmdfZW5kcG9pbnRfaXAgPSBzZWxmLl9jb252ZXJ0X2hvc3RuYW1lX3RvX2lwKAogICAg - ICAgICAgICAgICAgbW9uaXRvcmluZ19lbmRwb2ludF9pcCwgbW9uaXRvcmluZ19lbmRwb2ludF9w - b3J0LCBpcF90eXBlCiAgICAgICAgICAgICkKICAgICAgICAgICAgIyBjb2xsZWN0IGFsbCB0aGUg - J3N0YW5kLWJ5JyBtZ3IgaXBzCiAgICAgICAgICAgIG1ncl9pcHMgPSBbXQogICAgICAgICAgICBm - b3IgZWFjaF9zdGFuZGJ5X21nciBpbiBzdGFuZGJ5X21ncnM6CiAgICAgICAgICAgICAgICBmYWls - ZWRfaXAgPSBlYWNoX3N0YW5kYnlfbWdyCiAgICAgICAgICAgICAgICBtZ3JfaXBzLmFwcGVuZCgK - ICAgICAgICAgICAgICAgICAgICBzZWxmLl9jb252ZXJ0X2hvc3RuYW1lX3RvX2lwKAogICAgICAg - ICAgICAgICAgICAgICAgICBlYWNoX3N0YW5kYnlfbWdyLCBtb25pdG9yaW5nX2VuZHBvaW50X3Bv - cnQsIGlwX3R5cGUKICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICApCiAgICAg - ICAgZXhjZXB0OgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAog - ICAgICAgICAgICAgICAgZiJDb252ZXJzaW9uIG9mIGhvc3Q6IHtmYWlsZWRfaXB9IHRvIElQIGZh - aWxlZC4gIgogICAgICAgICAgICAgICAgIlBsZWFzZSBlbnRlciB0aGUgSVAgYWRkcmVzc2VzIG9m - IGFsbCB0aGUgY2VwaC1tZ3JzIHdpdGggdGhlICctLW1vbml0b3JpbmctZW5kcG9pbnQnIGZsYWci - CiAgICAgICAgICAgICkKCiAgICAgICAgXywgXywgZXJyID0gc2VsZi5lbmRwb2ludF9kaWFsKG1v - bml0b3JpbmdfZW5kcG9pbnQsIGlwX3R5cGUpCiAgICAgICAgaWYgZXJyID09ICItMSI6CiAgICAg - ICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oZXJyKQogICAgICAgICMgYWRk - IHRoZSB2YWxpZGF0ZWQgYWN0aXZlIG1nciBJUCBpbnRvIHRoZSBmaXJzdCBpbmRleAogICAgICAg - IG1ncl9pcHMuaW5zZXJ0KDAsIG1vbml0b3JpbmdfZW5kcG9pbnRfaXApCiAgICAgICAgYWxsX21n - cl9pcHNfc3RyID0gIiwiLmpvaW4obWdyX2lwcykKICAgICAgICByZXR1cm4gYWxsX21ncl9pcHNf - c3RyLCBtb25pdG9yaW5nX2VuZHBvaW50X3BvcnQKCiAgICBkZWYgY2hlY2tfdXNlcl9leGlzdChz - ZWxmLCB1c2VyKToKICAgICAgICBjbWRfanNvbiA9IHsicHJlZml4IjogImF1dGggZ2V0IiwgImVu - dGl0eSI6IGYie3VzZXJ9IiwgImZvcm1hdCI6ICJqc29uIn0KICAgICAgICByZXRfdmFsLCBqc29u - X291dCwgXyA9IHNlbGYuX2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pzb24pCiAgICAgICAgaWYg - cmV0X3ZhbCAhPSAwIG9yIGxlbihqc29uX291dCkgPT0gMDoKICAgICAgICAgICAgcmV0dXJuICIi - CiAgICAgICAgcmV0dXJuIHN0cihqc29uX291dFswXVsia2V5Il0pCgogICAgZGVmIGdldF9jZXBo - ZnNfcHJvdmlzaW9uZXJfY2Fwc19hbmRfZW50aXR5KHNlbGYpOgogICAgICAgIGVudGl0eSA9ICJj - bGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciIKICAgICAgICBjYXBzID0gewogICAgICAgICAg + IGYiQ29udmVyc2lvbiBvZiBob3N0OiB7ZmFpbGVkX2lwfSB0byBJUCBmYWlsZWQuICIKICAgICAg + ICAgICAgICAgICJQbGVhc2UgZW50ZXIgdGhlIElQIGFkZHJlc3NlcyBvZiBhbGwgdGhlIGNlcGgt + bWdycyB3aXRoIHRoZSAnLS1tb25pdG9yaW5nLWVuZHBvaW50JyBmbGFnIgogICAgICAgICAgICAp + CgogICAgICAgIF8sIF8sIGVyciA9IHNlbGYuZW5kcG9pbnRfZGlhbChtb25pdG9yaW5nX2VuZHBv + aW50LCBpcF90eXBlKQogICAgICAgIGlmIGVyciA9PSAiLTEiOgogICAgICAgICAgICByYWlzZSBF + eGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKGVycikKICAgICAgICAjIGFkZCB0aGUgdmFsaWRhdGVk + IGFjdGl2ZSBtZ3IgSVAgaW50byB0aGUgZmlyc3QgaW5kZXgKICAgICAgICBtZ3JfaXBzLmluc2Vy + dCgwLCBtb25pdG9yaW5nX2VuZHBvaW50X2lwKQogICAgICAgIGFsbF9tZ3JfaXBzX3N0ciA9ICIs + Ii5qb2luKG1ncl9pcHMpCiAgICAgICAgcmV0dXJuIGFsbF9tZ3JfaXBzX3N0ciwgbW9uaXRvcmlu + Z19lbmRwb2ludF9wb3J0CgogICAgZGVmIGNoZWNrX3VzZXJfZXhpc3Qoc2VsZiwgdXNlcik6CiAg + ICAgICAgY21kX2pzb24gPSB7InByZWZpeCI6ICJhdXRoIGdldCIsICJlbnRpdHkiOiBmInt1c2Vy + fSIsICJmb3JtYXQiOiAianNvbiJ9CiAgICAgICAgcmV0X3ZhbCwganNvbl9vdXQsIF8gPSBzZWxm + Ll9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAgIGlmIHJldF92YWwgIT0gMCBv + ciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHJldHVybiAiIgogICAgICAgIHJldHVy + biBzdHIoanNvbl9vdXRbMF1bImtleSJdKQoKICAgIGRlZiBnZXRfY2VwaGZzX3Byb3Zpc2lvbmVy + X2NhcHNfYW5kX2VudGl0eShzZWxmKToKICAgICAgICBlbnRpdHkgPSAiY2xpZW50LmNzaS1jZXBo + ZnMtcHJvdmlzaW9uZXIiCiAgICAgICAgY2FwcyA9IHsKICAgICAgICAgICAgIm1vbiI6ICJhbGxv + dyByLCBhbGxvdyBjb21tYW5kICdvc2QgYmxvY2tsaXN0JyIsCiAgICAgICAgICAgICJtZ3IiOiAi + YWxsb3cgcnciLAogICAgICAgICAgICAib3NkIjogImFsbG93IHJ3IHRhZyBjZXBoZnMgbWV0YWRh + dGE9KiIsCiAgICAgICAgICAgICJtZHMiOiAiYWxsb3cgKiIsCiAgICAgICAgfQogICAgICAgIGlm + IHNlbGYuX2FyZ19wYXJzZXIucmVzdHJpY3RlZF9hdXRoX3Blcm1pc3Npb246CiAgICAgICAgICAg + IGs4c19jbHVzdGVyX25hbWUgPSBzZWxmLl9hcmdfcGFyc2VyLms4c19jbHVzdGVyX25hbWUKICAg + ICAgICAgICAgaWYgazhzX2NsdXN0ZXJfbmFtZSA9PSAiIjoKICAgICAgICAgICAgICAgIHJhaXNl + IEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIms4c19jbHVz + dGVyX25hbWUgbm90IGZvdW5kLCBwbGVhc2Ugc2V0IHRoZSAnLS1rOHMtY2x1c3Rlci1uYW1lJyBm + bGFnIgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBjZXBoZnNfZmlsZXN5c3RlbSA9IHNl + bGYuX2FyZ19wYXJzZXIuY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZQogICAgICAgICAgICBpZiBjZXBo + ZnNfZmlsZXN5c3RlbSA9PSAiIjoKICAgICAgICAgICAgICAgIGVudGl0eSA9IGYie2VudGl0eX0t + e2s4c19jbHVzdGVyX25hbWV9IgogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgZW50 + aXR5ID0gZiJ7ZW50aXR5fS17azhzX2NsdXN0ZXJfbmFtZX0te2NlcGhmc19maWxlc3lzdGVtfSIK + ICAgICAgICAgICAgICAgIGNhcHNbIm9zZCJdID0gZiJhbGxvdyBydyB0YWcgY2VwaGZzIG1ldGFk + YXRhPXtjZXBoZnNfZmlsZXN5c3RlbX0iCgogICAgICAgIHJldHVybiBjYXBzLCBlbnRpdHkKCiAg + ICBkZWYgZ2V0X2NlcGhmc19ub2RlX2NhcHNfYW5kX2VudGl0eShzZWxmKToKICAgICAgICBlbnRp + dHkgPSAiY2xpZW50LmNzaS1jZXBoZnMtbm9kZSIKICAgICAgICBjYXBzID0gewogICAgICAgICAg ICAibW9uIjogImFsbG93IHIsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xpc3QnIiwKICAgICAg ICAgICAgIm1nciI6ICJhbGxvdyBydyIsCiAgICAgICAgICAgICJvc2QiOiAiYWxsb3cgcncgdGFn - IGNlcGhmcyBtZXRhZGF0YT0qIiwKICAgICAgICB9CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNl - ci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbjoKICAgICAgICAgICAgazhzX2NsdXN0ZXJfbmFt - ZSA9IHNlbGYuX2FyZ19wYXJzZXIuazhzX2NsdXN0ZXJfbmFtZQogICAgICAgICAgICBpZiBrOHNf - Y2x1c3Rlcl9uYW1lID09ICIiOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVy - ZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICAiazhzX2NsdXN0ZXJfbmFtZSBub3QgZm91 - bmQsIHBsZWFzZSBzZXQgdGhlICctLWs4cy1jbHVzdGVyLW5hbWUnIGZsYWciCiAgICAgICAgICAg - ICAgICApCiAgICAgICAgICAgIGNlcGhmc19maWxlc3lzdGVtID0gc2VsZi5fYXJnX3BhcnNlci5j - ZXBoZnNfZmlsZXN5c3RlbV9uYW1lCiAgICAgICAgICAgIGlmIGNlcGhmc19maWxlc3lzdGVtID09 - ICIiOgogICAgICAgICAgICAgICAgZW50aXR5ID0gZiJ7ZW50aXR5fS17azhzX2NsdXN0ZXJfbmFt - ZX0iCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBlbnRpdHkgPSBmIntlbnRpdHl9 - LXtrOHNfY2x1c3Rlcl9uYW1lfS17Y2VwaGZzX2ZpbGVzeXN0ZW19IgogICAgICAgICAgICAgICAg - Y2Fwc1sib3NkIl0gPSBmImFsbG93IHJ3IHRhZyBjZXBoZnMgbWV0YWRhdGE9e2NlcGhmc19maWxl - c3lzdGVtfSIKCiAgICAgICAgcmV0dXJuIGNhcHMsIGVudGl0eQoKICAgIGRlZiBnZXRfY2VwaGZz - X25vZGVfY2Fwc19hbmRfZW50aXR5KHNlbGYpOgogICAgICAgIGVudGl0eSA9ICJjbGllbnQuY3Np - LWNlcGhmcy1ub2RlIgogICAgICAgIGNhcHMgPSB7CiAgICAgICAgICAgICJtb24iOiAiYWxsb3cg - ciwgYWxsb3cgY29tbWFuZCAnb3NkIGJsb2NrbGlzdCciLAogICAgICAgICAgICAibWdyIjogImFs - bG93IHJ3IiwKICAgICAgICAgICAgIm9zZCI6ICJhbGxvdyBydyB0YWcgY2VwaGZzICo9KiIsCiAg - ICAgICAgICAgICJtZHMiOiAiYWxsb3cgcnciLAogICAgICAgIH0KICAgICAgICBpZiBzZWxmLl9h - cmdfcGFyc2VyLnJlc3RyaWN0ZWRfYXV0aF9wZXJtaXNzaW9uOgogICAgICAgICAgICBrOHNfY2x1 - c3Rlcl9uYW1lID0gc2VsZi5fYXJnX3BhcnNlci5rOHNfY2x1c3Rlcl9uYW1lCiAgICAgICAgICAg - IGlmIGs4c19jbHVzdGVyX25hbWUgPT0gIiI6CiAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRp - b25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgICJrOHNfY2x1c3Rlcl9uYW1l - IG5vdCBmb3VuZCwgcGxlYXNlIHNldCB0aGUgJy0tazhzLWNsdXN0ZXItbmFtZScgZmxhZyIKICAg - ICAgICAgICAgICAgICkKICAgICAgICAgICAgY2VwaGZzX2ZpbGVzeXN0ZW0gPSBzZWxmLl9hcmdf - cGFyc2VyLmNlcGhmc19maWxlc3lzdGVtX25hbWUKICAgICAgICAgICAgaWYgY2VwaGZzX2ZpbGVz - eXN0ZW0gPT0gIiI6CiAgICAgICAgICAgICAgICBlbnRpdHkgPSBmIntlbnRpdHl9LXtrOHNfY2x1 - c3Rlcl9uYW1lfSIKICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgIGVudGl0eSA9IGYi - e2VudGl0eX0te2s4c19jbHVzdGVyX25hbWV9LXtjZXBoZnNfZmlsZXN5c3RlbX0iCiAgICAgICAg - ICAgICAgICBjYXBzWyJvc2QiXSA9IGYiYWxsb3cgcncgdGFnIGNlcGhmcyAqPXtjZXBoZnNfZmls - ZXN5c3RlbX0iCgogICAgICAgIHJldHVybiBjYXBzLCBlbnRpdHkKCiAgICBkZWYgZ2V0X2VudGl0 - eSgKICAgICAgICBzZWxmLAogICAgICAgIGVudGl0eSwKICAgICAgICByYmRfcG9vbF9uYW1lLAog - ICAgICAgIGFsaWFzX3JiZF9wb29sX25hbWUsCiAgICAgICAgazhzX2NsdXN0ZXJfbmFtZSwKICAg - ICAgICByYWRvc19uYW1lc3BhY2UsCiAgICApOgogICAgICAgIGlmICgKICAgICAgICAgICAgcmJk - X3Bvb2xfbmFtZS5jb3VudCgiLiIpICE9IDAKICAgICAgICAgICAgb3IgcmJkX3Bvb2xfbmFtZS5j - b3VudCgiXyIpICE9IDAKICAgICAgICAgICAgb3IgYWxpYXNfcmJkX3Bvb2xfbmFtZSAhPSAiIgog - ICAgICAgICAgICAjIGNoZWNraW5nIGFsaWFzX3JiZF9wb29sX25hbWUgaXMgbm90IGVtcHR5IGFz - IHRoZXJlIG1heWJlIGEgc3BlY2lhbCBjaGFyYWN0ZXIgdXNlZCBvdGhlciB0aGFuIC4gb3IgXwog - ICAgICAgICk6CiAgICAgICAgICAgIGlmIGFsaWFzX3JiZF9wb29sX25hbWUgPT0gIiI6CiAgICAg - ICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAg - ICAgICAgICJwbGVhc2Ugc2V0IHRoZSAnLS1hbGlhcy1yYmQtZGF0YS1wb29sLW5hbWUnIGZsYWcg - YXMgdGhlIHJiZCBkYXRhIHBvb2wgbmFtZSBjb250YWlucyAnLicgb3IgJ18nIgogICAgICAgICAg - ICAgICAgKQogICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICBhbGlhc19yYmRfcG9vbF9u - YW1lLmNvdW50KCIuIikgIT0gMAogICAgICAgICAgICAgICAgb3IgYWxpYXNfcmJkX3Bvb2xfbmFt - ZS5jb3VudCgiXyIpICE9IDAKICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgIHJhaXNlIEV4 - ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIictLWFsaWFzLXJi - ZC1kYXRhLXBvb2wtbmFtZScgZmxhZyB2YWx1ZSBzaG91bGQgbm90IGNvbnRhaW4gJy4nIG9yICdf - JyIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgZW50aXR5ID0gZiJ7ZW50aXR5fS17azhz - X2NsdXN0ZXJfbmFtZX0te2FsaWFzX3JiZF9wb29sX25hbWV9IgogICAgICAgIGVsc2U6CiAgICAg - ICAgICAgIGVudGl0eSA9IGYie2VudGl0eX0te2s4c19jbHVzdGVyX25hbWV9LXtyYmRfcG9vbF9u - YW1lfSIKCiAgICAgICAgaWYgcmFkb3NfbmFtZXNwYWNlOgogICAgICAgICAgICBlbnRpdHkgPSBm - IntlbnRpdHl9LXtyYWRvc19uYW1lc3BhY2V9IgogICAgICAgIHJldHVybiBlbnRpdHkKCiAgICBk - ZWYgZ2V0X3JiZF9wcm92aXNpb25lcl9jYXBzX2FuZF9lbnRpdHkoc2VsZik6CiAgICAgICAgZW50 - aXR5ID0gImNsaWVudC5jc2ktcmJkLXByb3Zpc2lvbmVyIgogICAgICAgIGNhcHMgPSB7CiAgICAg - ICAgICAgICJtb24iOiAicHJvZmlsZSByYmQsIGFsbG93IGNvbW1hbmQgJ29zZCBibG9ja2xpc3Qn - IiwKICAgICAgICAgICAgIm1nciI6ICJhbGxvdyBydyIsCiAgICAgICAgICAgICJvc2QiOiAicHJv - ZmlsZSByYmQiLAogICAgICAgIH0KICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJlc3RyaWN0 - ZWRfYXV0aF9wZXJtaXNzaW9uOgogICAgICAgICAgICByYmRfcG9vbF9uYW1lID0gc2VsZi5fYXJn - X3BhcnNlci5yYmRfZGF0YV9wb29sX25hbWUKICAgICAgICAgICAgYWxpYXNfcmJkX3Bvb2xfbmFt - ZSA9IHNlbGYuX2FyZ19wYXJzZXIuYWxpYXNfcmJkX2RhdGFfcG9vbF9uYW1lCiAgICAgICAgICAg - IGs4c19jbHVzdGVyX25hbWUgPSBzZWxmLl9hcmdfcGFyc2VyLms4c19jbHVzdGVyX25hbWUKICAg - ICAgICAgICAgcmFkb3NfbmFtZXNwYWNlID0gc2VsZi5fYXJnX3BhcnNlci5yYWRvc19uYW1lc3Bh - Y2UKICAgICAgICAgICAgaWYgcmJkX3Bvb2xfbmFtZSA9PSAiIjoKICAgICAgICAgICAgICAgIHJh - aXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIm1hbmRh - dG9yeSBmbGFnIG5vdCBmb3VuZCwgcGxlYXNlIHNldCB0aGUgJy0tcmJkLWRhdGEtcG9vbC1uYW1l - JyBmbGFnIgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBpZiBrOHNfY2x1c3Rlcl9uYW1l - ID09ICIiOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigK - ICAgICAgICAgICAgICAgICAgICAibWFuZGF0b3J5IGZsYWcgbm90IGZvdW5kLCBwbGVhc2Ugc2V0 - IHRoZSAnLS1rOHMtY2x1c3Rlci1uYW1lJyBmbGFnIgogICAgICAgICAgICAgICAgKQogICAgICAg - ICAgICBlbnRpdHkgPSBzZWxmLmdldF9lbnRpdHkoCiAgICAgICAgICAgICAgICBlbnRpdHksCiAg - ICAgICAgICAgICAgICByYmRfcG9vbF9uYW1lLAogICAgICAgICAgICAgICAgYWxpYXNfcmJkX3Bv - b2xfbmFtZSwKICAgICAgICAgICAgICAgIGs4c19jbHVzdGVyX25hbWUsCiAgICAgICAgICAgICAg - ICByYWRvc19uYW1lc3BhY2UsCiAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgcmFkb3NfbmFt - ZXNwYWNlICE9ICIiOgogICAgICAgICAgICAgICAgY2Fwc1sib3NkIl0gPSAoCiAgICAgICAgICAg - ICAgICAgICAgZiJwcm9maWxlIHJiZCBwb29sPXtyYmRfcG9vbF9uYW1lfSBuYW1lc3BhY2U9e3Jh - ZG9zX25hbWVzcGFjZX0iCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgIGVsc2U6CiAgICAg - ICAgICAgICAgICBjYXBzWyJvc2QiXSA9IGYicHJvZmlsZSByYmQgcG9vbD17cmJkX3Bvb2xfbmFt - ZX0iCgogICAgICAgIHJldHVybiBjYXBzLCBlbnRpdHkKCiAgICBkZWYgZ2V0X3JiZF9ub2RlX2Nh - cHNfYW5kX2VudGl0eShzZWxmKToKICAgICAgICBlbnRpdHkgPSAiY2xpZW50LmNzaS1yYmQtbm9k - ZSIKICAgICAgICBjYXBzID0gewogICAgICAgICAgICAibW9uIjogInByb2ZpbGUgcmJkLCBhbGxv - dyBjb21tYW5kICdvc2QgYmxvY2tsaXN0JyIsCiAgICAgICAgICAgICJvc2QiOiAicHJvZmlsZSBy - YmQiLAogICAgICAgIH0KICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJlc3RyaWN0ZWRfYXV0 - aF9wZXJtaXNzaW9uOgogICAgICAgICAgICByYmRfcG9vbF9uYW1lID0gc2VsZi5fYXJnX3BhcnNl - ci5yYmRfZGF0YV9wb29sX25hbWUKICAgICAgICAgICAgYWxpYXNfcmJkX3Bvb2xfbmFtZSA9IHNl - bGYuX2FyZ19wYXJzZXIuYWxpYXNfcmJkX2RhdGFfcG9vbF9uYW1lCiAgICAgICAgICAgIGs4c19j - bHVzdGVyX25hbWUgPSBzZWxmLl9hcmdfcGFyc2VyLms4c19jbHVzdGVyX25hbWUKICAgICAgICAg - ICAgcmFkb3NfbmFtZXNwYWNlID0gc2VsZi5fYXJnX3BhcnNlci5yYWRvc19uYW1lc3BhY2UKICAg - ICAgICAgICAgaWYgcmJkX3Bvb2xfbmFtZSA9PSAiIjoKICAgICAgICAgICAgICAgIHJhaXNlIEV4 - ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIm1hbmRhdG9yeSBm - bGFnIG5vdCBmb3VuZCwgcGxlYXNlIHNldCB0aGUgJy0tcmJkLWRhdGEtcG9vbC1uYW1lJyBmbGFn - IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBpZiBrOHNfY2x1c3Rlcl9uYW1lID09ICIi - OgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAg - ICAgICAgICAgICAgICAibWFuZGF0b3J5IGZsYWcgbm90IGZvdW5kLCBwbGVhc2Ugc2V0IHRoZSAn - LS1rOHMtY2x1c3Rlci1uYW1lJyBmbGFnIgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBl - bnRpdHkgPSBzZWxmLmdldF9lbnRpdHkoCiAgICAgICAgICAgICAgICBlbnRpdHksCiAgICAgICAg - ICAgICAgICByYmRfcG9vbF9uYW1lLAogICAgICAgICAgICAgICAgYWxpYXNfcmJkX3Bvb2xfbmFt - ZSwKICAgICAgICAgICAgICAgIGs4c19jbHVzdGVyX25hbWUsCiAgICAgICAgICAgICAgICByYWRv - c19uYW1lc3BhY2UsCiAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgcmFkb3NfbmFtZXNwYWNl - ICE9ICIiOgogICAgICAgICAgICAgICAgY2Fwc1sib3NkIl0gPSAoCiAgICAgICAgICAgICAgICAg - ICAgZiJwcm9maWxlIHJiZCBwb29sPXtyYmRfcG9vbF9uYW1lfSBuYW1lc3BhY2U9e3JhZG9zX25h - bWVzcGFjZX0iCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAg - ICAgICBjYXBzWyJvc2QiXSA9IGYicHJvZmlsZSByYmQgcG9vbD17cmJkX3Bvb2xfbmFtZX0iCgog - ICAgICAgIHJldHVybiBjYXBzLCBlbnRpdHkKCiAgICBkZWYgZ2V0X2RlZmF1bHRVc2VyX2NhcHNf - YW5kX2VudGl0eShzZWxmKToKICAgICAgICBlbnRpdHkgPSBzZWxmLnJ1bl9hc191c2VyCiAgICAg - ICAgY2FwcyA9IHsKICAgICAgICAgICAgIm1vbiI6ICJhbGxvdyByLCBhbGxvdyBjb21tYW5kIHF1 - b3J1bV9zdGF0dXMsIGFsbG93IGNvbW1hbmQgdmVyc2lvbiIsCiAgICAgICAgICAgICJtZ3IiOiAi - YWxsb3cgY29tbWFuZCBjb25maWciLAogICAgICAgICAgICAib3NkIjogZiJwcm9maWxlIHJiZC1y - ZWFkLW9ubHks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cGhmc19ub2RlX2NhcHNfYW5kX2VudGl0eSgpCiAgICAgICAg - aWYgImNsaWVudC5jc2ktcmJkLXByb3Zpc2lvbmVyIiBpbiB1c2VyX25hbWU6CiAgICAgICAgICAg - IGlmICJjbGllbnQuY3NpLXJiZC1wcm92aXNpb25lciIgIT0gdXNlcl9uYW1lOgogICAgICAgICAg - ICAgICAgc2VsZi5fYXJnX3BhcnNlci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbiA9IFRydWUK - ICAgICAgICAgICAgcmV0dXJuIHNlbGYuZ2V0X3JiZF9wcm92aXNpb25lcl9jYXBzX2FuZF9lbnRp - dHkoKQogICAgICAgIGlmICJjbGllbnQuY3NpLXJiZC1ub2RlIiBpbiB1c2VyX25hbWU6CiAgICAg - ICAgICAgIGlmICJjbGllbnQuY3NpLXJiZC1ub2RlIiAhPSB1c2VyX25hbWU6CiAgICAgICAgICAg - ICAgICBzZWxmLl9hcmdfcGFyc2VyLnJlc3RyaWN0ZWRfYXV0aF9wZXJtaXNzaW9uID0gVHJ1ZQog - ICAgICAgICAgICByZXR1cm4gc2VsZi5nZXRfcmJkX25vZGVfY2Fwc19hbmRfZW50aXR5KCkKICAg - ICAgICBpZiAiY2xpZW50LmhlYWx0aGNoZWNrZXIiIGluIHVzZXJfbmFtZToKICAgICAgICAgICAg - aWYgImNsaWVudC5oZWFsdGhjaGVja2VyIiAhPSB1c2VyX25hbWU6CiAgICAgICAgICAgICAgICBz - ZWxmLl9hcmdfcGFyc2VyLnJlc3RyaWN0ZWRfYXV0aF9wZXJtaXNzaW9uID0gVHJ1ZQogICAgICAg - ICAgICByZXR1cm4gc2VsZi5nZXRfZGVmYXVsdFVzZXJfY2Fwc19hbmRfZW50aXR5KCkKCiAgICAg - ICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgZiJubyB1c2Vy - IGZvdW5kIHdpdGggdXNlcl9uYW1lOiB7dXNlcl9uYW1lfSwgIgogICAgICAgICAgICAiZ2V0X2Nh - cHNfYW5kX2VudGl0eSBjb21tYW5kIGZhaWxlZC5cbiIKICAgICAgICApCgogICAgZGVmIGNyZWF0 - ZV9jZXBoQ1NJS2V5cmluZ191c2VyKHNlbGYsIHVzZXIpOgogICAgICAgICIiIgogICAgICAgIGNv - bW1hbmQ6IGNlcGggYXV0aCBnZXQtb3ItY3JlYXRlIGNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lv - bmVyIG1vbiAnYWxsb3cgcicgbWdyICdhbGxvdyBydycgb3NkICdhbGxvdyBydyB0YWcgY2VwaGZz - IG1ldGFkYXRhPSonCiAgICAgICAgIiIiCiAgICAgICAgY2FwcywgZW50aXR5ID0gc2VsZi5nZXRf - Y2Fwc19hbmRfZW50aXR5KHVzZXIpCiAgICAgICAgY21kX2pzb24gPSB7CiAgICAgICAgICAgICJw - cmVmaXgiOiAiYXV0aCBnZXQtb3ItY3JlYXRlIiwKICAgICAgICAgICAgImVudGl0eSI6IGVudGl0 - eSwKICAgICAgICAgICAgImNhcHMiOiBbY2FwIGZvciBjYXBfbGlzdCBpbiBsaXN0KGNhcHMuaXRl - bXMoKSkgZm9yIGNhcCBpbiBjYXBfbGlzdF0sCiAgICAgICAgICAgICJmb3JtYXQiOiAianNvbiIs - CiAgICAgICAgfQoKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLmRyeV9ydW46CiAgICAgICAg - ICAgIHJldHVybiAoCiAgICAgICAgICAgICAgICBzZWxmLmRyeV9ydW4oCiAgICAgICAgICAgICAg - ICAgICAgImNlcGggIgogICAgICAgICAgICAgICAgICAgICsgY21kX2pzb25bInByZWZpeCJdCiAg - ICAgICAgICAgICAgICAgICAgKyAiICIKICAgICAgICAgICAgICAgICAgICArIGNtZF9qc29uWyJl - bnRpdHkiXQogICAgICAgICAgICAgICAgICAgICsgIiAiCiAgICAgICAgICAgICAgICAgICAgKyAi - ICIuam9pbihjbWRfanNvblsiY2FwcyJdKQogICAgICAgICAgICAgICAgKSwKICAgICAgICAgICAg - ICAgICIiLAogICAgICAgICAgICApCiAgICAgICAgIyBjaGVjayBpZiB1c2VyIGFscmVhZHkgZXhp - c3QKICAgICAgICB1c2VyX2tleSA9IHNlbGYuY2hlY2tfdXNlcl9leGlzdChlbnRpdHkpCiAgICAg - ICAgaWYgdXNlcl9rZXkgIT0gIiI6CiAgICAgICAgICAgIHJldHVybiB1c2VyX2tleSwgZiJ7ZW50 - aXR5LnNwbGl0KCcuJywgMSlbMV19IgogICAgICAgICAgICAjIGVudGl0eS5zcGxpdCgnLicsMSlb - MV0gdG8gcmVuYW1lIGVudGl0eShjbGllbnQuY3NpLXJiZC1ub2RlKSBhcyBjc2ktcmJkLW5vZGUK - CiAgICAgICAgcmV0X3ZhbCwganNvbl9vdXQsIGVycl9tc2cgPSBzZWxmLl9jb21tb25fY21kX2pz - b25fZ2VuKGNtZF9qc29uKQogICAgICAgICMgaWYgdGhlcmUgaXMgYW4gdW5zdWNjZXNzZnVsIGF0 - dGVtcHQsCiAgICAgICAgaWYgcmV0X3ZhbCAhPSAwIG9yIGxlbihqc29uX291dCkgPT0gMDoKICAg - ICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAg - IGYiJ2F1dGggZ2V0LW9yLWNyZWF0ZSB7dXNlcn0nIGNvbW1hbmQgZmFpbGVkLlxuIgogICAgICAg - ICAgICAgICAgZiJFcnJvcjoge2Vycl9tc2cgaWYgcmV0X3ZhbCAhPSAwIGVsc2Ugc2VsZi5FTVBU - WV9PVVRQVVRfTElTVH0iCiAgICAgICAgICAgICkKICAgICAgICByZXR1cm4gc3RyKGpzb25fb3V0 - WzBdWyJrZXkiXSksIGYie2VudGl0eS5zcGxpdCgnLicsIDEpWzFdfSIKICAgICAgICAjIGVudGl0 - eS5zcGxpdCgnLicsMSlbMV0gdG8gcmVuYW1lIGVudGl0eShjbGllbnQuY3NpLXJiZC1ub2RlKSBh - cyBjc2ktcmJkLW5vZGUKCiAgICBkZWYgZ2V0X2NlcGhmc19kYXRhX3Bvb2xfZGV0YWlscyhzZWxm - KToKICAgICAgICBjbWRfanNvbiA9IHsicHJlZml4IjogImZzIGxzIiwgImZvcm1hdCI6ICJqc29u - In0KICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLmRyeV9ydW46CiAgICAgICAgICAgIHJldHVy - biBzZWxmLmRyeV9ydW4oImNlcGggIiArIGNtZF9qc29uWyJwcmVmaXgiXSkKICAgICAgICByZXRf - dmFsLCBqc29uX291dCwgZXJyX21zZyA9IHNlbGYuX2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pz - b24pCiAgICAgICAgIyBpZiB0aGVyZSBpcyBhbiB1bnN1Y2Nlc3NmdWwgYXR0ZW1wdCwgcmVwb3J0 - IGFuIGVycm9yCiAgICAgICAgaWYgcmV0X3ZhbCAhPSAwOgogICAgICAgICAgICAjIGlmIGZzIGFu - ZCBkYXRhX3Bvb2wgYXJndW1lbnRzIGFyZSBub3Qgc2V0LCBzaWxlbnRseSByZXR1cm4KICAgICAg - ICAgICAgaWYgKAogICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZmlsZXN5 - c3RlbV9uYW1lID09ICIiCiAgICAgICAgICAgICAgICBhbmQgc2VsZi5fYXJnX3BhcnNlci5jZXBo - ZnNfZGF0YV9wb29sX25hbWUgPT0gIiIKICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgIHJl - dHVybgogICAgICAgICAgICAjIGlmIHVzZXIgaGFzIHByb3ZpZGVkIGFueSBvZiB0aGUKICAgICAg - ICAgICAgIyAnLS1jZXBoZnMtZmlsZXN5c3RlbS1uYW1lJyBvciAnLS1jZXBoZnMtZGF0YS1wb29s - LW5hbWUnIGFyZ3VtZW50cywKICAgICAgICAgICAgIyByYWlzZSBhbiBleGNlcHRpb24gYXMgd2Ug - YXJlIHVuYWJsZSB0byB2ZXJpZnkgdGhlIGFyZ3MKICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9u - RmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgIGYiJ2ZzIGxzJyBjZXBoIGNhbGwgZmFp - bGVkIHdpdGggZXJyb3I6IHtlcnJfbXNnfSIKICAgICAgICAgICAgKQoKICAgICAgICBtYXRjaGlu - Z19qc29uX291dCA9IHt9CiAgICAgICAgIyBpZiAnLS1jZXBoZnMtZmlsZXN5c3RlbS1uYW1lJyBh - cmd1bWVudCBpcyBwcm92aWRlZCwKICAgICAgICAjIGNoZWNrIHdoZXRoZXIgdGhlIHByb3ZpZGVk - IGZpbGVzeXN0ZW0tbmFtZSBleGlzdHMgb3Igbm90CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNl - ci5jZXBoZnNfZmlsZXN5c3RlbV9uYW1lOgogICAgICAgICAgICAjIGdldCB0aGUgbWF0Y2hpbmcg - bGlzdAogICAgICAgICAgICBtYXRjaGluZ19qc29uX291dF9saXN0ID0gWwogICAgICAgICAgICAg - ICAgbWF0Y2hlZAogICAgICAgICAgICAgICAgZm9yIG1hdGNoZWQgaW4ganNvbl9vdXQKICAgICAg - ICAgICAgICAgIGlmIHN0cihtYXRjaGVkWyJuYW1lIl0pID09IHNlbGYuX2FyZ19wYXJzZXIuY2Vw - aGZzX2ZpbGVzeXN0ZW1fbmFtZQogICAgICAgICAgICBdCiAgICAgICAgICAgICMgdW5hYmxlIHRv - IGZpbmQgYSBtYXRjaGluZyBmcy1uYW1lLCByYWlzZSBhbiBlcnJvcgogICAgICAgICAgICBpZiBs - ZW4obWF0Y2hpbmdfanNvbl9vdXRfbGlzdCkgPT0gMDoKICAgICAgICAgICAgICAgIHJhaXNlIEV4 - ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgZiJGaWxlc3lzdGVt - IHByb3ZpZGVkLCAne3NlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZX0nLCAi - CiAgICAgICAgICAgICAgICAgICAgZiJpcyBub3QgZm91bmQgaW4gdGhlIGZzLWxpc3Q6IHtbc3Ry - KHhbJ25hbWUnXSkgZm9yIHggaW4ganNvbl9vdXRdfSIKICAgICAgICAgICAgICAgICkKICAgICAg - ICAgICAgbWF0Y2hpbmdfanNvbl9vdXQgPSBtYXRjaGluZ19qc29uX291dF9saXN0WzBdCiAgICAg - ICAgIyBpZiBjZXBoZnMgZmlsZXN5c3RlbSBuYW1lIGlzIG5vdCBwcm92aWRlZCwKICAgICAgICAj - IHRyeSB0byBnZXQgYSBkZWZhdWx0IGZzIG5hbWUgYnkgZG9pbmcgdGhlIGZvbGxvd2luZwogICAg - ICAgIGVsc2U6CiAgICAgICAgICAgICMgYS4gY2hlY2sgaWYgdGhlcmUgaXMgb25seSBvbmUgZmls - ZXN5c3RlbSBpcyBwcmVzZW50CiAgICAgICAgICAgIGlmIGxlbihqc29uX291dCkgPT0gMToKICAg - ICAgICAgICAgICAgIG1hdGNoaW5nX2pzb25fb3V0ID0ganNvbl9vdXRbMF0KICAgICAgICAgICAg - IyBiLiBvciBlbHNlLCBjaGVjayBpZiBkYXRhX3Bvb2wgbmFtZSBpcyBwcm92aWRlZAogICAgICAg - ICAgICBlbGlmIHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2RhdGFfcG9vbF9uYW1lOgogICAgICAg - ICAgICAgICAgIyBhbmQgaWYgcHJlc2VudCwgY2hlY2sgd2hldGhlciB0aGVyZSBleGlzdHMgYSBm - cyB3aGljaCBoYXMgdGhlIGRhdGFfcG9vbAogICAgICAgICAgICAgICAgZm9yIGVhY2hKIGluIGpz - b25fb3V0OgogICAgICAgICAgICAgICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2Rh - dGFfcG9vbF9uYW1lIGluIGVhY2hKWyJkYXRhX3Bvb2xzIl06CiAgICAgICAgICAgICAgICAgICAg - ICAgIG1hdGNoaW5nX2pzb25fb3V0ID0gZWFjaEoKICAgICAgICAgICAgICAgICAgICAgICAgYnJl - YWsKICAgICAgICAgICAgICAgICMgaWYgdGhlcmUgaXMgbm8gbWF0Y2hpbmcgZnMgZXhpc3RzLCB0 - aGF0IG1lYW5zIHByb3ZpZGVkIGRhdGFfcG9vbCBuYW1lIGlzIGludmFsaWQKICAgICAgICAgICAg - ICAgIGlmIG5vdCBtYXRjaGluZ19qc29uX291dDoKICAgICAgICAgICAgICAgICAgICByYWlzZSBF - eGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgICAgICBmIlByb3Zp - ZGVkIGRhdGFfcG9vbCBuYW1lLCB7c2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZGF0YV9wb29sX25h - bWV9LCIKICAgICAgICAgICAgICAgICAgICAgICAgIiBkb2VzIG5vdCBleGlzdHMiCiAgICAgICAg - ICAgICAgICAgICAgKQogICAgICAgICAgICAjIGMuIGlmIG5vdGhpbmcgaXMgc2V0IGFuZCBjb3Vs - ZG4ndCBmaW5kIGEgZGVmYXVsdCwKICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICMg - anVzdCByZXR1cm4gc2lsZW50bHkKICAgICAgICAgICAgICAgIHJldHVybgoKICAgICAgICBpZiBt - YXRjaGluZ19qc29uX291dDoKICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZmls - ZXN5c3RlbV9uYW1lID0gc3RyKG1hdGNoaW5nX2pzb25fb3V0WyJuYW1lIl0pCiAgICAgICAgICAg - IHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX21ldGFkYXRhX3Bvb2xfbmFtZSA9IHN0cigKICAgICAg - ICAgICAgICAgIG1hdGNoaW5nX2pzb25fb3V0WyJtZXRhZGF0YV9wb29sIl0KICAgICAgICAgICAg - KQoKICAgICAgICBpZiBpc2luc3RhbmNlKG1hdGNoaW5nX2pzb25fb3V0WyJkYXRhX3Bvb2xzIl0s - IGxpc3QpOgogICAgICAgICAgICAjIGlmIHRoZSB1c2VyIGhhcyBhbHJlYWR5IHByb3ZpZGVkIGRh - dGEtcG9vbC1uYW1lLAogICAgICAgICAgICAjIHRocm91Z2ggLS1jZXBoZnMtZGF0YS1wb29sLW5h - bWUKICAgICAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZGF0YV9wb29sX25hbWU6 - CiAgICAgICAgICAgICAgICAjIGlmIHRoZSBwcm92aWRlZCBuYW1lIGlzIG5vdCBtYXRjaGluZyB3 - aXRoIHRoZSBvbmUgaW4gdGhlIGxpc3QKICAgICAgICAgICAgICAgIGlmICgKICAgICAgICAgICAg - ICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLmNlcGhmc19kYXRhX3Bvb2xfbmFtZQogICAgICAgICAg - ICAgICAgICAgIG5vdCBpbiBtYXRjaGluZ19qc29uX291dFsiZGF0YV9wb29scyJdCiAgICAgICAg - ICAgICAgICApOgogICAgICAgICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNl - cHRpb24oCiAgICAgICAgICAgICAgICAgICAgICAgIGYiUHJvdmlkZWQgZGF0YS1wb29sLW5hbWU6 - ICd7c2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZGF0YV9wb29sX25hbWV9JywgIgogICAgICAgICAg - ICAgICAgICAgICAgICAiZG9lc24ndCBtYXRjaCBmcm9tIHRoZSBkYXRhLXBvb2xzIGxpc3Q6ICIK - ICAgICAgICAgICAgICAgICAgICAgICAgZiJ7W3N0cih4KSBmb3IgeCBpbiBtYXRjaGluZ19qc29u - X291dFsnZGF0YV9wb29scyddXX0iCiAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAj - IGlmIGRhdGFfcG9vbCBuYW1lIGlzIG5vdCBwcm92aWRlZCwKICAgICAgICAgICAgIyB0aGVuIHRy - eSB0byBmaW5kIGEgZGVmYXVsdCBkYXRhIHBvb2wgbmFtZQogICAgICAgICAgICBlbHNlOgogICAg - ICAgICAgICAgICAgIyBpZiBubyBkYXRhX3Bvb2xzIGV4aXN0LCBzaWxlbnRseSByZXR1cm4KICAg - ICAgICAgICAgICAgIGlmIGxlbihtYXRjaGluZ19qc29uX291dFsiZGF0YV9wb29scyJdKSA9PSAw - OgogICAgICAgICAgICAgICAgICAgIHJldHVybgogICAgICAgICAgICAgICAgc2VsZi5fYXJnX3Bh - cnNlci5jZXBoZnNfZGF0YV9wb29sX25hbWUgPSBzdHIoCiAgICAgICAgICAgICAgICAgICAgbWF0 - Y2hpbmdfanNvbl9vdXRbImRhdGFfcG9vbHMiXVswXQogICAgICAgICAgICAgICAgKQogICAgICAg - ICAgICAjIGlmIHRoZXJlIGFyZSBtb3JlIHRoYW4gb25lICdkYXRhX3Bvb2xzJyBleGlzdCwKICAg - ICAgICAgICAgIyB0aGVuIHdhcm4gdGhlIHVzZXIgdGhhdCB3ZSBhcmUgdXNpbmcgdGhlIHNlbGVj - dGVkIG5hbWUKICAgICAgICAgICAgaWYgbGVuKG1hdGNoaW5nX2pzb25fb3V0WyJkYXRhX3Bvb2xz - Il0pID4gMToKICAgICAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgICAgICJXQVJO - SU5HOiBNdWx0aXBsZSBkYXRhIHBvb2xzIGRldGVjdGVkOiAiCiAgICAgICAgICAgICAgICAgICAg - ZiJ7W3N0cih4KSBmb3IgeCBpbiBtYXRjaGluZ19qc29uX291dFsnZGF0YV9wb29scyddXX1cbiIK - ICAgICAgICAgICAgICAgICAgICBmIlVzaW5nIHRoZSBkYXRhLXBvb2w6ICd7c2VsZi5fYXJnX3Bh - cnNlci5jZXBoZnNfZGF0YV9wb29sX25hbWV9J1xuIgogICAgICAgICAgICAgICAgKQoKICAgIGRl - ZiBjcmVhdGVfY2hlY2tlcktleShzZWxmLCB1c2VyKToKICAgICAgICBjYXBzLCBlbnRpdHkgPSBz - ZWxmLmdldF9jYXBzX2FuZF9lbnRpdHkodXNlcikKICAgICAgICBjbWRfanNvbiA9IHsKICAgICAg - ICAgICAgInByZWZpeCI6ICJhdXRoIGdldC1vci1jcmVhdGUiLAogICAgICAgICAgICAiZW50aXR5 - IjogZW50aXR5LAogICAgICAgICAgICAiY2FwcyI6IFtjYXAgZm9yIGNhcF9saXN0IGluIGxpc3Qo - Y2Fwcy5pdGVtcygpKSBmb3IgY2FwIGluIGNhcF9saXN0XSwKICAgICAgICAgICAgImZvcm1hdCI6 - ICJqc29uIiwKICAgICAgICB9CgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIuZHJ5X3J1bjoK - ICAgICAgICAgICAgcmV0dXJuIHNlbGYuZHJ5X3J1bigKICAgICAgICAgICAgICAgICJjZXBoICIK - ICAgICAgICAgICAgICAgICsgY21kX2pzb25bInByZWZpeCJdCiAgICAgICAgICAgICAgICArICIg - IgogICAgICAgICAgICAgICAgKyBjbWRfanNvblsiZW50aXR5Il0KICAgICAgICAgICAgICAgICsg - IiAiCiAgICAgICAgICAgICAgICArICIgIi5qb2luKGNtZF9qc29uWyJjYXBzIl0pCiAgICAgICAg - ICAgICkKICAgICAgICAjIGNoZWNrIGlmIHVzZXIgYWxyZWFkeSBleGlzdAogICAgICAgIHVzZXJf - a2V5ID0gc2VsZi5jaGVja191c2VyX2V4aXN0KGVudGl0eSkKICAgICAgICBpZiB1c2VyX2tleSAh - PSAiIjoKICAgICAgICAgICAgcmV0dXJuIHVzZXJfa2V5CgogICAgICAgIHJldF92YWwsIGpzb25f - b3V0LCBlcnJfbXNnID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRfanNvbikKICAgICAg - ICAjIGlmIHRoZXJlIGlzIGFuIHVuc3VjY2Vzc2Z1bCBhdHRlbXB0LAogICAgICAgIGlmIHJldF92 - YWwgIT0gMCBvciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlv - bkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICBmIidhdXRoIGdldC1vci1jcmVhdGUg - e3NlbGYucnVuX2FzX3VzZXJ9JyBjb21tYW5kIGZhaWxlZFxuIgogICAgICAgICAgICAgICAgZiJF - cnJvcjoge2Vycl9tc2cgaWYgcmV0X3ZhbCAhPSAwIGVsc2Ugc2VsZi5FTVBUWV9PVVRQVVRfTElT - VH0iCiAgICAgICAgICAgICkKICAgICAgICByZXR1cm4gc3RyKGpzb25fb3V0WzBdWyJrZXkiXSkK - CiAgICBkZWYgZ2V0X2NlcGhfZGFzaGJvYXJkX2xpbmsoc2VsZik6CiAgICAgICAgY21kX2pzb24g - PSB7InByZWZpeCI6ICJtZ3Igc2VydmljZXMiLCAiZm9ybWF0IjogImpzb24ifQogICAgICAgIGlm - IHNlbGYuX2FyZ19wYXJzZXIuZHJ5X3J1bjoKICAgICAgICAgICAgcmV0dXJuIHNlbGYuZHJ5X3J1 - bigiY2VwaCAiICsgY21kX2pzb25bInByZWZpeCJdKQogICAgICAgIHJldF92YWwsIGpzb25fb3V0 - LCBfID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRfanNvbikKICAgICAgICAjIGlmIHRo - ZXJlIGlzIGFuIHVuc3VjY2Vzc2Z1bCBhdHRlbXB0LAogICAgICAgIGlmIHJldF92YWwgIT0gMCBv - ciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHJldHVybiBOb25lCiAgICAgICAgaWYg - ImRhc2hib2FyZCIgbm90IGluIGpzb25fb3V0OgogICAgICAgICAgICByZXR1cm4gTm9uZQogICAg - ICAgIHJldHVybiBqc29uX291dFsiZGFzaGJvYXJkIl0KCiAgICBkZWYgY3JlYXRlX3Jnd19hZG1p - bl9vcHNfdXNlcihzZWxmKToKICAgICAgICBjbWQgPSBbCiAgICAgICAgICAgICJyYWRvc2d3LWFk - bWluIiwKICAgICAgICAgICAgInVzZXIiLAogICAgICAgICAgICAiY3JlYXRlIiwKICAgICAgICAg - ICAgIi0tdWlkIiwKICAgICAgICAgICAgc2VsZi5FWFRFUk5BTF9SR1dfQURNSU5fT1BTX1VTRVJf - TkFNRSwKICAgICAgICAgICAgIi0tZGlzcGxheS1uYW1lIiwKICAgICAgICAgICAgIlJvb2sgUkdX - IEFkbWluIE9wcyB1c2VyIiwKICAgICAgICAgICAgIi0tY2FwcyIsCiAgICAgICAgICAgICJidWNr - ZXRzPSo7dXNlcnM9Kjt1c2FnZT1yZWFkO21ldGFkYXRhPXJlYWQ7em9uZT1yZWFkIiwKICAgICAg - ICAgICAgIi0tcmd3LXJlYWxtIiwKICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5yZ3dfcmVh - bG1fbmFtZSwKICAgICAgICAgICAgIi0tcmd3LXpvbmVncm91cCIsCiAgICAgICAgICAgIHNlbGYu - X2FyZ19wYXJzZXIucmd3X3pvbmVncm91cF9uYW1lLAogICAgICAgICAgICAiLS1yZ3ctem9uZSIs - CiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVfbmFtZSwKICAgICAgICBdCiAg - ICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICByZXR1cm4gc2Vs - Zi5kcnlfcnVuKCJjZXBoICIgKyAiICIuam9pbihjbWQpKQogICAgICAgIHRyeToKICAgICAgICAg - ICAgb3V0cHV0ID0gc3VicHJvY2Vzcy5jaGVja19vdXRwdXQoY21kLCBzdGRlcnI9c3VicHJvY2Vz - cy5QSVBFKQogICAgICAgIGV4Y2VwdCBzdWJwcm9jZXNzLkNhbGxlZFByb2Nlc3NFcnJvciBhcyBl - eGVjRXJyOgogICAgICAgICAgICAjIGlmIHRoZSB1c2VyIGFscmVhZHkgZXhpc3RzLCB3ZSBqdXN0 - IHF1ZXJ5IGl0CiAgICAgICAgICAgIGlmIGV4ZWNFcnIucmV0dXJuY29kZSA9PSBlcnJuby5FRVhJ - U1Q6CiAgICAgICAgICAgICAgICBjbWQgPSBbCiAgICAgICAgICAgICAgICAgICAgInJhZG9zZ3ct - YWRtaW4iLAogICAgICAgICAgICAgICAgICAgICJ1c2VyIiwKICAgICAgICAgICAgICAgICAgICAi - aW5mbyIsCiAgICAgICAgICAgICAgICAgICAgIi0tdWlkIiwKICAgICAgICAgICAgICAgICAgICBz - ZWxmLkVYVEVSTkFMX1JHV19BRE1JTl9PUFNfVVNFUl9OQU1FLAogICAgICAgICAgICAgICAgICAg - ICItLXJndy1yZWFsbSIsCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5yZ3df - cmVhbG1fbmFtZSwKICAgICAgICAgICAgICAgICAgICAiLS1yZ3ctem9uZWdyb3VwIiwKICAgICAg - ICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnJnd196b25lZ3JvdXBfbmFtZSwKICAgICAg - ICAgICAgICAgICAgICAiLS1yZ3ctem9uZSIsCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJn - X3BhcnNlci5yZ3dfem9uZV9uYW1lLAogICAgICAgICAgICAgICAgXQogICAgICAgICAgICAgICAg - dHJ5OgogICAgICAgICAgICAgICAgICAgIG91dHB1dCA9IHN1YnByb2Nlc3MuY2hlY2tfb3V0cHV0 - KGNtZCwgc3RkZXJyPXN1YnByb2Nlc3MuUElQRSkKICAgICAgICAgICAgICAgIGV4Y2VwdCBzdWJw - cm9jZXNzLkNhbGxlZFByb2Nlc3NFcnJvciBhcyBleGVjRXJyOgogICAgICAgICAgICAgICAgICAg - IGVycl9tc2cgPSAoCiAgICAgICAgICAgICAgICAgICAgICAgIGYiZmFpbGVkIHRvIGV4ZWN1dGUg - Y29tbWFuZCB7Y21kfS4gT3V0cHV0OiB7ZXhlY0Vyci5vdXRwdXR9LiAiCiAgICAgICAgICAgICAg - ICAgICAgICAgIGYiQ29kZToge2V4ZWNFcnIucmV0dXJuY29kZX0uIEVycm9yOiB7ZXhlY0Vyci5z - dGRlcnJ9IgogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICBzeXMuc3Rk - ZXJyLndyaXRlKGVycl9tc2cpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE5vbmUsIE5vbmUs - IEZhbHNlLCAiLTEiCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBlcnJfbXNnID0g - KAogICAgICAgICAgICAgICAgICAgIGYiZmFpbGVkIHRvIGV4ZWN1dGUgY29tbWFuZCB7Y21kfS4g - T3V0cHV0OiB7ZXhlY0Vyci5vdXRwdXR9LiAiCiAgICAgICAgICAgICAgICAgICAgZiJDb2RlOiB7 - ZXhlY0Vyci5yZXR1cm5jb2RlfS4gRXJyb3I6IHtleGVjRXJyLnN0ZGVycn0iCiAgICAgICAgICAg - ICAgICApCiAgICAgICAgICAgICAgICBzeXMuc3RkZXJyLndyaXRlKGVycl9tc2cpCiAgICAgICAg - ICAgICAgICByZXR1cm4gTm9uZSwgTm9uZSwgRmFsc2UsICItMSIKCiAgICAgICAgIyBzZXBhcmF0 - ZWx5IGFkZCBpbmZvPXJlYWQgY2FwcyBmb3Igcmd3LWVuZHBvaW50IGlwIHZhbGlkYXRpb24KICAg - ICAgICBpbmZvX2NhcF9zdXBwb3J0ZWQgPSBUcnVlCiAgICAgICAgY21kID0gWwogICAgICAgICAg - ICAicmFkb3Nndy1hZG1pbiIsCiAgICAgICAgICAgICJjYXBzIiwKICAgICAgICAgICAgImFkZCIs - CiAgICAgICAgICAgICItLXVpZCIsCiAgICAgICAgICAgIHNlbGYuRVhURVJOQUxfUkdXX0FETUlO - X09QU19VU0VSX05BTUUsCiAgICAgICAgICAgICItLWNhcHMiLAogICAgICAgICAgICAiaW5mbz1y - ZWFkIiwKICAgICAgICAgICAgIi0tcmd3LXJlYWxtIiwKICAgICAgICAgICAgc2VsZi5fYXJnX3Bh - cnNlci5yZ3dfcmVhbG1fbmFtZSwKICAgICAgICAgICAgIi0tcmd3LXpvbmVncm91cCIsCiAgICAg - ICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVncm91cF9uYW1lLAogICAgICAgICAgICAi - LS1yZ3ctem9uZSIsCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVfbmFtZSwK - ICAgICAgICBdCiAgICAgICAgdHJ5OgogICAgICAgICAgICBvdXRwdXQgPSBzdWJwcm9jZXNzLmNo - ZWNrX291dHB1dChjbWQsIHN0ZGVycj1zdWJwcm9jZXNzLlBJUEUpCiAgICAgICAgZXhjZXB0IHN1 - YnByb2Nlc3MuQ2FsbGVkUHJvY2Vzc0Vycm9yIGFzIGV4ZWNFcnI6CiAgICAgICAgICAgICMgaWYg - dGhlIGNlcGggdmVyc2lvbiBub3Qgc3VwcG9ydGVkIGZvciBhZGRpbmcgYGluZm89cmVhZGAgY2Fw - KHJnd192YWxpZGF0aW9uKQogICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICAiY291bGQg - bm90IGFkZCBjYXBzOiB1bmFibGUgdG8gYWRkIGNhcHM6IGluZm89cmVhZFxuIgogICAgICAgICAg - ICAgICAgaW4gZXhlY0Vyci5zdGRlcnIuZGVjb2RlKCJ1dGYtOCIpCiAgICAgICAgICAgICAgICBh - bmQgZXhlY0Vyci5yZXR1cm5jb2RlID09IDI0NAogICAgICAgICAgICApOgogICAgICAgICAgICAg - ICAgaW5mb19jYXBfc3VwcG9ydGVkID0gRmFsc2UKICAgICAgICAgICAgZWxzZToKICAgICAgICAg - ICAgICAgIGVycl9tc2cgPSAoCiAgICAgICAgICAgICAgICAgICAgZiJmYWlsZWQgdG8gZXhlY3V0 - ZSBjb21tYW5kIHtjbWR9LiBPdXRwdXQ6IHtleGVjRXJyLm91dHB1dH0uICIKICAgICAgICAgICAg - ICAgICAgICBmIkNvZGU6IHtleGVjRXJyLnJldHVybmNvZGV9LiBFcnJvcjoge2V4ZWNFcnIuc3Rk - ZXJyfSIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIHN5cy5zdGRlcnIud3JpdGUo - ZXJyX21zZykKICAgICAgICAgICAgICAgIHJldHVybiBOb25lLCBOb25lLCBGYWxzZSwgIi0xIgoK - ICAgICAgICBqc29ub3V0cHV0ID0ganNvbi5sb2FkcyhvdXRwdXQpCiAgICAgICAgcmV0dXJuICgK - ICAgICAgICAgICAganNvbm91dHB1dFsia2V5cyJdWzBdWyJhY2Nlc3Nfa2V5Il0sCiAgICAgICAg - ICAgIGpzb25vdXRwdXRbImtleXMiXVswXVsic2VjcmV0X2tleSJdLAogICAgICAgICAgICBpbmZv - X2NhcF9zdXBwb3J0ZWQsCiAgICAgICAgICAgICIiLAogICAgICAgICkKCiAgICBkZWYgdmFsaWRh - dGVfcmJkX3Bvb2woc2VsZiwgcG9vbF9uYW1lKToKICAgICAgICBpZiBub3Qgc2VsZi5jbHVzdGVy - LnBvb2xfZXhpc3RzKHBvb2xfbmFtZSk6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1 - cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICBmIlRoZSBwcm92aWRlZCBwb29sLCAne3Bvb2xf - bmFtZX0nLCBkb2VzIG5vdCBleGlzdCIKICAgICAgICAgICAgKQoKICAgIGRlZiBpbml0X3JiZF9w - b29sKHNlbGYsIHJiZF9wb29sX25hbWUpOgogICAgICAgIGlmIGlzaW5zdGFuY2Uoc2VsZi5jbHVz - dGVyLCBEdW1teVJhZG9zKToKICAgICAgICAgICAgcmV0dXJuCiAgICAgICAgaW9jdHggPSBzZWxm - LmNsdXN0ZXIub3Blbl9pb2N0eChyYmRfcG9vbF9uYW1lKQogICAgICAgIHJiZF9pbnN0ID0gcmJk - LlJCRCgpCiAgICAgICAgcmJkX2luc3QucG9vbF9pbml0KGlvY3R4LCBUcnVlKQoKICAgIGRlZiB2 - YWxpZGF0ZV9yYWRvc19uYW1lc3BhY2Uoc2VsZik6CiAgICAgICAgcmJkX3Bvb2xfbmFtZSA9IHNl - bGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9vbF9uYW1lCiAgICAgICAgaWYgc2VsZi5fYXJnX3Bh - cnNlci5yYmRfbWV0YWRhdGFfZWNfcG9vbF9uYW1lOgogICAgICAgICAgICByYmRfcG9vbF9uYW1l - ID0gc2VsZi5fYXJnX3BhcnNlci5yYmRfbWV0YWRhdGFfZWNfcG9vbF9uYW1lCiAgICAgICAgcmFk - b3NfbmFtZXNwYWNlID0gc2VsZi5fYXJnX3BhcnNlci5yYWRvc19uYW1lc3BhY2UKICAgICAgICBp - ZiByYWRvc19uYW1lc3BhY2UgPT0gIiI6CiAgICAgICAgICAgIHJldHVybgogICAgICAgIGlmIHJh - ZG9zX25hbWVzcGFjZS5pc2xvd2VyKCkgPT0gRmFsc2U6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1 - dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICBmIlRoZSBwcm92aWRlZCByYWRv - cyBOYW1lc3BhY2UsICd7cmFkb3NfbmFtZXNwYWNlfScsICIKICAgICAgICAgICAgICAgIGYiY29u - dGFpbnMgdXBwZXIgY2FzZSIKICAgICAgICAgICAgKQogICAgICAgIHJiZF9pbnN0ID0gcmJkLlJC - RCgpCiAgICAgICAgaW9jdHggPSBzZWxmLmNsdXN0ZXIub3Blbl9pb2N0eChyYmRfcG9vbF9uYW1l - KQogICAgICAgIGlmIHJiZF9pbnN0Lm5hbWVzcGFjZV9leGlzdHMoaW9jdHgsIHJhZG9zX25hbWVz - cGFjZSkgaXMgRmFsc2U6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRp - b24oCiAgICAgICAgICAgICAgICBmIlRoZSBwcm92aWRlZCByYWRvcyBOYW1lc3BhY2UsICd7cmFk - b3NfbmFtZXNwYWNlfScsICIKICAgICAgICAgICAgICAgIGYiaXMgbm90IGZvdW5kIGluIHRoZSBw - b29sICd7cmJkX3Bvb2xfbmFtZX0nIgogICAgICAgICAgICApCgogICAgZGVmIGdldF9vcl9jcmVh - dGVfc3Vidm9sdW1lX2dyb3VwKHNlbGYsIHN1YnZvbHVtZV9ncm91cCwgY2VwaGZzX2ZpbGVzeXN0 - ZW1fbmFtZSk6CiAgICAgICAgY21kID0gWwogICAgICAgICAgICAiY2VwaCIsCiAgICAgICAgICAg - ICJmcyIsCiAgICAgICAgICAgICJzdWJ2b2x1bWVncm91cCIsCiAgICAgICAgICAgICJnZXRwYXRo - IiwKICAgICAgICAgICAgY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZSwKICAgICAgICAgICAgc3Vidm9s - dW1lX2dyb3VwLAogICAgICAgIF0KICAgICAgICB0cnk6CiAgICAgICAgICAgIF8gPSBzdWJwcm9j - ZXNzLmNoZWNrX291dHB1dChjbWQsIHN0ZGVycj1zdWJwcm9jZXNzLlBJUEUpCiAgICAgICAgZXhj - ZXB0IHN1YnByb2Nlc3MuQ2FsbGVkUHJvY2Vzc0Vycm9yOgogICAgICAgICAgICBjbWQgPSBbCiAg - ICAgICAgICAgICAgICAiY2VwaCIsCiAgICAgICAgICAgICAgICAiZnMiLAogICAgICAgICAgICAg - ICAgInN1YnZvbHVtZWdyb3VwIiwKICAgICAgICAgICAgICAgICJjcmVhdGUiLAogICAgICAgICAg - ICAgICAgY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZSwKICAgICAgICAgICAgICAgIHN1YnZvbHVtZV9n - cm91cCwKICAgICAgICAgICAgXQogICAgICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICBfID0g - c3VicHJvY2Vzcy5jaGVja19vdXRwdXQoY21kLCBzdGRlcnI9c3VicHJvY2Vzcy5QSVBFKQogICAg - ICAgICAgICBleGNlcHQgc3VicHJvY2Vzcy5DYWxsZWRQcm9jZXNzRXJyb3I6CiAgICAgICAgICAg - ICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAg - IGYic3Vidm9sdW1lIGdyb3VwIHtzdWJ2b2x1bWVfZ3JvdXB9IGlzIG5vdCBhYmxlIHRvIGdldCBj - cmVhdGVkIgogICAgICAgICAgICAgICAgKQoKICAgIGRlZiBwaW5fc3Vidm9sdW1lKAogICAgICAg - IHNlbGYsIHN1YnZvbHVtZV9ncm91cCwgY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZSwgcGluX3R5cGUs - IHBpbl9zZXR0aW5nCiAgICApOgogICAgICAgIGNtZCA9IFsKICAgICAgICAgICAgImNlcGgiLAog - ICAgICAgICAgICAiZnMiLAogICAgICAgICAgICAic3Vidm9sdW1lZ3JvdXAiLAogICAgICAgICAg - ICAicGluIiwKICAgICAgICAgICAgY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZSwKICAgICAgICAgICAg - c3Vidm9sdW1lX2dyb3VwLAogICAgICAgICAgICBwaW5fdHlwZSwKICAgICAgICAgICAgcGluX3Nl - dHRpbmcsCiAgICAgICAgXQogICAgICAgIHRyeToKICAgICAgICAgICAgXyA9IHN1YnByb2Nlc3Mu - Y2hlY2tfb3V0cHV0KGNtZCwgc3RkZXJyPXN1YnByb2Nlc3MuUElQRSkKICAgICAgICBleGNlcHQg - c3VicHJvY2Vzcy5DYWxsZWRQcm9jZXNzRXJyb3I6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlv - bkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICBmInN1YnZvbHVtZSBncm91cCB7c3Vi - dm9sdW1lX2dyb3VwfSBpcyBub3QgYWJsZSB0byBnZXQgcGlubmVkIgogICAgICAgICAgICApCgog - ICAgZGVmIGdldF9yZ3dfZnNpZChzZWxmLCBiYXNlX3VybCwgdmVyaWZ5KToKICAgICAgICBhY2Nl - c3Nfa2V5ID0gc2VsZi5vdXRfbWFwWyJSR1dfQURNSU5fT1BTX1VTRVJfQUNDRVNTX0tFWSJdCiAg - ICAgICAgc2VjcmV0X2tleSA9IHNlbGYub3V0X21hcFsiUkdXX0FETUlOX09QU19VU0VSX1NFQ1JF - VF9LRVkiXQogICAgICAgIHJnd19lbmRwb2ludCA9IHNlbGYuX2FyZ19wYXJzZXIucmd3X2VuZHBv - aW50CiAgICAgICAgYmFzZV91cmwgPSBiYXNlX3VybCArICI6Ly8iICsgcmd3X2VuZHBvaW50ICsg - Ii9hZG1pbi9pbmZvPyIKICAgICAgICBwYXJhbXMgPSB7ImZvcm1hdCI6ICJqc29uIn0KICAgICAg - ICByZXF1ZXN0X3VybCA9IGJhc2VfdXJsICsgdXJsZW5jb2RlKHBhcmFtcykKCiAgICAgICAgdHJ5 - OgogICAgICAgICAgICByID0gcmVxdWVzdHMuZ2V0KAogICAgICAgICAgICAgICAgcmVxdWVzdF91 - cmwsCiAgICAgICAgICAgICAgICBhdXRoPVMzQXV0aChhY2Nlc3Nfa2V5LCBzZWNyZXRfa2V5LCBy - Z3dfZW5kcG9pbnQpLAogICAgICAgICAgICAgICAgdmVyaWZ5PXZlcmlmeSwKICAgICAgICAgICAg - KQogICAgICAgIGV4Y2VwdCByZXF1ZXN0cy5leGNlcHRpb25zLlRpbWVvdXQ6CiAgICAgICAgICAg - IHN5cy5zdGRlcnIud3JpdGUoCiAgICAgICAgICAgICAgICBmImludmFsaWQgZW5kcG9pbnQ6LCBu - b3QgYWJsZSB0byBjYWxsIGFkbWluLW9wcyBhcGl7cmd3X2VuZHBvaW50fSIKICAgICAgICAgICAg - KQogICAgICAgICAgICByZXR1cm4gIiIsICItMSIKICAgICAgICByMSA9IHIuanNvbigpCiAgICAg - ICAgaWYgcjEgaXMgTm9uZSBvciByMS5nZXQoImluZm8iKSBpcyBOb25lOgogICAgICAgICAgICBz - eXMuc3RkZXJyLndyaXRlKAogICAgICAgICAgICAgICAgZiJUaGUgcHJvdmlkZWQgcmd3IEVuZHBv - aW50LCAne3NlbGYuX2FyZ19wYXJzZXIucmd3X2VuZHBvaW50fScsIGlzIGludmFsaWQuIgogICAg - ICAgICAgICApCiAgICAgICAgICAgIHJldHVybiAoCiAgICAgICAgICAgICAgICAiIiwKICAgICAg - ICAgICAgICAgICItMSIsC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gd2UgZG9uJ3QgY3JlYXRl - IHRoZXNlIGRlZmF1bHQgcG9vbHMKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJnd19wb29s - X3ByZWZpeCAhPSAiZGVmYXVsdCI6CiAgICAgICAgICAgIHJnd19wb29sc190b192YWxpZGF0ZSA9 - IFsKICAgICAgICAgICAgICAgIGYie3NlbGYuX2FyZ19wYXJzZXIucmd3X3Bvb2xfcHJlZml4fS5y - Z3cubWV0YSIsCiAgICAgICAgICAgICAgICAiLnJndy5yb290IiwKICAgICAgICAgICAgICAgIGYi - e3NlbGYuX2FyZ19wYXJzZXIucmd3X3Bvb2xfcHJlZml4fS5yZ3cuY29udHJvbCIsCiAgICAgICAg - ICAgICAgICBmIntzZWxmLl9hcmdfcGFyc2VyLnJnd19wb29sX3ByZWZpeH0ucmd3LmxvZyIsCiAg - ICAgICAgICAgIF0KICAgICAgICAgICAgZm9yIF9yZ3dfcG9vbF90b192YWxpZGF0ZSBpbiByZ3df - cG9vbHNfdG9fdmFsaWRhdGU6CiAgICAgICAgICAgICAgICBpZiBub3Qgc2VsZi5jbHVzdGVyLnBv - b2xfZXhpc3RzKF9yZ3dfcG9vbF90b192YWxpZGF0ZSk6CiAgICAgICAgICAgICAgICAgICAgc3lz - LnN0ZGVyci53cml0ZSgKICAgICAgICAgICAgICAgICAgICAgICAgZiJUaGUgcHJvdmlkZWQgcG9v - bCwgJ3tfcmd3X3Bvb2xfdG9fdmFsaWRhdGV9JywgZG9lcyBub3QgZXhpc3QiCiAgICAgICAgICAg - ICAgICAgICAgKQogICAgICAgICAgICAgICAgICAgIHJldHVybiAiLTEiCgogICAgICAgIHJldHVy - biAiIgoKICAgIGRlZiB2YWxpZGF0ZV9yZ3dfbXVsdGlzaXRlKHNlbGYsIHJnd19tdWx0aXNpdGVf - Y29uZmlnX25hbWUsIHJnd19tdWx0aXNpdGVfY29uZmlnKToKICAgICAgICBpZiByZ3dfbXVsdGlz - aXRlX2NvbmZpZyAhPSAiIjoKICAgICAgICAgICAgY21kID0gWwogICAgICAgICAgICAgICAgInJh - ZG9zZ3ctYWRtaW4iLAogICAgICAgICAgICAgICAgcmd3X211bHRpc2l0ZV9jb25maWcsCiAgICAg - ICAgICAgICAgICAiZ2V0IiwKICAgICAgICAgICAgICAgICItLXJndy0iICsgcmd3X211bHRpc2l0 - ZV9jb25maWcsCiAgICAgICAgICAgICAgICByZ3dfbXVsdGlzaXRlX2NvbmZpZ19uYW1lLAogICAg - ICAgICAgICBdCiAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgIF8gPSBzdWJwcm9jZXNz - LmNoZWNrX291dHB1dChjbWQsIHN0ZGVycj1zdWJwcm9jZXNzLlBJUEUpCiAgICAgICAgICAgIGV4 - Y2VwdCBzdWJwcm9jZXNzLkNhbGxlZFByb2Nlc3NFcnJvciBhcyBleGVjRXJyOgogICAgICAgICAg - ICAgICAgZXJyX21zZyA9ICgKICAgICAgICAgICAgICAgICAgICBmImZhaWxlZCB0byBleGVjdXRl - IGNvbW1hbmQge2NtZH0uIE91dHB1dDoge2V4ZWNFcnIub3V0cHV0fS4gIgogICAgICAgICAgICAg - ICAgICAgIGYiQ29kZToge2V4ZWNFcnIucmV0dXJuY29kZX0uIEVycm9yOiB7ZXhlY0Vyci5zdGRl - cnJ9IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZShl - cnJfbXNnKQogICAgICAgICAgICAgICAgcmV0dXJuICItMSIKICAgICAgICByZXR1cm4gIiIKCiAg - ICBkZWYgY29udmVydF9jb21tYV9zZXBhcmF0ZWRfdG9fYXJyYXkoc2VsZiwgdmFsdWUpOgogICAg - ICAgIHJldHVybiB2YWx1ZS5zcGxpdCgiLCIpCgogICAgZGVmIHJhaXNlX2V4Y2VwdGlvbl9pZl9h - bnlfdG9wb2xvZ3lfZmxhZ19pc19taXNzaW5nKHNlbGYpOgogICAgICAgIGlmICgKICAgICAgICAg - ICAgKAogICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci50b3BvbG9neV9wb29scyAhPSAi - IgogICAgICAgICAgICAgICAgYW5kICgKICAgICAgICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFy - c2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX2xhYmVsID09ICIiCiAgICAgICAgICAgICAgICAg - ICAgb3Igc2VsZi5fYXJnX3BhcnNlci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl92YWx1ZXMgPT0g - IiIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgKQogICAgICAgICAgICBvciAoCiAgICAg - ICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX2xhYmVs - ICE9ICIiCiAgICAgICAgICAgICAgICBhbmQgKAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2Fy - Z19wYXJzZXIudG9wb2xvZ3lfcG9vbHMgPT0gIiIKICAgICAgICAgICAgICAgICAgICBvciBzZWxm - Ll9hcmdfcGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX3ZhbHVlcyA9PSAiIgogICAgICAg - ICAgICAgICAgKQogICAgICAgICAgICApCiAgICAgICAgICAgIG9yICgKICAgICAgICAgICAgICAg - IHNlbGYuX2FyZ19wYXJzZXIudG9wb2xvZ3lfZmFpbHVyZV9kb21haW5fdmFsdWVzICE9ICIiCiAg - ICAgICAgICAgICAgICBhbmQgKAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIu - dG9wb2xvZ3lfcG9vbHMgPT0gIiIKICAgICAgICAgICAgICAgICAgICBvciBzZWxmLl9hcmdfcGFy - c2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX2xhYmVsID09ICIiCiAgICAgICAgICAgICAgICAp - CiAgICAgICAgICAgICkKICAgICAgICApOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWls - dXJlRXhjZXB0aW9uKAog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gICAgICAgaWYgKAogICAgICAg - ICAgICAgICAgICAgIGFyZ1ZhbHVlICE9ICJjb25maWctZmlsZSIKICAgICAgICAgICAgICAgICAg - ICBhbmQgZ2V0YXR0cihzZWxmLl9hcmdfcGFyc2VyLCBhcmcpICE9IEZhbHNlCiAgICAgICAgICAg - ICAgICApOgogICAgICAgICAgICAgICAgICAgIGFyZ3VtZW50ICs9IGYie2FyZ1ZhbHVlfSA9IHtz - dHIoZ2V0YXR0cihzZWxmLl9hcmdfcGFyc2VyLCBhcmcpKX1cbiIKICAgICAgICByZXR1cm4gYXJn - dW1lbnQKCiAgICBkZWYgX2dlbl9vdXRwdXRfbWFwKHNlbGYpOgogICAgICAgIGlmIHNlbGYub3V0 - X21hcDoKICAgICAgICAgICAgcmV0dXJuCiAgICAgICAgIyBzdXBwb3J0IGxlZ2FjeSBmbGFnIHdp - dGggdXBncmFkZXMKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLmNsdXN0ZXJfbmFtZToKICAg - ICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5rOHNfY2x1c3Rlcl9uYW1lID0gc2VsZi5fYXJnX3Bh - cnNlci5jbHVzdGVyX25hbWUKICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLms4c19jbHVzdGVyX25h - bWUgPSAoCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIuazhzX2NsdXN0ZXJfbmFtZS5sb3dl - cigpCiAgICAgICAgKSAgIyBhbHdheXMgY29udmVydCBjbHVzdGVyIG5hbWUgdG8gbG93ZXJjYXNl - IGNoYXJhY3RlcnMKICAgICAgICBzZWxmLnZhbGlkYXRlX3JiZF9wb29sKHNlbGYuX2FyZ19wYXJz - ZXIucmJkX2RhdGFfcG9vbF9uYW1lKQogICAgICAgIHNlbGYuaW5pdF9yYmRfcG9vbChzZWxmLl9h - cmdfcGFyc2VyLnJiZF9kYXRhX3Bvb2xfbmFtZSkKICAgICAgICBzZWxmLnZhbGlkYXRlX3JhZG9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AgICAgICAgICAgc2VsZi5vdXRfbWFwWyJDU0lfUkJEX05PREVfU0VDUkVUIl0sCiAg - ICAgICAgICAgIHNlbGYub3V0X21hcFsiQ1NJX1JCRF9OT0RFX1NFQ1JFVF9OQU1FIl0sCiAgICAg - ICAgKSA9IHNlbGYuY3JlYXRlX2NlcGhDU0lLZXlyaW5nX3VzZXIoImNsaWVudC5jc2ktcmJkLW5v - ZGUiKQogICAgICAgICgKICAgICAgICAgICAgc2VsZi5vdXRfbWFwWyJDU0lfUkJEX1BST1ZJU0lP - TkVSX1NFQ1JFVCJdLAogICAgICAgICAgICBzZWxmLm91dF9tYXBbIkNTSV9SQkRfUFJPVklTSU9O - RVJfU0VDUkVUX05BTUUiXSwKICAgICAgICApID0gc2VsZi5jcmVhdGVfY2VwaENTSUtleXJpbmdf - dXNlcigiY2xpZW50LmNzaS1yYmQtcHJvdmlzaW9uZXIiKQogICAgICAgIHNlbGYub3V0X21hcFsi - Q0VQSEZTX1BPT0xfTkFNRSJdID0gc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZGF0YV9wb29sX25h - bWUKICAgICAgICBzZWxmLm91dF9tYXBbIkNFUEhGU19NRVRBREFUQV9QT09MX05BTUUiXSA9ICgK - ICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfbWV0YWRhdGFfcG9vbF9uYW1lCiAg - ICAgICAgKQogICAgICAgIHNlbGYub3V0X21hcFsiQ0VQSEZTX0ZTX05BTUUiXSA9IHNlbGYuX2Fy - Z19wYXJzZXIuY2VwaGZzX2ZpbGVzeXN0ZW1fbmFtZQogICAgICAgIHNlbGYub3V0X21hcFsiUkVT - VFJJQ1RFRF9BVVRIX1BFUk1JU1NJT04iXSA9ICgKICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNl - ci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbgogICAgICAgICkKICAgICAgICBzZWxmLm91dF9t - YXBbIlJBRE9TX05BTUVTUEFDRSJdID0g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AgICAgICAgIyBjcmVhdGUgdGhlIGRl - ZmF1bHQgImNzaSIgc3Vidm9sdW1lZ3JvdXAKICAgICAgICAgICAgc2VsZi5nZXRfb3JfY3JlYXRl - X3N1YnZvbHVtZV9ncm91cCgKICAgICAgICAgICAgICAgICJjc2kiLCBzZWxmLl9hcmdfcGFyc2Vy - LmNlcGhmc19maWxlc3lzdGVtX25hbWUKICAgICAgICAgICAgKQogICAgICAgICAgICAjIHBpbiB0 - aGUgZGVmYXVsdCAiY3NpIiBzdWJ2b2x1bWVncm91cAogICAgICAgICAgICBzZWxmLnBpbl9zdWJ2 - b2x1bWUoCiAgICAgICAgICAgICAgICAiY3NpIiwgc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZmls - ZXN5c3RlbV9uYW1lLCAiZGlzdHJpYnV0ZWQiLCAiMSIKICAgICAgICAgICAgKQogICAgICAgICAg - ICBpZiBzZWxmLm91dF9tYXBbIlNVQlZPTFVNRV9HUk9VUCJdOgogICAgICAgICAgICAgICAgc2Vs - Zi5nZXRfb3JfY3JlYXRlX3N1YnZvbHVtZV9ncm91cCgKICAgICAgICAgICAgICAgICAgICBzZWxm - Ll9hcmdfcGFyc2VyLnN1YnZvbHVtZV9ncm91cCwKICAgICAgICAgICAgICAgICAgICBzZWxmLl9h - cmdfcGFyc2VyLmNlcGhmc19maWxlc3lzdGVtX25hbWUsCiAgICAgICAgICAgICAgICApCiAgICAg - ICAgICAgICAgICBzZWxmLnBpbl9zdWJ2b2x1bWUoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5f - YXJnX3BhcnNlci5zdWJ2b2x1bWVfZ3JvdXAsCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJn - X3BhcnNlci5jZXBoZnNfZmlsZXN5c3RlbV9uYW1lLAogICAgICAgICAgICAgICAgICAgICJkaXN0 - cmlidXRlZCIsCiAgICAgICAgICAgICAgICAgICAgIjEiLAogICAgICAgICAgICAgICAgKQogICAg - ICAgIHNlbGYub3V0X21hcF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ICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNl - ci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl92YWx1ZXMKICAgICAgICApCiAgICAgICAgaWYgKAog - ICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X3Bvb2xzICE9ICIiCiAgICAgICAg - ICAgIGFuZCBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX2xhYmVsICE9 - ICIiCiAgICAgICAgICAgIGFuZCBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9t - YWluX3ZhbHVlcyAhPSAiIgogICAgICAgICk6CiAgICAgICAgICAgIHNlbGYudmFsaWRhdGVfdG9w - b2xvZ3lfdmFsdWVzKAogICAgICAgICAgICAgICAgc2VsZi5jb252ZXJ0X2NvbW1hX3NlcGFyYXRl - ZF90b19hcnJheShzZWxmLm91dF9tYXBbIlRPUE9MT0dZX1BPT0xTIl0pLAogICAgICAgICAgICAg - ICAgc2VsZi5jb252ZXJ0X2NvbW1hX3NlcGFyYXRlZF90b19hcnJheSgKICAgICAgICAgICAgICAg - ICAgICBzZWxmLm91dF9tYXBbIlRPUE9MT0dZX0ZBSUxVUkVfRE9NQUlOX1ZBTFVFUyJdCiAgICAg - ICAgICAgICAgICApLAogICAgICAgICAgICApCiAgICAgICAgICAgIHNlbGYudmFsaWRhdGVfdG9w - b2xvZ3lfcmJkX3Bvb2xzKAogICAgICAgICAgICAgICAgc2VsZi5jb252ZXJ0X2NvbW1hX3NlcGFy - YXRlZF90b19hcnJheShzZWxmLm91dF9tYXBbIlRPUE9MT0dZX1BPT0xTIl0pCiAgICAgICAgICAg - ICkKICAgICAgICAgICAgc2VsZi5pbml0X3RvcG9sb2d5X3JiZF9wb29scygKICAgICAgICAgICAg - ICAgIHNlbGYuY29udmVydF9jb21tYV9zZXBhcmF0ZWRfdG9fYXJyYXkoc2VsZi5vdXRfbWFwWyJU - T1BPTE9HWV9QT09MUyJdKQogICAgICAgICAgICApCiAgICAgICAgZWxzZToKICAgICAgICAgICAg - c2VsZi5yYWlzZV9leGNlcHRpb25faWZfYW55X3RvcG9sb2d5X2ZsYWdfaXNfbWlzc2luZygpCgog - ICAgICAgIHNlbGYub3V0X21hcFsiUkdXX1BPT0xfUFJFRklYIl0gPSBzZWxmLl9hcmdfcGFyc2Vy - LnJnd19wb29sX3ByZWZpeAogICAgICAgIHNlbGYub3V0X21hcFsiUkdXX0VORFBPSU5UIl0gPSAi - IgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIucmd3X2VuZHBvaW50OgogICAgICAgICAgICBp - ZiBzZWxmLl9hcmdfcGFyc2VyLmRyeV9ydW46CiAgICAgICAgICAgICAgICBzZWxmLmNyZWF0ZV9y - Z3dfYWRtaW5fb3BzX3VzZXIoKQogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgaWYg + IGNlcGhmcyAqPSoiLAogICAgICAgICAgICAibWRzIjogImFsbG93IHJ3IiwKICAgICAgICB9CiAg + ICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbjoKICAg + ICAgICAgICAgazhzX2NsdXN0ZXJfbmFtZSA9IHNlbGYuX2FyZ19wYXJzZXIuazhzX2NsdXN0ZXJf + bmFtZQogICAgICAgICAgICBpZiBrOHNfY2x1c3Rlcl9uYW1lID09ICIiOgogICAgICAgICAgICAg + ICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICAi + azhzX2NsdXN0ZXJfbmFtZSBub3QgZm91bmQsIHBsZWFzZSBzZXQgdGhlICctLWs4cy1jbHVzdGVy + LW5hbWUnIGZsYWciCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgIGNlcGhmc19maWxlc3lz + dGVtID0gc2VsZi5fYXJnX3BhcnNlci5jZXBoZnNfZmlsZXN5c3RlbV9uYW1lCiAgICAgICAgICAg + IGlmIGNlcGhmc19maWxlc3lzdGVtID09ICIiOgogICAgICAgICAgICAgICAgZW50aXR5ID0gZiJ7 + ZW50aXR5fS17azhzX2NsdXN0ZXJfbmFtZX0iCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAg + ICAgICBlbnRpdHkgPSBmIntlbnRpdHl9LXtrOHNfY2x1c3Rlcl9uYW1lfS17Y2VwaGZzX2ZpbGVz + eXN0ZW19IgogICAgICAgICAgICAgICAgY2Fwc1sib3NkIl0gPSBmImFsbG93IHJ3IHRhZyBjZXBo + ZnMgKj17Y2VwaGZzX2ZpbGVzeXN0ZW19IgoKICAgICAgICByZXR1cm4gY2FwcywgZW50aXR5Cgog + ICAgZGVmIGdldF9lbnRpdHkoCiAgICAgICAgc2VsZiwKICAgICAgICBlbnRpdHksCiAgICAgICAg + cmJkX3Bvb2xfbmFtZSwKICAgICAgICBhbGlhc19yYmRfcG9vbF9uYW1lLAogICAgICAgIGs4c19j + bHVzdGVyX25hbWUsCiAgICAgICAgcmFkb3NfbmFtZXNwYWNlLAogICAgKToKICAgICAgICBpZiAo + CiAgICAgICAgICAgIHJiZF9wb29sX25hbWUuY291bnQoIi4iKSAhPSAwCiAgICAgICAgICAgIG9y + IHJiZF9wb29sX25hbWUuY291bnQoIl8iKSAhPSAwCiAgICAgICAgICAgIG9yIGFsaWFzX3JiZF9w + b29sX25hbWUgIT0gIiIKICAgICAgICAgICAgIyBjaGVja2luZyBhbGlhc19yYmRfcG9vbF9uYW1l + IGlzIG5vdCBlbXB0eSBhcyB0aGVyZSBtYXliZSBhIHNwZWNpYWwgY2hhcmFjdGVyIHVzZWQgb3Ro + ZXIgdGhhbiAuIG9yIF8KICAgICAgICApOgogICAgICAgICAgICBpZiBhbGlhc19yYmRfcG9vbF9u + YW1lID09ICIiOgogICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlv + bigKICAgICAgICAgICAgICAgICAgICAicGxlYXNlIHNldCB0aGUgJy0tYWxpYXMtcmJkLWRhdGEt + cG9vbC1uYW1lJyBmbGFnIGFzIHRoZSByYmQgZGF0YSBwb29sIG5hbWUgY29udGFpbnMgJy4nIG9y + ICdfJyIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgKAogICAgICAgICAgICAgICAg + YWxpYXNfcmJkX3Bvb2xfbmFtZS5jb3VudCgiLiIpICE9IDAKICAgICAgICAgICAgICAgIG9yIGFs + aWFzX3JiZF9wb29sX25hbWUuY291bnQoIl8iKSAhPSAwCiAgICAgICAgICAgICk6CiAgICAgICAg + ICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAg + ICAgICInLS1hbGlhcy1yYmQtZGF0YS1wb29sLW5hbWUnIGZsYWcgdmFsdWUgc2hvdWxkIG5vdCBj + b250YWluICcuJyBvciAnXyciCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgIGVudGl0eSA9 + IGYie2VudGl0eX0te2s4c19jbHVzdGVyX25hbWV9LXthbGlhc19yYmRfcG9vbF9uYW1lfSIKICAg + ICAgICBlbHNlOgogICAgICAgICAgICBlbnRpdHkgPSBmIntlbnRpdHl9LXtrOHNfY2x1c3Rlcl9u + YW1lfS17cmJkX3Bvb2xfbmFtZX0iCgogICAgICAgIGlmIHJhZG9zX25hbWVzcGFjZToKICAgICAg + ICAgICAgZW50aXR5ID0gZiJ7ZW50aXR5fS17cmFkb3NfbmFtZXNwYWNlfSIKICAgICAgICByZXR1 + cm4gZW50aXR5CgogICAgZGVmIGdldF9yYmRfcHJvdmlzaW9uZXJfY2Fwc19hbmRfZW50aXR5KHNl + bGYpOgogICAgICAgIGVudGl0eSA9ICJjbGllbnQuY3NpLXJiZC1wcm92aXNpb25lciIKICAgICAg + ICBjYXBzID0gewogICAgICAgICAgICAibW9uIjogInByb2ZpbGUgcmJkLCBhbGxvdyBjb21tYW5k + ICdvc2QgYmxvY2tsaXN0JyIsCiAgICAgICAgICAgICJtZ3IiOiAiYWxsb3cgcnciLAogICAgICAg + ICAgICAib3NkIjogInByb2ZpbGUgcmJkIiwKICAgICAgICB9CiAgICAgICAgaWYgc2VsZi5fYXJn + X3BhcnNlci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbjoKICAgICAgICAgICAgcmJkX3Bvb2xf + bmFtZSA9IHNlbGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9vbF9uYW1lCiAgICAgICAgICAgIGFs + aWFzX3JiZF9wb29sX25hbWUgPSBzZWxmLl9hcmdfcGFyc2VyLmFsaWFzX3JiZF9kYXRhX3Bvb2xf + bmFtZQogICAgICAgICAgICBrOHNfY2x1c3Rlcl9uYW1lID0gc2VsZi5fYXJnX3BhcnNlci5rOHNf + Y2x1c3Rlcl9uYW1lCiAgICAgICAgICAgIHJhZG9zX25hbWVzcGFjZSA9IHNlbGYuX2FyZ19wYXJz + ZXIucmFkb3NfbmFtZXNwYWNlCiAgICAgICAgICAgIGlmIHJiZF9wb29sX25hbWUgPT0gIiI6CiAg + ICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAg + ICAgICAgICAgICJtYW5kYXRvcnkgZmxhZyBub3QgZm91bmQsIHBsZWFzZSBzZXQgdGhlICctLXJi + ZC1kYXRhLXBvb2wtbmFtZScgZmxhZyIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgaWYg + azhzX2NsdXN0ZXJfbmFtZSA9PSAiIjoKICAgICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZh + aWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIm1hbmRhdG9yeSBmbGFnIG5vdCBm + b3VuZCwgcGxlYXNlIHNldCB0aGUgJy0tazhzLWNsdXN0ZXItbmFtZScgZmxhZyIKICAgICAgICAg + ICAgICAgICkKICAgICAgICAgICAgZW50aXR5ID0gc2VsZi5nZXRfZW50aXR5KAogICAgICAgICAg + ICAgICAgZW50aXR5LAogICAgICAgICAgICAgICAgcmJkX3Bvb2xfbmFtZSwKICAgICAgICAgICAg + ICAgIGFsaWFzX3JiZF9wb29sX25hbWUsCiAgICAgICAgICAgICAgICBrOHNfY2x1c3Rlcl9uYW1l + LAogICAgICAgICAgICAgICAgcmFkb3NfbmFtZXNwYWNlLAogICAgICAgICAgICApCiAgICAgICAg + ICAgIGlmIHJhZG9zX25hbWVzcGFjZSAhPSAiIjoKICAgICAgICAgICAgICAgIGNhcHNbIm9zZCJd + ID0gKAogICAgICAgICAgICAgICAgICAgIGYicHJvZmlsZSByYmQgcG9vbD17cmJkX3Bvb2xfbmFt + ZX0gbmFtZXNwYWNlPXtyYWRvc19uYW1lc3BhY2V9IgogICAgICAgICAgICAgICAgKQogICAgICAg + ICAgICBlbHNlOgogICAgICAgICAgICAgICAgY2Fwc1sib3NkIl0gPSBmInByb2ZpbGUgcmJkIHBv + b2w9e3JiZF9wb29sX25hbWV9IgoKICAgICAgICByZXR1cm4gY2FwcywgZW50aXR5CgogICAgZGVm + IGdldF9yYmRfbm9kZV9jYXBzX2FuZF9lbnRpdHkoc2VsZik6CiAgICAgICAgZW50aXR5ID0gImNs + aWVudC5jc2ktcmJkLW5vZGUiCiAgICAgICAgY2FwcyA9IHsKICAgICAgICAgICAgIm1vbiI6ICJw + cm9maWxlIHJiZCwgYWxsb3cgY29tbWFuZCAnb3NkIGJsb2NrbGlzdCciLAogICAgICAgICAgICAi + b3NkIjogInByb2ZpbGUgcmJkIiwKICAgICAgICB9CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNl + ci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbjoKICAgICAgICAgICAgcmJkX3Bvb2xfbmFtZSA9 + IHNlbGYuX2FyZ19wYXJzZXIucmJkX2RhdGFfcG9vbF9uYW1lCiAgICAgICAgICAgIGFsaWFzX3Ji + ZF9wb29sX25hbWUgPSBzZWxmLl9hcmdfcGFyc2VyLmFsaWFzX3JiZF9kYXRhX3Bvb2xfbmFtZQog + ICAgICAgICAgICBrOHNfY2x1c3Rlcl9uYW1lID0gc2VsZi5fYXJnX3BhcnNlci5rOHNfY2x1c3Rl + cl9uYW1lCiAgICAgICAgICAgIHJhZG9zX25hbWVzcGFjZSA9IHNlbGYuX2FyZ19wYXJzZXIucmFk + b3NfbmFtZXNwYWNlCiAgICAgICAgICAgIGlmIHJiZF9wb29sX25hbWUgPT0gIiI6CiAgICAgICAg + ICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAg + ICAgICJtYW5kYXRvcnkgZmxhZyBub3QgZm91bmQsIHBsZWFzZSBzZXQgdGhlICctLXJiZC1kYXRh + LXBvb2wtbmFtZScgZmxhZyIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgaWYgazhzX2Ns + dXN0ZXJfbmFtZSA9PSAiIjoKICAgICAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVF + eGNlcHRpb24oCiAgICAgICAgICAgICAgICAgICAgIm1hbmRhdG9yeSBmbGFnIG5vdCBmb3VuZCwg + cGxlYXNlIHNldCB0aGUgJy0tazhzLWNsdXN0ZXItbmFtZScgZmxhZyIKICAgICAgICAgICAgICAg + ICkKICAgICAgICAgICAgZW50aXR5ID0gc2VsZi5nZXRfZW50aXR5KAogICAgICAgICAgICAgICAg + ZW50aXR5LAogICAgICAgICAgICAgICAgcmJkX3Bvb2xfbmFtZSwKICAgICAgICAgICAgICAgIGFs + aWFzX3JiZF9wb29sX25hbWUsCiAgICAgICAgICAgICAgICBrOHNfY2x1c3Rlcl9uYW1lLAogICAg + ICAgICAgICAgICAgcmFkb3NfbmFtZXNwYWNlLAogICAgICAgICAgICApCiAgICAgICAgICAgIGlm + IHJhZG9zX25hbWVzcGFjZSAhPSAiIjoKICAgICAgICAgICAgICAgIGNhcHNbIm9zZCJdID0gKAog + ICAgICAgICAgICAgICAgICAgIGYicHJvZmlsZSByYmQgcG9vbD17cmJkX3Bvb2xfbmFtZX0gbmFt + ZXNwYWNlPXtyYWRvc19uYW1lc3BhY2V9IgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICBl + bHNlOgogICAgICAgICAgICAgICAgY2Fwc1sib3NkIl0gPSBmInByb2ZpbGUgcmJkIHBvb2w9e3Ji + ZF9wb29sX25hbWV9IgoKICAgICAgICByZXR1cm4gY2FwcywgZW50aXR5CgogICAgZGVmIGdldF9k + ZWZhdWx0VXNlcl9jYXBzX2FuZF9lbnRpdHkoc2VsZik6CiAgICAgICAgZW50aXR5ID0gc2VsZi5y + dW5fYXNfdXNlcgogICAgICAgIGNhcHMgPSB7CiAgICAgICAgICAgICJtb24iOiAiYWxsb3cgciwg + YWxsb3cgY29tbWFuZCBxdW9ydW1fc3RhdHVzLCBhbGxvdyBjb21tYW5kIHZlcnNpb24iLAogICAg + ICAgICAgICAibWdyIjogImFsbG93IGNvbW1hbmQgY29uZmlnIiwKICAgICAgICAgICAgIm9zZCI6 + IGYicHJvZmlsZSByYmQtcmVhZC1vbmx5LCBhbGxvdyByd3ggcG9vbD17c2VsZi5fYXJnX3BhcnNl + ci5yZ3dfcG9vbF9wcmVmaXh9LnJndy5tZXRhLCBhbGxvdyByIHBvb2w9LnJndy5yb290LCBhbGxv + dyBydyBwb29sPXtzZWxmLl9hcmdfcGFyc2VyLnJnd19wb29sX3ByZWZpeH0ucmd3LmNvbnRyb2ws + IGFsbG93IHJ4IHBvb2w9e3NlbGYuX2FyZ19wYXJzZXIucmd3X3Bvb2xfcHJlZml4fS5yZ3cubG9n + LCBhbGxvdyB4IHBvb2w9e3NlbGYuX2FyZ19wYXJzZXIucmd3X3Bvb2xfcHJlZml4fS5yZ3cuYnVj + a2V0cy5pbmRleCIsCiAgICAgICAgICAgICJtZHMiOiAiYWxsb3cgKiIsCiAgICAgICAgfQoKICAg + ICAgICByZXR1cm4gY2FwcywgZW50aXR5CgogICAgZGVmIGdldF9jYXBzX2FuZF9lbnRpdHkoc2Vs + ZiwgdXNlcl9uYW1lKToKICAgICAgICBpZiAiY2xpZW50LmNzaS1jZXBoZnMtcHJvdmlzaW9uZXIi + IGluIHVzZXJfbmFtZToKICAgICAgICAgICAgaWYgImNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lv + bmVyIiAhPSB1c2VyX25hbWU6CiAgICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnJlc3Ry + aWN0ZWRfYXV0aF9wZXJtaXNzaW9uID0gVHJ1ZQogICAgICAgICAgICByZXR1cm4gc2VsZi5nZXRf + Y2VwaGZzX3Byb3Zpc2lvbmVyX2NhcHNfYW5kX2VudGl0eSgpCiAgICAgICAgaWYgImNsaWVudC5j + c2ktY2VwaGZzLW5vZGUiIGluIHVzZXJfbmFtZToKICAgICAgICAgICAgaWYgImNsaWVudC5jc2kt + Y2VwaGZzLW5vZGUiICE9IHVzZXJfbmFtZToKICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJz + ZXIucmVzdHJpY3RlZF9hdXRoX3Blcm1pc3Npb24gPSBUcnVlCiAgICAgICAgICAgIHJldHVybiBz + ZWxmLmdldF9jZXBoZnNfbm9kZV9jYXBzX2FuZF9lbnRpdHkoKQogICAgICAgIGlmICJjbGllbnQu + Y3NpLXJiZC1wcm92aXNpb25lciIgaW4gdXNlcl9uYW1lOgogICAgICAgICAgICBpZiAiY2xpZW50 + LmNzaS1yYmQtcHJvdmlzaW9uZXIiICE9IHVzZXJfbmFtZToKICAgICAgICAgICAgICAgIHNlbGYu + X2FyZ19wYXJzZXIucmVzdHJpY3RlZF9hdXRoX3Blcm1pc3Npb24gPSBUcnVlCiAgICAgICAgICAg + IHJldHVybiBzZWxmLmdldF9yYmRfcHJvdmlzaW9uZXJfY2Fwc19hbmRfZW50aXR5KCkKICAgICAg + ICBpZiAiY2xpZW50LmNzaS1yYmQtbm9kZSIgaW4gdXNlcl9uYW1lOgogICAgICAgICAgICBpZiAi + Y2xpZW50LmNzaS1yYmQtbm9kZSIgIT0gdXNlcl9uYW1lOgogICAgICAgICAgICAgICAgc2VsZi5f + YXJnX3BhcnNlci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbiA9IFRydWUKICAgICAgICAgICAg + cmV0dXJuIHNlbGYuZ2V0X3JiZF9ub2RlX2NhcHNfYW5kX2VudGl0eSgpCiAgICAgICAgaWYgImNs + aWVudC5oZWFsdGhjaGVja2VyIiBpbiB1c2VyX25hbWU6CiAgICAgICAgICAgIGlmICJjbGllbnQu + aGVhbHRoY2hlY2tlciIgIT0gdXNlcl9uYW1lOgogICAgICAgICAgICAgICAgc2VsZi5fYXJnX3Bh + cnNlci5yZXN0cmljdGVkX2F1dGhfcGVybWlzc2lvbiA9IFRydWUKICAgICAgICAgICAgcmV0dXJu + IHNlbGYuZ2V0X2RlZmF1bHRVc2VyX2NhcHNfYW5kX2VudGl0eSgpCgogICAgICAgIHJhaXNlIEV4 + ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgIGYibm8gdXNlciBmb3VuZCB3aXRo + IHVzZXJfbmFtZToge3VzZXJfbmFtZX0sICIKICAgICAgICAgICAgImdldF9jYXBzX2FuZF9lbnRp + dHkgY29tbWFuZCBmYWlsZWQuXG4iCiAgICAgICAgKQoKICAgIGRlZiBjcmVhdGVfY2VwaENTSUtl + eXJpbmdfdXNlcihzZWxmLCB1c2VyKToKICAgICAgICAiIiIKICAgICAgICBjb21tYW5kOiBjZXBo + IGF1dGggZ2V0LW9yLWNyZWF0ZSBjbGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciBtb24gJ2Fs + bG93IHInIG1nciAnYWxsb3cgcncnIG9zZCAnYWxsb3cgcncgdGFnIGNlcGhmcyBtZXRhZGF0YT0q + JwogICAgICAgICIiIgogICAgICAgIGNhcHMsIGVudGl0eSA9IHNlbGYuZ2V0X2NhcHNfYW5kX2Vu + dGl0eSh1c2VyKQogICAgICAgIGNtZF9qc29uID0gewogICAgICAgICAgICAicHJlZml4IjogImF1 + dGggZ2V0LW9yLWNyZWF0ZSIsCiAgICAgICAgICAgICJlbnRpdHkiOiBlbnRpdHksCiAgICAgICAg + ICAgICJjYXBzIjogW2NhcCBmb3IgY2FwX2xpc3QgaW4gbGlzdChjYXBzLml0ZW1zKCkpIGZvciBj + YXAgaW4gY2FwX2xpc3RdLAogICAgICAgICAgICAiZm9ybWF0IjogImpzb24iLAogICAgICAgIH0K + CiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICByZXR1cm4g + KAogICAgICAgICAgICAgICAgc2VsZi5kcnlfcnVuKAogICAgICAgICAgICAgICAgICAgICJjZXBo + ICIKICAgICAgICAgICAgICAgICAgICArIGNtZF9qc29uWyJwcmVmaXgiXQogICAgICAgICAgICAg + ICAgICAgICsgIiAiCiAgICAgICAgICAgICAgICAgICAgKyBjbWRfanNvblsiZW50aXR5Il0KICAg + ICAgICAgICAgICAgICAgICArICIgIgogICAgICAgICAgICAgICAgICAgICsgIiAiLmpvaW4oY21k + X2pzb25bImNhcHMiXSkKICAgICAgICAgICAgICAgICksCiAgICAgICAgICAgICAgICAiIiwKICAg + ICAgICAgICAgKQogICAgICAgICMgY2hlY2sgaWYgdXNlciBhbHJlYWR5IGV4aXN0CiAgICAgICAg + dXNlcl9rZXkgPSBzZWxmLmNoZWNrX3VzZXJfZXhpc3QoZW50aXR5KQogICAgICAgIGlmIHVzZXJf + a2V5ICE9ICIiOgogICAgICAgICAgICByZXR1cm4gdXNlcl9rZXksIGYie2VudGl0eS5zcGxpdCgn + LicsIDEpWzFdfSIKICAgICAgICAgICAgIyBlbnRpdHkuc3BsaXQoJy4nLDEpWzFdIHRvIHJlbmFt + ZSBlbnRpdHkoY2xpZW50LmNzaS1yYmQtbm9kZSkgYXMgY3NpLXJiZC1ub2RlCgogICAgICAgIHJl + dF92YWwsIGpzb25fb3V0LCBlcnJfbXNnID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRf + anNvbikKICAgICAgICAjIGlmIHRoZXJlIGlzIGFuIHVuc3VjY2Vzc2Z1bCBhdHRlbXB0LAogICAg + ICAgIGlmIHJldF92YWwgIT0gMCBvciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHJh + aXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRpb24oCiAgICAgICAgICAgICAgICBmIidhdXRoIGdl + dC1vci1jcmVhdGUge3VzZXJ9JyBjb21tYW5kIGZhaWxlZC5cbiIKICAgICAgICAgICAgICAgIGYi + RXJyb3I6IHtlcnJfbXNnIGlmIHJldF92YWwgIT0gMCBlbHNlIHNlbGYuRU1QVFlfT1VUUFVUX0xJ + U1R9IgogICAgICAgICAgICApCiAgICAgICAgcmV0dXJuIHN0cihqc29uX291dFswXVsia2V5Il0p + LCBmIntlbnRpdHkuc3BsaXQoJy4nLCAxKVsxXX0iCiAgICAgICAgIyBlbnRpdHkuc3BsaXQoJy4n + LDEpWzFdIHRvIHJlbmFtZSBlbnRpdHkoY2xpZW50LmNzaS1yYmQtbm9kZSkgYXMgY3NpLXJiZC1u + b2RlCgogICAgZGVmIGdldF9jZXBoZnNfZGF0YV9wb29sX2RldGFpbHMoc2VsZik6CiAgICAgICAg + Y21kX2pzb24gPSB7InByZWZpeCI6ICJmcyBscyIsICJmb3JtYXQiOiAianNvbiJ9CiAgICAgICAg + aWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICByZXR1cm4gc2VsZi5kcnlf + cnVuKCJjZXBoICIgKyBjbWRfanNvblsicHJlZml4Il0pCiAgICAgICAgcmV0X3ZhbCwganNvbl9v + dXQsIGVycl9tc2cgPSBzZWxmLl9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAg + ICMgaWYgdGhlcmUgaXMgYW4gdW5zdWNjZXNzZnVsIGF0dGVtcHQsIHJlcG9ydCBhbiBlcnJvcgog + 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ICAgICAgICAgICAgIyBnZXQgdGhlIG1hdGNoaW5nIGxpc3QKICAgICAg + ICAgICAgbWF0Y2hpbmdfanNvbl9vdXRfbGlzdCA9IFsKICAgICAgICAgICAgICAgIG1hdGNoZWQK + ICAgICAgICAgICAgICAgIGZvciBtYXRjaGVkIGluIGpzb25fb3V0CiAgICAgICAgICAgICAgICBp + ZiBzdHIobWF0Y2hlZFsibmFtZSJdKSA9PSBzZWxmLl9hcmdfcGFyc2VyLmNlcGhmc19maWxlc3lz + dGVtX25hbWUKICAgICAgICAgICAgXQogICAgICAgICAgICAjIHVuYWJsZSB0byBmaW5kIGEgbWF0 + Y2hpbmcgZnMtbmFtZSwgcmFpc2UgYW4gZXJyb3IKICAgICAgICAgICAgaWYgbGVuKG1hdGNoaW5n + X2pzb25fb3V0X2xpc3QpID09IDA6CiAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWls + dXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgICAgIGYiRmlsZXN5c3RlbSBwcm92aWRlZCwg + J3tzZWxmLl9hcmdfcGFyc2VyLmNlcGhmc19maWxlc3lzdGVtX25hbWV9JywgIgogICAgICAgICAg + ICAgICAgICAgIGYiaXMgbm90IGZvdW5kIGluIHRoZSBmcy1saXN0OiB7W3N0cih4WyduYW1lJ10p + IGZvciB4IGluIGpzb25fb3V0XX0iCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgIG1hdGNo + aW5nX2pzb25fb3V0ID0gbWF0Y2hpbmdfanNvbl9vdXRfbGlzdFswXQogICAgICAgICMgaWYgY2Vw + aGZzIGZpbGVzeXN0ZW0gbmFtZSBpcyBub3QgcHJvdmlkZWQsCiAgICAgICAgIyB0cnkgdG8gZ2V0 + IGEgZGVmYXVsdCBmcyBuYW1lIGJ5IGRvaW5nIHRoZSBmb2xsb3dpbmcKICAgICAgICBlbHNlOgog + ICAgICAgICAgICAjIGEuIGNoZWNrIGlmIHRoZXJlIGlzIG9ubHkgb25lIGZpbGVzeXN0ZW0gaXMg + cHJlc2VudAogICAgICAgICAgICBpZiBsZW4oanNvbl9vdXQpID09IDE6CiAgICAgICAgICAgICAg + ICBtYXRjaGluZ19qc29uX291dCA9IGpzb25fb3V0WzBdCiAgICAgICAgICAgICMgYi4gb3IgZWxz + ZSwgY2hlY2sgaWYgZGF0YV9wb29sIG5hbWUgaXMgcHJvdmlkZWQKICAgICAgICAgICAgZWxpZiBz + ZWxmLl9hcmdfcGFyc2VyLmNlcGhmc19kYXRhX3Bvb2xfbmFtZToKICAgICAgICAgICAgICAgICMg + YW5kIGlmIHByZXNlbnQsIGNoZWNrIHdoZXRoZXIgdGhlcmUgZXhpc3RzIGEgZnMgd2hpY2ggaGFz + IHRoZSBkYXRhX3Bvb2wKICAgICAgICAgICAgICAgIGZvciBlYWNoSiBpbiBqc29uX291dDoKICAg + ICAgICAgICAgICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLmNlcGhmc19kYXRhX3Bvb2xfbmFt + ZSBpbiBlYWNoSlsiZGF0YV9wb29scyJdOgogICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGlu + Z19qc29uX291dCA9IGVhY2hKCiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrCiAgICAgICAg + ICAgICAgICAjIGlmIHRoZXJlIGlzIG5vIG1hdGNoaW5nIGZzIGV4aXN0cywgdGhhdCBtZWFucyBw + cm92aWRlZCBkYXRhX3Bvb2wgbmFtZSBpcyBpbnZhbGlkCiAgICAgICAgICAgICAgICBpZiBub3Qg + bWF0Y2hpbmdfanNvbl9vdXQ6CiAgICAgICAgICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFp + bHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICAgICAgZiJQcm92aWRlZCBkYXRhX3Bv + b2wgbmFtZSwge3NlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2RhdGFfcG9vbF9uYW1lfSwiCiAgICAg + ICAgICAgICAgICAgICAgICAgICIgZG9lcyBub3QgZXhpc3RzIgogICAgICAgICAgICAgICAgICAg + ICkKICAgICAgICAgICAgIyBjLiBpZiBub3RoaW5nIGlzIHNldCBhbmQgY291bGRuJ3QgZmluZCBh + IGRlZmF1bHQsCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAjIGp1c3QgcmV0dXJu + IHNpbGVudGx5CiAgICAgICAgICAgICAgICByZXR1cm4KCiAgICAgICAgaWYgbWF0Y2hpbmdfanNv + bl9vdXQ6CiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2ZpbGVzeXN0ZW1fbmFt + ZSA9IHN0cihtYXRjaGluZ19qc29uX291dFsibmFtZSJdKQogICAgICAgICAgICBzZWxmLl9hcmdf + cGFyc2VyLmNlcGhmc19tZXRhZGF0YV9wb29sX25hbWUgPSBzdHIoCiAgICAgICAgICAgICAgICBt + YXRjaGluZ19qc29uX291dFsibWV0YWRhdGFfcG9vbCJdCiAgICAgICAgICAgICkKCiAgICAgICAg + aWYgaXNpbnN0YW5jZShtYXRjaGluZ19qc29uX291dFsiZGF0YV9wb29scyJdLCBsaXN0KToKICAg + ICAgICAgICAgIyBpZiB0aGUgdXNlciBoYXMgYWxyZWFkeSBwcm92aWRlZCBkYXRhLXBvb2wtbmFt + ZSwKICAgICAgICAgICAgIyB0aHJvdWdoIC0tY2VwaGZzLWRhdGEtcG9vbC1uYW1lCiAgICAgICAg + ICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZzX2RhdGFfcG9vbF9uYW1lOgogICAgICAgICAg + ICAgICAgIyBpZiB0aGUgcHJvdmlkZWQgbmFtZSBpcyBub3QgbWF0Y2hpbmcgd2l0aCB0aGUgb25l + IGluIHRoZSBsaXN0CiAgICAgICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICAgICAgc2Vs + Zi5fYXJnX3BhcnNlci5jZXBoZnNfZGF0YV9wb29sX25hbWUKICAgICAgICAgICAgICAgICAgICBu + b3QgaW4gbWF0Y2hpbmdfanNvbl9vdXRbImRhdGFfcG9vbHMiXQogICAgICAgICAgICAgICAgKToK + ICAgICAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAg + ICAgICAgICAgICAgICAgICAgICBmIlByb3ZpZGVkIGRhdGEtcG9vbC1uYW1lOiAne3NlbGYuX2Fy + Z19wYXJzZXIuY2VwaGZzX2RhdGFfcG9vbF9uYW1lfScsICIKICAgICAgICAgICAgICAgICAgICAg + ICAgImRvZXNuJ3QgbWF0Y2ggZnJvbSB0aGUgZGF0YS1wb29scyBsaXN0OiAiCiAgICAgICAgICAg + ICAgICAgICAgICAgIGYie1tzdHIoeCkgZm9yIHggaW4gbWF0Y2hpbmdfanNvbl9vdXRbJ2RhdGFf + cG9vbHMnXV19IgogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgIyBpZiBkYXRhX3Bv + b2wgbmFtZSBpcyBub3QgcHJvdmlkZWQsCiAgICAgICAgICAgICMgdGhlbiB0cnkgdG8gZmluZCBh + IGRlZmF1bHQgZGF0YSBwb29sIG5hbWUKICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAg + ICMgaWYgbm8gZGF0YV9wb29scyBleGlzdCwgc2lsZW50bHkgcmV0dXJuCiAgICAgICAgICAgICAg + ICBpZiBsZW4obWF0Y2hpbmdfanNvbl9vdXRbImRhdGFfcG9vbHMiXSkgPT0gMDoKICAgICAgICAg + ICAgICAgICAgICByZXR1cm4KICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIuY2VwaGZz + X2RhdGFfcG9vbF9uYW1lID0gc3RyKAogICAgICAgICAgICAgICAgICAgIG1hdGNoaW5nX2pzb25f + b3V0WyJkYXRhX3Bvb2xzIl1bMF0KICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgIyBpZiB0 + aGVyZSBhcmUgbW9yZSB0aGFuIG9uZSAnZGF0YV9wb29scycgZXhpc3QsCiAgICAgICAgICAgICMg + dGhlbiB3YXJuIHRoZSB1c2VyIHRoYXQgd2UgYXJlIHVzaW5nIHRoZSBzZWxlY3RlZCBuYW1lCiAg + ICAgICAgICAgIGlmIGxlbihtYXRjaGluZ19qc29uX291dFsiZGF0YV9wb29scyJdKSA+IDE6CiAg + ICAgICAgICAgICAgICBwcmludCgKICAgICAgICAgICAgICAgICAgICAiV0FSTklORzogTXVsdGlw + bGUgZGF0YSBwb29scyBkZXRlY3RlZDogIgogICAgICAgICAgICAgICAgICAgIGYie1tzdHIoeCkg + Zm9yIHggaW4gbWF0Y2hpbmdfanNvbl9vdXRbJ2RhdGFfcG9vbHMnXV19XG4iCiAgICAgICAgICAg + ICAgICAgICAgZiJVc2luZyB0aGUgZGF0YS1wb29sOiAne3NlbGYuX2FyZ19wYXJzZXIuY2VwaGZz + X2RhdGFfcG9vbF9uYW1lfSdcbiIKICAgICAgICAgICAgICAgICkKCiAgICBkZWYgY3JlYXRlX2No + ZWNrZXJLZXkoc2VsZiwgdXNlcik6CiAgICAgICAgY2FwcywgZW50aXR5ID0gc2VsZi5nZXRfY2Fw + c19hbmRfZW50aXR5KHVzZXIpCiAgICAgICAgY21kX2pzb24gPSB7CiAgICAgICAgICAgICJwcmVm + aXgiOiAiYXV0aCBnZXQtb3ItY3JlYXRlIiwKICAgICAgICAgICAgImVudGl0eSI6IGVudGl0eSwK + ICAgICAgICAgICAgImNhcHMiOiBbY2FwIGZvciBjYXBfbGlzdCBpbiBsaXN0KGNhcHMuaXRlbXMo + KSkgZm9yIGNhcCBpbiBjYXBfbGlzdF0sCiAgICAgICAgICAgICJmb3JtYXQiOiAianNvbiIsCiAg + ICAgICAgfQoKICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLmRyeV9ydW46CiAgICAgICAgICAg + IHJldHVybiBzZWxmLmRyeV9ydW4oCiAgICAgICAgICAgICAgICAiY2VwaCAiCiAgICAgICAgICAg + ICAgICArIGNtZF9qc29uWyJwcmVmaXgiXQogICAgICAgICAgICAgICAgKyAiICIKICAgICAgICAg + ICAgICAgICsgY21kX2pzb25bImVudGl0eSJdCiAgICAgICAgICAgICAgICArICIgIgogICAgICAg + ICAgICAgICAgKyAiICIuam9pbihjbWRfanNvblsiY2FwcyJdKQogICAgICAgICAgICApCiAgICAg + ICAgIyBjaGVjayBpZiB1c2VyIGFscmVhZHkgZXhpc3QKICAgICAgICB1c2VyX2tleSA9IHNlbGYu + Y2hlY2tfdXNlcl9leGlzdChlbnRpdHkpCiAgICAgICAgaWYgdXNlcl9rZXkgIT0gIiI6CiAgICAg + ICAgICAgIHJldHVybiB1c2VyX2tleQoKICAgICAgICByZXRfdmFsLCBqc29uX291dCwgZXJyX21z + ZyA9IHNlbGYuX2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pzb24pCiAgICAgICAgIyBpZiB0aGVy + ZSBpcyBhbiB1bnN1Y2Nlc3NmdWwgYXR0ZW1wdCwKICAgICAgICBpZiByZXRfdmFsICE9IDAgb3Ig + bGVuKGpzb25fb3V0KSA9PSAwOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhj + ZXB0aW9uKAogICAgICAgICAgICAgICAgZiInYXV0aCBnZXQtb3ItY3JlYXRlIHtzZWxmLnJ1bl9h + c191c2VyfScgY29tbWFuZCBmYWlsZWRcbiIKICAgICAgICAgICAgICAgIGYiRXJyb3I6IHtlcnJf + bXNnIGlmIHJldF92YWwgIT0gMCBlbHNlIHNlbGYuRU1QVFlfT1VUUFVUX0xJU1R9IgogICAgICAg + ICAgICApCiAgICAgICAgcmV0dXJuIHN0cihqc29uX291dFswXVsia2V5Il0pCgogICAgZGVmIGdl + dF9jZXBoX2Rhc2hib2FyZF9saW5rKHNlbGYpOgogICAgICAgIGNtZF9qc29uID0geyJwcmVmaXgi + OiAibWdyIHNlcnZpY2VzIiwgImZvcm1hdCI6ICJqc29uIn0KICAgICAgICBpZiBzZWxmLl9hcmdf + cGFyc2VyLmRyeV9ydW46CiAgICAgICAgICAgIHJldHVybiBzZWxmLmRyeV9ydW4oImNlcGggIiAr + IGNtZF9qc29uWyJwcmVmaXgiXSkKICAgICAgICByZXRfdmFsLCBqc29uX291dCwgXyA9IHNlbGYu + X2NvbW1vbl9jbWRfanNvbl9nZW4oY21kX2pzb24pCiAgICAgICAgIyBpZiB0aGVyZSBpcyBhbiB1 + bnN1Y2Nlc3NmdWwgYXR0ZW1wdCwKICAgICAgICBpZiByZXRfdmFsICE9IDAgb3IgbGVuKGpzb25f + b3V0KSA9PSAwOgogICAgICAgICAgICByZXR1cm4gTm9uZQogICAgICAgIGlmICJkYXNoYm9hcmQi + IG5vdCBpbiBqc29uX291dDoKICAgICAgICAgICAgcmV0dXJuIE5vbmUKICAgICAgICByZXR1cm4g + anNvbl9vdXRbImRhc2hib2FyZCJdCgogICAgZGVmIGNyZWF0ZV9yZ3dfYWRtaW5fb3BzX3VzZXIo + c2VsZik6CiAgICAgICAgY21kID0gWwogICAgICAgICAgICAicmFkb3Nndy1hZG1pbiIsCiAgICAg + ICAgICAgICJ1c2VyIiwKICAgICAgICAgICAgImNyZWF0ZSIsCiAgICAgICAgICAgICItLXVpZCIs + CiAgICAgICAgICAgIHNlbGYuRVhURVJOQUxfUkdXX0FETUlOX09QU19VU0VSX05BTUUsCiAgICAg + ICAgICAgICItLWRpc3BsYXktbmFtZSIsCiAgICAgICAgICAgICJSb29rIFJHVyBBZG1pbiBPcHMg + dXNlciIsCiAgICAgICAgICAgICItLWNhcHMiLAogICAgICAgICAgICAiYnVja2V0cz0qO3VzZXJz + PSo7dXNhZ2U9cmVhZDttZXRhZGF0YT1yZWFkO3pvbmU9cmVhZCIsCiAgICAgICAgICAgICItLXJn + dy1yZWFsbSIsCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3JlYWxtX25hbWUsCiAg + ICAgICAgICAgICItLXJndy16b25lZ3JvdXAiLAogICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2Vy + LnJnd196b25lZ3JvdXBfbmFtZSwKICAgICAgICAgICAgIi0tcmd3LXpvbmUiLAogICAgICAgICAg + ICBzZWxmLl9hcmdfcGFyc2VyLnJnd196b25lX25hbWUsCiAgICAgICAgXQogICAgICAgIGlmIHNl + bGYuX2FyZ19wYXJzZXIuZHJ5X3J1bjoKICAgICAgICAgICAgcmV0dXJuIHNlbGYuZHJ5X3J1bigi + Y2VwaCAiICsgIiAiLmpvaW4oY21kKSkKICAgICAgICB0cnk6CiAgICAgICAgICAgIG91dHB1dCA9 + IHN1YnByb2Nlc3MuY2hlY2tfb3V0cHV0KGNtZCwgc3RkZXJyPXN1YnByb2Nlc3MuUElQRSkKICAg + ICAgICBleGNlcHQgc3VicHJvY2Vzcy5DYWxsZWRQcm9jZXNzRXJyb3IgYXMgZXhlY0VycjoKICAg + ICAgICAgICAgIyBpZiB0aGUgdXNlciBhbHJlYWR5IGV4aXN0cywgd2UganVzdCBxdWVyeSBpdAog + ICAgICAgICAgICBpZiBleGVjRXJyLnJldHVybmNvZGUgPT0gZXJybm8uRUVYSVNUOgogICAgICAg + ICAgICAgICAgY21kID0gWwogICAgICAgICAgICAgICAgICAgICJyYWRvc2d3LWFkbWluIiwKICAg + ICAgICAgICAgICAgICAgICAidXNlciIsCiAgICAgICAgICAgICAgICAgICAgImluZm8iLAogICAg + ICAgICAgICAgICAgICAgICItLXVpZCIsCiAgICAgICAgICAgICAgICAgICAgc2VsZi5FWFRFUk5B + TF9SR1dfQURNSU5fT1BTX1VTRVJfTkFNRSwKICAgICAgICAgICAgICAgICAgICAiLS1yZ3ctcmVh + bG0iLAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3JlYWxtX25hbWUs + CiAgICAgICAgICAgICAgICAgICAgIi0tcmd3LXpvbmVncm91cCIsCiAgICAgICAgICAgICAgICAg + ICAgc2VsZi5fYXJnX3BhcnNlci5yZ3dfem9uZWdyb3VwX25hbWUsCiAgICAgICAgICAgICAgICAg + ICAgIi0tcmd3LXpvbmUiLAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3 + X3pvbmVfbmFtZSwKICAgICAgICAgICAgICAgIF0KICAgICAgICAgICAgICAgIHRyeToKICAgICAg + ICAgICAgICAgICAgICBvdXRwdXQgPSBzdWJwcm9jZXNzLmNoZWNrX291dHB1dChjbWQsIHN0ZGVy + cj1zdWJwcm9jZXNzLlBJUEUpCiAgICAgICAgICAgICAgICBleGNlcHQgc3VicHJvY2Vzcy5DYWxs + ZWRQcm9jZXNzRXJyb3IgYXMgZXhlY0VycjoKICAgICAgICAgICAgICAgICAgICBlcnJfbXNnID0g + KAogICAgICAgICAgICAgICAgICAgICAgICBmImZhaWxlZCB0byBleGVjdXRlIGNvbW1hbmQge2Nt + ZH0uIE91dHB1dDoge2V4ZWNFcnIub3V0cHV0fS4gIgogICAgICAgICAgICAgICAgICAgICAgICBm + IkNvZGU6IHtleGVjRXJyLnJldHVybmNvZGV9LiBFcnJvcjoge2V4ZWNFcnIuc3RkZXJyfSIKICAg + ICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZShl + cnJfbXNnKQogICAgICAgICAgICAgICAgICAgIHJldHVybiBOb25lLCBOb25lLCBGYWxzZSwgIi0x + IgogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgZXJyX21zZyA9ICgKICAgICAgICAg + ICAgICAgICAgICBmImZhaWxlZCB0byBleGVjdXRlIGNvbW1hbmQge2NtZH0uIE91dHB1dDoge2V4 + ZWNFcnIub3V0cHV0fS4gIgogICAgICAgICAgICAgICAgICAgIGYiQ29kZToge2V4ZWNFcnIucmV0 + dXJuY29kZX0uIEVycm9yOiB7ZXhlY0Vyci5zdGRlcnJ9IgogICAgICAgICAgICAgICAgKQogICAg + ICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZShlcnJfbXNnKQogICAgICAgICAgICAgICAgcmV0 + dXJuIE5vbmUsIE5vbmUsIEZhbHNlLCAiLTEiCgogICAgICAgICMgc2VwYXJhdGVseSBhZGQgaW5m + bz1yZWFkIGNhcHMgZm9yIHJndy1lbmRwb2ludCBpcCB2YWxpZGF0aW9uCiAgICAgICAgaW5mb19j + YXBfc3VwcG9ydGVkID0gVHJ1ZQogICAgICAgIGNtZCA9IFsKICAgICAgICAgICAgInJhZG9zZ3ct + YWRtaW4iLAogICAgICAgICAgICAiY2FwcyIsCiAgICAgICAgICAgICJhZGQiLAogICAgICAgICAg + ICAiLS11aWQiLAogICAgICAgICAgICBzZWxmLkVYVEVSTkFMX1JHV19BRE1JTl9PUFNfVVNFUl9O + QU1FLAogICAgICAgICAgICAiLS1jYXBzIiwKICAgICAgICAgICAgImluZm89cmVhZCIsCiAgICAg + ICAgICAgICItLXJndy1yZWFsbSIsCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3Jl + YWxtX25hbWUsCiAgICAgICAgICAgICItLXJndy16b25lZ3JvdXAiLAogICAgICAgICAgICBzZWxm + Ll9hcmdfcGFyc2VyLnJnd196b25lZ3JvdXBfbmFtZSwKICAgICAgICAgICAgIi0tcmd3LXpvbmUi + LAogICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnJnd196b25lX25hbWUsCiAgICAgICAgXQog + ICAgICAgIHRyeToKICAgICAgICAgICAgb3V0cHV0ID0gc3VicHJvY2Vzcy5jaGVja19vdXRwdXQo + Y21kLCBzdGRlcnI9c3VicHJvY2Vzcy5QSVBFKQogICAgICAgIGV4Y2VwdCBzdWJwcm9jZXNzLkNh + bGxlZFByb2Nlc3NFcnJvciBhcyBleGVjRXJyOgogICAgICAgICAgICAjIGlmIHRoZSBjZXBoIHZl + cnNpb24gbm90IHN1cHBvcnRlZCBmb3IgYWRkaW5nIGBpbmZvPXJlYWRgIGNhcChyZ3dfdmFsaWRh + dGlvbikKICAgICAgICAgICAgaWYgKAogICAgICAgICAgICAgICAgImNvdWxkIG5vdCBhZGQgY2Fw + czogdW5hYmxlIHRvIGFkZCBjYXBzOiBpbmZvPXJlYWRcbiIKICAgICAgICAgICAgICAgIGluIGV4 + ZWNFcnIuc3RkZXJyLmRlY29kZSgidXRmLTgiKQogICAgICAgICAgICAgICAgYW5kIGV4ZWNFcnIu + cmV0dXJuY29kZSA9PSAyNDQKICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgIGluZm9fY2Fw + X3N1cHBvcnRlZCA9IEZhbHNlCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBlcnJf + bXNnID0gKAogICAgICAgICAgICAgICAgICAgIGYiZmFpbGVkIHRvIGV4ZWN1dGUgY29tbWFuZCB7 + Y21kfS4gT3V0cHV0OiB7ZXhlY0Vyci5vdXRwdXR9LiAiCiAgICAgICAgICAgICAgICAgICAgZiJD + b2RlOiB7ZXhlY0Vyci5yZXR1cm5jb2RlfS4gRXJyb3I6IHtleGVjRXJyLnN0ZGVycn0iCiAgICAg + ICAgICAgICAgICApCiAgICAgICAgICAgICAgICBzeXMuc3RkZXJyLndyaXRlKGVycl9tc2cpCiAg + ICAgICAgICAgICAgICByZXR1cm4gTm9uZSwgTm9uZSwgRmFsc2UsICItMSIKCiAgICAgICAganNv + bm91dHB1dCA9IGpzb24ubG9hZHMob3V0cHV0KQogICAgICAgIHJldHVybiAoCiAgICAgICAgICAg + IGpzb25vdXRwdXRbImtleXMiXVswXVsiYWNjZXNzX2tleSJdLAogICAgICAgICAgICBqc29ub3V0 + cHV0WyJrZXlzIl1bMF1bInNlY3JldF9rZXkiXSwKICAgICAgICAgICAgaW5mb19jYXBfc3VwcG9y + dGVkLAogICAgICAgICAgICAiIiwKICAgICAgICApCgogICAgZGVmIHZhbGlkYXRlX3JiZF9wb29s + KHNlbGYsIHBvb2xfbmFtZSk6CiAgICAgICAgaWYgbm90IHNlbGYuY2x1c3Rlci5wb29sX2V4aXN0 + cyhwb29sX25hbWUpOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9u + KAogICAgICAgICAgICAgICAgZiJUaGUgcHJvdmlkZWQgcG9vbCwgJ3twb29sX25hbWV9JywgZG9l + cyBub3QgZXhpc3QiCiAgICAgICAgICAgICkKCiAgICBkZWYgaW5pdF9yYmRfcG9vbChzZWxmLCBy + YmRfcG9vbF9uYW1lKToKICAgICAgICBpZiBpc2luc3RhbmNlKHNlbGYuY2x1c3RlciwgRHVtbXlS + YWRvcyk6CiAgICAgICAgICAgIHJldHVybgogICAgICAgIGlvY3R4ID0gc2VsZi5jbHVzdGVyLm9w + ZW5faW9jdHgocmJkX3Bvb2xfbmFtZSkKICAgICAgICByYmRfaW5zdCA9IHJiZC5SQkQoKQogICAg + ICAgIHJiZF9pbnN0LnBvb2xfaW5pdChpb2N0eCwgVHJ1ZSkKCiAgICBkZWYgdmFsaWRhdGVfcmFk + b3NfbmFtZXNwYWNlKHNlbGYpOgogICAgICAgIHJiZF9wb29sX25hbWUgPSBzZWxmLl9hcmdfcGFy + c2VyLnJiZF9kYXRhX3Bvb2xfbmFtZQogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIucmJkX21l + dGFkYXRhX2VjX3Bvb2xfbmFtZToKICAgICAgICAgICAgcmJkX3Bvb2xfbmFtZSA9IHNlbGYuX2Fy + Z19wYXJzZXIucmJkX21ldGFkYXRhX2VjX3Bvb2xfbmFtZQogICAgICAgIHJhZG9zX25hbWVzcGFj + ZSA9IHNlbGYuX2FyZ19wYXJzZXIucmFkb3NfbmFtZXNwYWNlCiAgICAgICAgaWYgcmFkb3NfbmFt + ZXNwYWNlID09ICIiOgogICAgICAgICAgICByZXR1cm4KICAgICAgICBpZiByYWRvc19uYW1lc3Bh + Y2UuaXNsb3dlcigpID09IEZhbHNlOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJl + RXhjZXB0aW9uKAogICAgICAgICAgICAgICAgZiJUaGUgcHJvdmlkZWQgcmFkb3MgTmFtZXNwYWNl + LCAne3JhZG9zX25hbWVzcGFjZX0nLCAiCiAgICAgICAgICAgICAgICBmImNvbnRhaW5zIHVwcGVy + IGNhc2UiCiAgICAgICAgICAgICkKICAgICAgICByYmRfaW5zdCA9IHJiZC5SQkQoKQogICAgICAg + IGlvY3R4ID0gc2VsZi5jbHVzdGVyLm9wZW5faW9jdHgocmJkX3Bvb2xfbmFtZSkKICAgICAgICBp + ZiByYmRfaW5zdC5uYW1lc3BhY2VfZXhpc3RzKGlvY3R4LCByYWRvc19uYW1lc3BhY2UpIGlzIEZh + bHNlOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAg + ICAgICAgICAgZiJUaGUgcHJvdmlkZWQgcmFkb3MgTmFtZXNwYWNlLCAne3JhZG9zX25hbWVzcGFj + ZX0nLCAiCiAgICAgICAgICAgICAgICBmImlzIG5vdCBmb3VuZCBpbiB0aGUgcG9vbCAne3JiZF9w + b29sX25hbWV9JyIKICAgICAgICAgICAgKQoKICAgIGRlZiBnZXRfb3JfY3JlYXRlX3N1YnZvbHVt + ZV9ncm91cChzZWxmLCBzdWJ2b2x1bWVfZ3JvdXAsIGNlcGhmc19maWxlc3lzdGVtX25hbWUpOgog + ICAgICAgIGNtZCA9IFsKICAgICAgICAgICAgImNlcGgiLAogICAgICAgICAgICAiZnMiLAogICAg + ICAgICAgICAic3Vidm9sdW1lZ3JvdXAiLAogICAgICAgICAgICAiZ2V0cGF0aCIsCiAgICAgICAg + ICAgIGNlcGhmc19maWxlc3lzdGVtX25hbWUsCiAgICAgICAgICAgIHN1YnZvbHVtZV9ncm91cCwK + ICAgICAgICBdCiAgICAgICAgdHJ5OgogICAgICAgICAgICBfID0gc3VicHJvY2Vzcy5jaGVja19v + dXRwdXQoY21kLCBzdGRlcnI9c3VicHJvY2Vzcy5QSVBFKQogICAgICAgIGV4Y2VwdCBzdWJwcm9j + ZXNzLkNhbGxlZFByb2Nlc3NFcnJvcjoKICAgICAgICAgICAgY21kID0gWwogICAgICAgICAgICAg + ICAgImNlcGgiLAogICAgICAgICAgICAgICAgImZzIiwKICAgICAgICAgICAgICAgICJzdWJ2b2x1 + bWVncm91cCIsCiAgICAgICAgICAgICAgICAiY3JlYXRlIiwKICAgICAgICAgICAgICAgIGNlcGhm + c19maWxlc3lzdGVtX25hbWUsCiAgICAgICAgICAgICAgICBzdWJ2b2x1bWVfZ3JvdXAsCiAgICAg + ICAgICAgIF0KICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgXyA9IHN1YnByb2Nlc3Mu + Y2hlY2tfb3V0cHV0KGNtZCwgc3RkZXJyPXN1YnByb2Nlc3MuUElQRSkKICAgICAgICAgICAgZXhj + ZXB0IHN1YnByb2Nlc3MuQ2FsbGVkUHJvY2Vzc0Vycm9yOgogICAgICAgICAgICAgICAgcmFpc2Ug + RXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAgICBmInN1YnZvbHVt + ZSBncm91cCB7c3Vidm9sdW1lX2dyb3VwfSBpcyBub3QgYWJsZSB0byBnZXQgY3JlYXRlZCIKICAg + ICAgICAgICAgICAgICkKCiAgICBkZWYgcGluX3N1YnZvbHVtZSgKICAgICAgICBzZWxmLCBzdWJ2 + b2x1bWVfZ3JvdXAsIGNlcGhmc19maWxlc3lzdGVtX25hbWUsIHBpbl90eXBlLCBwaW5fc2V0dGlu + ZwogICAgKToKICAgICAgICBjbWQgPSBbCiAgICAgICAgICAgICJjZXBoIiwKICAgICAgICAgICAg + ImZzIiwKICAgICAgICAgICAgInN1YnZvbHVtZWdyb3VwIiwKICAgICAgICAgICAgInBpbiIsCiAg + ICAgICAgICAgIGNlcGhmc19maWxlc3lzdGVtX25hbWUsCiAgICAgICAgICAgIHN1YnZvbHVtZV9n + cm91cCwKICAgICAgICAgICAgcGluX3R5cGUsCiAgICAgICAgICAgIHBpbl9zZXR0aW5nLAogICAg + ICAgIF0KICAgICAgICB0cnk6CiAgICAgICAgICAgIF8gPSBzdWJwcm9jZXNzLmNoZWNrX291dHB1 + dChjbWQsIHN0ZGVycj1zdWJwcm9jZXNzLlBJUEUpCiAgICAgICAgZXhjZXB0IHN1YnByb2Nlc3Mu + Q2FsbGVkUHJvY2Vzc0Vycm9yOgogICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhj + ZXB0aW9uKAogICAgICAgICAgICAgICAgZiJzdWJ2b2x1bWUgZ3JvdXAge3N1YnZvbHVtZV9ncm91 + cH0gaXMgbm90IGFibGUgdG8gZ2V0IHBpbm5lZCIKICAgICAgICAgICAgKQoKICAgIGRlZiBnZXRf + cmd3X2ZzaWQoc2VsZiwgYmFzZV91cmwsIHZlcmlmeSk6CiAgICAgICAgYWNjZXNzX2tleSA9IHNl + bGYub3V0X21hcFsiUkdXX0FETUlOX09QU19VU0VSX0FDQ0VTU19LRVkiXQogICAgICAgIHNlY3Jl + dF9rZXkgPSBzZWxmLm91dF9tYXBbIlJHV19BRE1JTl9PUFNfVVNFUl9TRUNSRVRfS0VZIl0KICAg + ICAgICByZ3dfZW5kcG9pbnQgPSBzZWxmLl9hcmdfcGFyc2VyLnJnd19lbmRwb2ludAogICAgICAg + IGJhc2VfdXJsID0gYmFzZV91cmwgKyAiOi8vIiArIHJnd19lbmRwb2ludCArICIvYWRtaW4vaW5m + bz8iCiAgICAgICAgcGFyYW1zID0geyJmb3JtYXQiOiAianNvbiJ9CiAgICAgICAgcmVxdWVzdF91 + cmwgPSBiYXNlX3VybCArIHVybGVuY29kZShwYXJhbXMpCgogICAgICAgIHRyeToKICAgICAgICAg + ICAgciA9IHJlcXVlc3RzLmdldCgKICAgICAgICAgICAgICAgIHJlcXVlc3RfdXJsLAogICAgICAg + ICAgICAgICAgYXV0aD1TM0F1dGgoYWNjZXNzX2tleSwgc2VjcmV0X2tleSwgcmd3X2VuZHBvaW50 + KSwKICAgICAgICAgICAgICAgIHZlcmlmeT12ZXJpZnksCiAgICAgICAgICAgICkKICAgICAgICBl + eGNlcHQgcmVxdWVzdHMuZXhjZXB0aW9ucy5UaW1lb3V0OgogICAgICAgICAgICBzeXMuc3RkZXJy + LndyaXRlKAogICAgICAgICAgICAgICAgZiJpbnZhbGlkIGVuZHBvaW50Oiwgbm90IGFibGUgdG8g + Y2FsbCBhZG1pbi1vcHMgYXBpe3Jnd19lbmRwb2ludH0iCiAgICAgICAgICAgICkKICAgICAgICAg + ICAgcmV0dXJuICIiLCAiLTEiCiAgICAgICAgcjEgPSByLmpzb24oKQogICAgICAgIGlmIHIxIGlz + IE5vbmUgb3IgcjEuZ2V0KCJpbmZvIikgaXMgTm9uZToKICAgICAgICAgICAgc3lzLnN0ZGVyci53 + cml0ZSgKICAgICAgICAgICAgICAgIGYiVGhlIHByb3ZpZGVkIHJndyBFbmRwb2ludCwgJ3tzZWxm + Ll9hcmdfcGFyc2VyLnJnd19lbmRwb2ludH0nLCBpcyBpbnZhbGlkLiIKICAgICAgICAgICAgKQog + ICAgICAgICAgICByZXR1cm4gKAogICAgICAgICAgICAgICAgIiIsCiAgICAgICAgICAgICAgICAi + LTEiLAogICAgICAgICAgICApCgogICAgICAgIHJldHVybiByMVsiaW5mbyJdWyJzdG9yYWdlX2Jh + Y2tlbmRzIl1bMF1bImNsdXN0ZXJfaWQiXSwgIiIKCiAgICBkZWYgdmFsaWRhdGVfcmd3X2VuZHBv + aW50KHNlbGYsIGluZm9fY2FwX3N1cHBvcnRlZCk6CiAgICAgICAgIyBpZiB0aGUgJ2NsdXN0ZXIn + IGluc3RhbmNlIGlzIGEgZHVtbXkgb25lLAogICAgICAgICMgZG9uJ3QgdHJ5IHRvIHJlYWNoIG91 + dCB0byB0aGUgZW5kcG9pbnQKICAgICAgICBpZiBpc2luc3RhbmNlKHNlbGYuY2x1c3RlciwgRHVt + bXlSYWRvcyk6CiAgICAgICAgICAgIHJldHVybgoKICAgICAgICByZ3dfZW5kcG9pbnQgPSBzZWxm + Ll9hcmdfcGFyc2VyLnJnd19lbmRwb2ludAoKICAgICAgICAjIHZhbGlkYXRlIHJndyBlbmRwb2lu + dCBvbmx5IGlmIGlwIGFkZHJlc3MgaXMgcGFzc2VkCiAgICAgICAgaXBfdHlwZSA9IHNlbGYuX2lu + dmFsaWRfZW5kcG9pbnQocmd3X2VuZHBvaW50KQoKICAgICAgICAjIGNoZWNrIGlmIHRoZSByZ3cg + ZW5kcG9pbnQgaXMgcmVhY2hhYmxlCiAgICAgICAgY2VydCA9IE5vbmUKICAgICAgICBpZiBub3Qg + c2VsZi5fYXJnX3BhcnNlci5yZ3dfc2tpcF90bHMgYW5kIHNlbGYudmFsaWRhdGVfcmd3X2VuZHBv + aW50X3Rsc19jZXJ0KCk6CiAgICAgICAgICAgIGNlcnQgPSBzZWxmLl9hcmdfcGFyc2VyLnJnd190 + bHNfY2VydF9wYXRoCiAgICAgICAgYmFzZV91cmwsIHZlcmlmeSwgZXJyID0gc2VsZi5lbmRwb2lu + dF9kaWFsKHJnd19lbmRwb2ludCwgaXBfdHlwZSwgY2VydD1jZXJ0KQogICAgICAgIGlmIGVyciAh + PSAiIjoKICAgICAgICAgICAgcmV0dXJuICItMSIKCiAgICAgICAgIyBjaGVjayBpZiB0aGUgcmd3 + IGVuZHBvaW50IGJlbG9uZ3MgdG8gdGhlIHNhbWUgY2x1c3RlcgogICAgICAgICMgb25seSBjaGVj + ayBpZiBgaW5mb2AgY2FwIGlzIHN1cHBvcnRlZAogICAgICAgIGlmIGluZm9fY2FwX3N1cHBvcnRl + ZDoKICAgICAgICAgICAgZnNpZCA9IHNlbGYuZ2V0X2ZzaWQoKQogICAgICAgICAgICByZ3dfZnNp + ZCwgZXJyID0gc2VsZi5nZXRfcmd3X2ZzaWQoYmFzZV91cmwsIHZlcmlmeSkKICAgICAgICAgICAg + aWYgZXJyID09ICItMSI6CiAgICAgICAgICAgICAgICByZXR1cm4gIi0xIgogICAgICAgICAgICBp + ZiBmc2lkICE9IHJnd19mc2lkOgogICAgICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZSgKICAg + ICAgICAgICAgICA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3Bvb2xfdG9fdmFsaWRhdGUgaW4gcmd3X3Bvb2xzX3RvX3Zh + bGlkYXRlOgogICAgICAgICAgICAgICAgaWYgbm90IHNlbGYuY2x1c3Rlci5wb29sX2V4aXN0cyhf + cmd3X3Bvb2xfdG9fdmFsaWRhdGUpOgogICAgICAgICAgICAgICAgICAgIHN5cy5zdGRlcnIud3Jp + dGUoCiAgICAgICAgICAgICAgICAgICAgICAgIGYiVGhlIHByb3ZpZGVkIHBvb2wsICd7X3Jnd19w + b29sX3RvX3ZhbGlkYXRlfScsIGRvZXMgbm90IGV4aXN0IgogICAgICAgICAgICAgICAgICAgICkK + ICAgICAgICAgICAgICAgICAgICByZXR1cm4gIi0xIgoKICAgICAgICByZXR1cm4gIiIKCiAgICBk + ZWYgdmFsaWRhdGVfcmd3X211bHRpc2l0ZShzZWxmLCByZ3dfbXVsdGlzaXRlX2NvbmZpZ19uYW1l + LCByZ3dfbXVsdGlzaXRlX2NvbmZpZyk6CiAgICAgICAgaWYgcmd3X211bHRpc2l0ZV9jb25maWcg + IT0gIiI6CiAgICAgICAgICAgIGNtZCA9IFsKICAgICAgICAgICAgICAgICJyYWRvc2d3LWFkbWlu + IiwKICAgICAgICAgICAgICAgIHJnd19tdWx0aXNpdGVfY29uZmlnLAogICAgICAgICAgICAgICAg + ImdldCIsCiAgICAgICAgICAgICAgICAiLS1yZ3ctIiArIHJnd19tdWx0aXNpdGVfY29uZmlnLAog + ICAgICAgICAgICAgICAgcmd3X211bHRpc2l0ZV9jb25maWdfbmFtZSwKICAgICAgICAgICAgXQog + ICAgICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICBfID0gc3VicHJvY2Vzcy5jaGVja19vdXRw + dXQoY21kLCBzdGRlcnI9c3VicHJvY2Vzcy5QSVBFKQogICAgICAgICAgICBleGNlcHQgc3VicHJv + Y2Vzcy5DYWxsZWRQcm9jZXNzRXJyb3IgYXMgZXhlY0VycjoKICAgICAgICAgICAgICAgIGVycl9t + c2cgPSAoCiAgICAgICAgICAgICAgICAgICAgZiJmYWlsZWQgdG8gZXhlY3V0ZSBjb21tYW5kIHtj + bWR9LiBPdXRwdXQ6IHtleGVjRXJyLm91dHB1dH0uICIKICAgICAgICAgICAgICAgICAgICBmIkNv + ZGU6IHtleGVjRXJyLnJldHVybmNvZGV9LiBFcnJvcjoge2V4ZWNFcnIuc3RkZXJyfSIKICAgICAg + ICAgICAgICAgICkKICAgICAgICAgICAgICAgIHN5cy5zdGRlcnIud3JpdGUoZXJyX21zZykKICAg + ICAgICAgICAgICAgIHJldHVybiAiLTEiCiAgICAgICAgcmV0dXJuICIiCgogICAgZGVmIGNvbnZl + cnRfY29tbWFfc2VwYXJhdGVkX3RvX2FycmF5KHNlbGYsIHZhbHVlKToKICAgICAgICByZXR1cm4g + dmFsdWUuc3BsaXQoIiwiKQoKICAgIGRlZiByYWlzZV9leGNlcHRpb25faWZfYW55X3RvcG9sb2d5 + X2ZsYWdfaXNfbWlzc2luZyhzZWxmKToKICAgICAgICBpZiAoCiAgICAgICAgICAgICgKICAgICAg + ICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIudG9wb2xvZ3lfcG9vbHMgIT0gIiIKICAgICAgICAg + ICAgICAgIGFuZCAoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci50b3BvbG9n + eV9mYWlsdXJlX2RvbWFpbl9sYWJlbCA9PSAiIgogICAgICAgICAgICAgICAgICAgIG9yIHNlbGYu + X2FyZ19wYXJzZXIudG9wb2xvZ3lfZmFpbHVyZV9kb21haW5fdmFsdWVzID09ICIiCiAgICAgICAg + ICAgICAgICApCiAgICAgICAgICAgICkKICAgICAgICAgICAgb3IgKAogICAgICAgICAgICAgICAg + c2VsZi5fYXJnX3BhcnNlci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl9sYWJlbCAhPSAiIgogICAg + ICAgICAgICAgICAgYW5kICgKICAgICAgICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnRv + cG9sb2d5X3Bvb2xzID09ICIiCiAgICAgICAgICAgICAgICAgICAgb3Igc2VsZi5fYXJnX3BhcnNl + ci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl92YWx1ZXMgPT0gIiIKICAgICAgICAgICAgICAgICkK + ICAgICAgICAgICAgKQogICAgICAgICAgICBvciAoCiAgICAgICAgICAgICAgICBzZWxmLl9hcmdf + cGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWluX3ZhbHVlcyAhPSAiIgogICAgICAgICAgICAg + ICAgYW5kICgKICAgICAgICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X3Bv + b2xzID09ICIiCiAgICAgICAgICAgICAgICAgICAgb3Igc2VsZi5fYXJnX3BhcnNlci50b3BvbG9n + eV9mYWlsdXJlX2RvbWFpbl9sYWJlbCA9PSAiIgogICAgICAgICAgICAgICAgKQogICAgICAgICAg + ICApCiAgICAgICAgKToKICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlv + bigKICAgICAgICAgICAgICAgICJwcm92aWRlIGFsbCB0aGUgdG9wb2xvZ3kgZmxhZ3MgLS10b3Bv + bG9neS1wb29scywgLS10b3BvbG9neS1mYWlsdXJlLWRvbWFpbi1sYWJlbCwgLS10b3BvbG9neS1m + YWlsdXJlLWRvbWFpbi12YWx1ZXMiCiAgICAgICAgICAgICkKCiAgICBkZWYgdmFsaWRhdGVfdG9w + b2xvZ3lfdmFsdWVzKHNlbGYsIHRvcG9sb2d5X3Bvb2xzLCB0b3BvbG9neV9mZCk6CiAgICAgICAg + aWYgbGVuKHRvcG9sb2d5X3Bvb2xzKSAhPSBsZW4odG9wb2xvZ3lfZmQpOgogICAgICAgICAgICBy + YWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgZiJUaGUgcHJv + dmlkZWQgdG9wb2xvZ3kgcG9vbHMsICd7dG9wb2xvZ3lfcG9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mIHN0cihnZXRhdHRyKHNlbGYu + X2FyZ19wYXJzZXIsIGFyZykpOgogICAgICAgICAgICAgICAgIyBweXRob24gdHJlYXRzIGZsYWct + bmFtZSBhcyBmbGFnX25hbWUgaW50ZXJuYWxseSwgc28gY29udmVydGluZyBiYWNrIHRvIGZsYWct + bmFtZSwKICAgICAgICAgICAgICAgICMgc28gd2UgY2FuIGdldCB0aG9zZSB2YWx1ZXMgZnJvbSBj + b25maWcgZmlsZQogICAgICAgICAgICAgICAgYXJnVmFsdWUgPSBhcmcucmVwbGFjZSgiXyIsICIt + IikKICAgICAgICAgICAgICAgICMgZG8gbm90IGFkZCB0aGUgY29uZmlnLWZpbGUgZmxhZyBhbmQg + YWxzbyBub3QgYWRkIHRoZSBib29sZWFuIGZsYWdzIHdoaWNoIGFyZSBzZXQgdG8gRmFsc2UKICAg + ICAgICAgICAgICAgICMgYmVjYXVzZSBjb25maWcuaW5pIGZpbGUgdHJlYXRzIGJvb2xlYW4gZmxh + Z3MgYXMgVHJ1ZSBhbHdheXMKICAgICAgICAgICAgICAgIGlmICgKICAgICAgICAgICAgICAgICAg + ICBhcmdWYWx1ZSAhPSAiY29uZmlnLWZpbGUiCiAgICAgICAgICAgICAgICAgICAgYW5kIGdldGF0 + dHIoc2VsZi5fYXJnX3BhcnNlciwgYXJnKSAhPSBGYWxzZQogICAgICAgICAgICAgICAgKToKICAg + ICAgICAgICAgICAgICAgICBhcmd1bWVudCArPSBmInthcmdWYWx1ZX0gPSB7c3RyKGdldGF0dHIo + c2VsZi5fYXJnX3BhcnNlciwgYXJnKSl9XG4iCiAgICAgICAgcmV0dXJuIGFyZ3VtZW50CgogICAg + ZGVmIF9nZW5fb3V0cHV0X21hcChzZWxmKToKICAgICAgICBpZiBzZWxmLm91dF9tYXA6CiAgICAg + ICAgICAgIHJldHVybgogICAgICAgICMgc3VwcG9ydCBsZWdhY3kgZmxhZyB3aXRoIHVwZ3JhZGVz + CiAgICAgICAgaWYgc2VsZi5fYXJnX3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Zi5v + dXRfbWFwWyJTVUJWT0xVTUVfR1JPVVAiXToKICAgICAgICAgICAgICAgIHNlbGYuZ2V0X29yX2Ny + ZWF0ZV9zdWJ2b2x1bWVfZ3JvdXAoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNl + ci5zdWJ2b2x1bWVfZ3JvdXAsCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5j + ZXBoZnNfZmlsZXN5c3RlbV9uYW1lLAogICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAg + c2VsZi5waW5fc3Vidm9sdW1lKAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIu + c3Vidm9sdW1lX2dyb3VwLAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIuY2Vw + aGZzX2ZpbGVzeXN0ZW1fbmFtZSwKICAgICAgICAgICAgICAgICAgICAiZGlzdHJpYnV0ZWQiLAog + ICAgICAgICAgICAgICAgICAgICIxIiwKICAgICAgICAgICAgICAgICkKICAgICAgICBzZWxmLm91 + dF9tYXBbIlJHV19UTFNfQ0VSVCJdID0gIiIKICAgICAgICBzZWxmLm91dF9tYXBbIk1PTklUT1JJ + TkdfRU5EUE9JTlQiXSA9ICIiCiAgICAgICAgc2VsZi5vdXRfbWFwWyJNT05JVE9SSU5HX0VORFBP + SU5UX1BPUlQiXSA9ICIiCiAgICAgICAgaWYgbm90IHNlbGYuX2FyZ19wYXJzZXIuc2tpcF9tb25p + dG9yaW5nX2VuZHBvaW50OgogICAgICAgICAgICAoCiAgICAgICAgICAgICAgICBzZWxmLm91dF9t + YXBbIk1PTklUT1JJTkdfRU5EUE9JTlQiXSwKICAgICAgICAgICAgICAgIHNlbGYub3V0X21hcFsi + TU9OSVRPUklOR19FTkRQT0lOVF9QT1JUIl0sCiAgICAgICAgICAgICkgPSBzZWxmLmdldF9hY3Rp + dmVfYW5kX3N0YW5kYnlfbWdycygpCiAgICAgICAgc2VsZi5vdXRfbWFwWyJSQkRfUE9PTF9OQU1F + Il0gPSBzZWxmLl9hcmdfcGFyc2VyLnJiZF9kYXRhX3Bvb2xfbmFtZQogICAgICAgIHNlbGYub3V0 + X21hcFsiUkJEX01FVEFEQVRBX0VDX1BPT0xfTkFNRSJdID0gKAogICAgICAgICAgICBzZWxmLnZh + bGlkYXRlX3JiZF9tZXRhZGF0YV9lY19wb29sX25hbWUoKQogICAgICAgICkKICAgICAgICBzZWxm + Lm91dF9tYXBbIlRPUE9MT0dZX1BPT0xTIl0gPSBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X3Bv + b2xzCiAgICAgICAgc2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9GQUlMVVJFX0RPTUFJTl9MQUJFTCJd + ID0gKAogICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnRvcG9sb2d5X2ZhaWx1cmVfZG9tYWlu + X2xhYmVsCiAgICAgICAgKQogICAgICAgIHNlbGYub3V0X21hcFsiVE9QT0xPR1lfRkFJTFVSRV9E + T01BSU5fVkFMVUVTIl0gPSAoCiAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIudG9wb2xvZ3lf + ZmFpbHVyZV9kb21haW5fdmFsdWVzCiAgICAgICAgKQogICAgICAgIGlmICgKICAgICAgICAgICAg + c2VsZi5fYXJnX3BhcnNlci50b3BvbG9neV9wb29scyAhPSAiIgogICAgICAgICAgICBhbmQgc2Vs + Zi5fYXJnX3BhcnNlci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl9sYWJlbCAhPSAiIgogICAgICAg + ICAgICBhbmQgc2VsZi5fYXJnX3BhcnNlci50b3BvbG9neV9mYWlsdXJlX2RvbWFpbl92YWx1ZXMg + IT0gIiIKICAgICAgICApOgogICAgICAgICAgICBzZWxmLnZhbGlkYXRlX3RvcG9sb2d5X3ZhbHVl + cygKICAgICAgICAgICAgICAgIHNlbGYuY29udmVydF9jb21tYV9zZXBhcmF0ZWRfdG9fYXJyYXko + c2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9QT09MUyJdKSwKICAgICAgICAgICAgICAgIHNlbGYuY29u + dmVydF9jb21tYV9zZXBhcmF0ZWRfdG9fYXJyYXkoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5v + dXRfbWFwWyJUT1BPTE9HWV9GQUlMVVJFX0RPTUFJTl9WQUxVRVMiXQogICAgICAgICAgICAgICAg + KSwKICAgICAgICAgICAgKQogICAgICAgICAgICBzZWxmLnZhbGlkYXRlX3RvcG9sb2d5X3JiZF9w + b29scygKICAgICAgICAgICAgICAgIHNlbGYuY29udmVydF9jb21tYV9zZXBhcmF0ZWRfdG9fYXJy + YXkoc2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9QT09MUyJdKQogICAgICAgICAgICApCiAgICAgICAg + ICAgIHNlbGYuaW5pdF90b3BvbG9neV9yYmRfcG9vbHMoCiAgICAgICAgICAgICAgICBzZWxmLmNv + bnZlcnRfY29tbWFfc2VwYXJhdGVkX3RvX2FycmF5KHNlbGYub3V0X21hcFsiVE9QT0xPR1lfUE9P + TFMiXSkKICAgICAgICAgICAgKQogICAgICAgIGVsc2U6CiAgICAgICAgICAgIHNlbGYucmFpc2Vf + ZXhjZXB0aW9uX2lmX2FueV90b3BvbG9neV9mbGFnX2lzX21pc3NpbmcoKQoKICAgICAgICBzZWxm + Lm91dF9tYXBbIlJHV19QT09MX1BSRUZJWCJdID0gc2VsZi5fYXJnX3BhcnNlci5yZ3dfcG9vbF9w + cmVmaXgKICAgICAgICBzZWxmLm91dF9tYXBbIlJHV19FTkRQT0lOVCJdID0gIiIKICAgICAgICBp + ZiBzZWxmLl9hcmdfcGFyc2VyLnJnd19lbmRwb2ludDoKICAgICAgICAgICAgaWYgc2VsZi5fYXJn + X3BhcnNlci5kcnlfcnVuOgogICAgICAgICAgICAgICAgc2VsZi5jcmVhdGVfcmd3X2FkbWluX29w + c191c2VyKCkKICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgIGlmICgKICAgICAgICAg + ICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnJnd19yZWFsbV9uYW1lICE9ICIiCiAgICAgICAg + ICAgICAgICAgICAgYW5kIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVncm91cF9uYW1lICE9ICIi + CiAgICAgICAgICAgICAgICAgICAgYW5kIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVfbmFtZSAh + PSAiIgogICAgICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgICAgICBlcnIgPSBzZWxmLnZh + bGlkYXRlX3Jnd19tdWx0aXNpdGUoCiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19w + YXJzZXIucmd3X3JlYWxtX25hbWUsICJyZWFsbSIKICAgICAgICAgICAgICAgICAgICApCiAgICAg + ICAgICAgICAgICAgICAgZXJyID0gc2VsZi52YWxpZGF0ZV9yZ3dfbXVsdGlzaXRlKAogICAgICAg + ICAgICAgICAgICAgICAgICBzZWxmLl9hcmdfcGFyc2VyLnJnd196b25lZ3JvdXBfbmFtZSwgInpv + bmVncm91cCIKICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgZXJyID0g + c2VsZi52YWxpZGF0ZV9yZ3dfbXVsdGlzaXRlKAogICAgICAgICAgICAgICAgICAgICAgICBzZWxm + Ll9hcmdfcGFyc2VyLnJnd196b25lX25hbWUsICJ6b25lIgogICAgICAgICAgICAgICAgICAgICkK + CiAgICAgICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNl + ci5yZ3dfcmVhbG1fbmFtZSA9PSAiIgogICAgICAgICAgICAgICAgICAgIGFuZCBzZWxmLl9hcmdf + cGFyc2VyLnJnd196b25lZ3JvdXBfbmFtZSA9PSAiIgogICAgICAgICAgICAgICAgICAgIGFuZCBz + ZWxmLl9hcmdfcGFyc2VyLnJnd196b25lX25hbWUgPT0gIiIKICAgICAgICAgICAgICAgICkgb3Ig KAogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3JlYWxtX25hbWUgIT0g IiIKICAgICAgICAgICAgICAgICAgICBhbmQgc2VsZi5fYXJnX3BhcnNlci5yZ3dfem9uZWdyb3Vw X25hbWUgIT0gIiIKICAgICAgICAgICAgICAgICAgICBhbmQgc2VsZi5fYXJnX3BhcnNlci5yZ3df - em9uZV9uYW1lICE9ICIiCiAgICAgICAgICAgICAgICApOgogICAgICAgICAgICAgICAgICAgIGVy - ciA9IHNlbGYudmFsaWRhdGVfcmd3X211bHRpc2l0ZSgKICAgICAgICAgICAgICAgICAgICAgICAg - c2VsZi5fYXJnX3BhcnNlci5yZ3dfcmVhbG1fbmFtZSwgInJlYWxtIgogICAgICAgICAgICAgICAg - ICAgICkKICAgICAgICAgICAgICAgICAgICBlcnIgPSBzZWxmLnZhbGlkYXRlX3Jnd19tdWx0aXNp - dGUoCiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVncm91 - cF9uYW1lLCAiem9uZWdyb3VwIgogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAg - ICAgICBlcnIgPSBzZWxmLnZhbGlkYXRlX3Jnd19tdWx0aXNpdGUoCiAgICAgICAgICAgICAgICAg - ICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVfbmFtZSwgInpvbmUiCiAgICAgICAgICAg - ICAgICAgICAgKQoKICAgICAgICAgICAgICAgIGlmICgKICAgICAgICAgICAgICAgICAgICBzZWxm - Ll9hcmdfcGFyc2VyLnJnd19yZWFsbV9uYW1lID09ICIiCiAgICAgICAgICAgICAgICAgICAgYW5k - IHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVncm91cF9uYW1lID09ICIiCiAgICAgICAgICAgICAg - ICAgICAgYW5kIHNlbGYuX2FyZ19wYXJzZXIucmd3X3pvbmVfbmFtZSA9PSAiIgogICAgICAgICAg - ICAgICAgKSBvciAoCiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5yZ3dfcmVh - bG1fbmFtZSAhPSAiIgogICAgICAgICAgICAgICAgICAgIGFuZCBzZWxmLl9hcmdfcGFyc2VyLnJn - d196b25lZ3JvdXBfbmFtZSAhPSAiIgogICAgICAgICAgICAgICAgICAgIGFuZCBzZWxmLl9hcmdf - cGFyc2VyLnJnd196b25lX25hbWUgIT0gIiIKICAgICAgICAgICAgICAgICk6CiAgICAgICAgICAg - ICAgICAgICAgKAogICAgICAgICAgICAgICAgICAgICAgICBzZWxmLm91dF9tYXBbIlJHV19BRE1J - Tl9PUFNfVVNFUl9BQ0NFU1NfS0VZIl0sCiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYub3V0 - X21hcFsiUkdXX0FETUlOX09QU19VU0VSX1NFQ1JFVF9LRVkiXSwKICAgICAgICAgICAgICAgICAg - ICAgICAgaW5mb19jYXBfc3VwcG9ydGVkLAogICAgICAgICAgICAgICAgICAgICAgICBlcnIsCiAg - ICAgICAgICAgICAgICAgICAgKSA9IHNlbGYuY3JlYXRlX3Jnd19hZG1pbl9vcHNfdXNlcigpCiAg - ICAgICAgICAgICAgICAgICAgZXJyID0gc2VsZi52YWxpZGF0ZV9yZ3dfZW5kcG9pbnQoaW5mb19j - YXBfc3VwcG9ydGVkKQogICAgICAgICAgICAgICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIucmd3 - X3Rsc19jZXJ0X3BhdGg6CiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYub3V0X21hcFsiUkdX - X1RMU19DRVJUIl0gPSAoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnZhbGlkYXRl - X3Jnd19lbmRwb2ludF90bHNfY2VydCgpCiAgICAgICAgICAgICAgICAgICAgICAgICkKICAgICAg - ICAgICAgICAgICAgICAjIGlmIHRoZXJlIGlzIG5vIGVycm9yLCBzZXQgdGhlIFJHV19FTkRQT0lO - VAogICAgICAgICAgICAgICAgICAgIGlmIGVyciAhPSAiLTEiOgogICAgICAgICAgICAgICAgICAg - ICAgICBzZWxmLm91dF9tYXBbIlJHV19FTkRQT0lOVCJdID0gc2VsZi5fYXJnX3BhcnNlci5yZ3df - ZW5kcG9pbnQKICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAgICAgZXJyID0g - IlBsZWFzZSBwcm92aWRlIGFsbCB0aGUgUkdXIG11bHRpc2l0ZSBwYXJhbWV0ZXJzIG9yIG5vbmUg - b2YgdGhlbSIKICAgICAgICAgICAgICAgICAgICBzeXMuc3RkZXJyLndyaXRlKGVycikKCiAgICBk - ZWYgZ2VuX3NoZWxsX291dChzZWxmKToKICAgICAgICBzZWxmLl9nZW5fb3V0cHV0X21hcCgpCiAg - ICAgICAgc2hPdXRJTyA9IFN0cmluZ0lPKCkKICAgICAgICBmb3IgaywgdiBpbiBzZWxmLm91dF9t - YXAuaXRlbXMoKToKICAgICAgICAgICAgaWYgdiBhbmQgayBub3QgaW4gc2VsZi5fZXhjbHVkZWRf - a2V5czoKICAgICAgICAgICAgICAgIHNoT3V0SU8ud3JpdGUoZiJleHBvcnQge2t9PXt2fXtMSU5F - U0VQfSIpCiAgICAgICAgc2hPdXQgPSBzaE91dElPLmdldHZhbHVlKCkKICAgICAgICBzaE91dElP - LmNsb3NlKCkKICAgICAgICByZXR1cm4gc2hPdXQKCiAgICBkZWYgZ2VuX2pzb25fb3V0KHNlbGYp - OgogICAgICAgIHNlbGYuX2dlbl9vdXRwdXRfbWFwKCkKICAgICAgICBpZiBzZWxmLl9hcmdfcGFy - c2VyLmRyeV9ydW46CiAgICAgICAgICAgIHJldHVybiAiIgogICAgICAgIGpzb25fb3V0ID0gWwog - ICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAibmFtZSI6ICJleHRlcm5hbC1jbHVzdGVyLXVz - ZXItY29tbWFuZCIsCiAgICAgICAgICAgICAgICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAg - ICAgICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgImFyZ3MiOiBzZWxmLm91dF9t - YXBbIkFSR1MiXSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH0sCiAgICAgICAgICAg - IHsKICAgICAgICAgICAgICAgICJuYW1lIjogInJvb2stY2VwaC1tb24tZW5kcG9pbnRzIiwKICAg - ICAgICAgICAgICAgICJraW5kIjogIkNvbmZpZ01hcCIsCiAgICAgICAgICAgICAgICAiZGF0YSI6 - IHsKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHNlbGYub3V0X21hcFsiUk9PS19FWFRFUk5B - TF9DRVBIX01PTl9EQVRBIl0sCiAgICAgICAgICAgICAgICAgICAgIm1heE1vbklkIjogIjAiLAog - ICAgICAgICAgICAgICAgICAgICJtYXBwaW5nIjogInt9IiwKICAgICAgICAgICAgICAgIH0sCiAg - ICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJuYW1lIjogInJvb2st - Y2VwaC1tb24iLAogICAgICAgICAgICAgICAgImtpbmQiOiAiU2VjcmV0IiwKICAgICAgICAgICAg - ICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICJhZG1pbi1zZWNyZXQiOiAiYWRtaW4t - c2VjcmV0IiwKICAgICAgICAgICAgICAgICAgICAiZnNpZCI6IHNlbGYub3V0X21hcFsiUk9PS19F - WFRFUk5BTF9GU0lEIl0sCiAgICAgICAgICAgICAgICAgICAgIm1vbi1zZWNyZXQiOiAibW9uLXNl - Y3JldCIsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAg - ICAgICAgICAgICAgICAibmFtZSI6ICJyb29rLWNlcGgtb3BlcmF0b3ItY3JlZHMiLAogICAgICAg - ICAgICAgICAgImtpbmQiOiAiU2VjcmV0IiwKICAgICAgICAgICAgICAgICJkYXRhIjogewogICAg - ICAgICAgICAgICAgICAgICJ1c2VySUQiOiBzZWxmLm91dF9tYXBbIlJPT0tfRVhURVJOQUxfVVNF - Uk5BTUUiXSwKICAgICAgICAgICAgICAgICAgICAidXNlcktleSI6IHNlbGYub3V0X21hcFsiUk9P - S19FWFRFUk5BTF9VU0VSX1NFQ1JFVCJdLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAg - fSwKICAgICAgICBdCgogICAgICAgICMgaWYgJ01PTklUT1JJTkdfRU5EUE9JTlQnIGV4aXN0cywg - dGhlbiBvbmx5IGFkZCAnbW9uaXRvcmluZy1lbmRwb2ludCcgdG8gQ2x1c3RlcgogICAgICAgIGlm - ICgKICAgICAgICAgICAgc2VsZi5vdXRfbWFwWyJNT05JVE9SSU5HX0VORFBPSU5UIl0KICAgICAg - ICAgICAgYW5kIHNlbGYub3V0X21hcFsiTU9OSVRPUklOR19FTkRQT0lOVF9QT1JUIl0KICAgICAg - ICApOgogICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAg - ICAgICAgICAgICAgICAgIm5hbWUiOiAibW9uaXRvcmluZy1lbmRwb2ludCIsCiAgICAgICAgICAg - ICAgICAgICAgImtpbmQiOiAiQ2VwaENsdXN0ZXIiLAogICAgICAgICAgICAgICAgICAgICJkYXRh - IjogewogICAgICAgICAgICAgICAgICAgICAgICAiTW9uaXRvcmluZ0VuZHBvaW50Ijogc2VsZi5v - dXRfbWFwWyJNT05JVE9SSU5HX0VORFBPSU5UIl0sCiAgICAgICAgICAgICAgICAgICAgICAgICJN - b25pdG9yaW5nUG9ydCI6IHNlbGYub3V0X21hcFsiTU9OSVRPUklOR19FTkRQT0lOVF9QT1JUIl0s - CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKQoK - ICAgICAgICAjIGlmICdDU0lfUkJEX05PREVfU0VDUkVUJyBleGlzdHMsIHRoZW4gb25seSBhZGQg - J3Jvb2stY3NpLXJiZC1wcm92aXNpb25lcicgU2VjcmV0CiAgICAgICAgaWYgKAogICAgICAgICAg - ICBzZWxmLm91dF9tYXBbIkNTSV9SQkRfTk9ERV9TRUNSRVQiXQogICAgICAgICAgICBhbmQgc2Vs - Zi5vdXRfbWFwWyJDU0lfUkJEX05PREVfU0VDUkVUX05BTUUiXQogICAgICAgICk6CiAgICAgICAg - ICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAg - ICAibmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfUkJEX05PREVfU0VDUkVUX05BTUUn - XX0iLAogICAgICAgICAgICAgICAgICAgICJraW5kIjogIlNlY3JldCIsCiAgICAgICAgICAgICAg - ICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJ1c2VySUQiOiBzZWxmLm91 - dF9tYXBbIkNTSV9SQkRfTk9ERV9TRUNSRVRfTkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAg - ICAidXNlcktleSI6IHNlbGYub3V0X21hcFsiQ1NJX1JCRF9OT0RFX1NFQ1JFVCJdLAogICAgICAg - ICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAgICAj - IGlmICdDU0lfUkJEX1BST1ZJU0lPTkVSX1NFQ1JFVCcgZXhpc3RzLCB0aGVuIG9ubHkgYWRkICdy - b29rLWNzaS1yYmQtcHJvdmlzaW9uZXInIFNlY3JldAogICAgICAgIGlmICgKICAgICAgICAgICAg - c2VsZi5vdXRfbWFwWyJDU0lfUkJEX1BST1ZJU0lPTkVSX1NFQ1JFVCJdCiAgICAgICAgICAgIGFu - ZCBzZWxmLm91dF9tYXBbIkNTSV9SQkRfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUiXQogICAgICAg - ICk6CiAgICAgICAgICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAg - ICAgICAgICAgICAgICAibmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfUkJEX1BST1ZJ - U0lPTkVSX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAia2luZCI6ICJTZWNy - ZXQiLAogICAgICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICAg - ICAidXNlcklEIjogc2VsZi5vdXRfbWFwWyJDU0lfUkJEX1BST1ZJU0lPTkVSX1NFQ1JFVF9OQU1F - Il0sCiAgICAgICAgICAgICAgICAgICAgICAgICJ1c2VyS2V5Ijogc2VsZi5vdXRfbWFwWyJDU0lf - UkJEX1BST1ZJU0lPTkVSX1NFQ1JFVCJdLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAg - ICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAgICAjIGlmICdDU0lfQ0VQSEZTX1BST1ZJU0lP - TkVSX1NFQ1JFVCcgZXhpc3RzLCB0aGVuIG9ubHkgYWRkICdyb29rLWNzaS1jZXBoZnMtcHJvdmlz - aW9uZXInIFNlY3JldAogICAgICAgIGlmICgKICAgICAgICAgICAgc2VsZi5vdXRfbWFwWyJDU0lf - Q0VQSEZTX1BST1ZJU0lPTkVSX1NFQ1JFVCJdCiAgICAgICAgICAgIGFuZCBzZWxmLm91dF9tYXBb - IkNTSV9DRVBIRlNfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUiXQogICAgICAgICk6CiAgICAgICAg - ICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAg - ICAibmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfQ0VQSEZTX1BST1ZJU0lPTkVSX1NF - Q1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAia2luZCI6ICJTZWNyZXQiLAogICAg - ICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAiYWRtaW5J - RCI6IHNlbGYub3V0X21hcFsiQ1NJX0NFUEhGU19QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSJdLAog - ICAgICAgICAgICAgICAgICAgICAgICAiYWRtaW5LZXkiOiBzZWxmLm91dF9tYXBbIkNTSV9DRVBI - RlNfUFJPVklTSU9ORVJfU0VDUkVUIl0sCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAg - ICAgICAgIH0KICAgICAgICAgICAgKQogICAgICAgICMgaWYgJ0NTSV9DRVBIRlNfTk9ERV9TRUNS - RVQnIGV4aXN0cywgdGhlbiBvbmx5IGFkZCAncm9vay1jc2ktY2VwaGZzLW5vZGUnIFNlY3JldAog - ICAgICAgIGlmICgKICAgICAgICAgICAgc2VsZi5vdXRfbWFwWyJDU0lfQ0VQSEZTX05PREVfU0VD - UkVUIl0KICAgICAgICAgICAgYW5kIHNlbGYub3V0X21hcFsiQ1NJX0NFUEhGU19OT0RFX1NFQ1JF - VF9OQU1FIl0KICAgICAgICApOgogICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAg - ICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiBmInJvb2ste3NlbGYub3V0X21h - cFsnQ1NJX0NFUEhGU19OT0RFX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAi - a2luZCI6ICJTZWNyZXQiLAogICAgICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAg - ICAgICAgICAgICAgICAiYWRtaW5JRCI6IHNlbGYub3V0X21hcFsiQ1NJX0NFUEhGU19OT0RFX1NF - Q1JFVF9OQU1FIl0sCiAgICAgICAgICAgICAgICAgICAgICAgICJhZG1pbktleSI6IHNlbGYub3V0 - X21hcFsiQ1NJX0NFUEhGU19OT0RFX1NFQ1JFVCJdLAogICAgICAgICAgICAgICAgICAgIH0sCiAg - ICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAgICAjIGlmICdST09LX0VYVEVSTkFM - X0RBU0hCT0FSRF9MSU5LJyBleGlzdHMsIHRoZW4gb25seSBhZGQgJ3Jvb2stY2VwaC1kYXNoYm9h - cmQtbGluaycgU2VjcmV0CiAgICAgICAgaWYgc2VsZi5vdXRfbWFwWyJST09LX0VYVEVSTkFMX0RB - U0hCT0FSRF9MSU5LIl06CiAgICAgICAgICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAg - ICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJyb29rLWNlcGgtZGFzaGJvYXJkLWxp - bmsiLAogICAgICAgICAgICAgICAgICAgICJraW5kIjogIlNlY3JldCIsCiAgICAgICAgICAgICAg - ICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJ1c2VySUQiOiAiY2VwaC1k - YXNoYm9hcmQtbGluayIsCiAgICAgICAgICAgICAgICAgICAgICAgICJ1c2VyS2V5Ijogc2VsZi5v - dXRfbWFwWyJST09LX0VYVEVSTkFMX0RBU0hCT0FSRF9MSU5LIl0sCiAgICAgICAgICAgICAgICAg - ICAgfSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKQogICAgICAgICMgaWYgJ1JBRE9T - X05BTUVTUEFDRScgZXhpc3RzLCB0aGVuIG9ubHkgYWRkIHRoZSAiUkFET1NfTkFNRVNQQUNFIiBu - YW1lc3BhY2UKICAgICAgICBpZiAoCiAgICAgICAgICAgIHNlbGYub3V0X21hcFsiUkFET1NfTkFN - RVNQQUNFIl0KICAgICAgICAgICAgYW5kIHNlbGYub3V0X21hcFsiUkVTVFJJQ1RFRF9BVVRIX1BF - Uk1JU1NJT04iXQogICAgICAgICAgICBhbmQgbm90IHNlbGYub3V0X21hcFsiUkJEX01FVEFEQVRB - X0VDX1BPT0xfTkFNRSJdCiAgICAgICAgKToKICAgICAgICAgICAganNvbl9vdXQuYXBwZW5kKAog - ICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICJuYW1lIjogInJhZG9zLW5hbWVz - cGFjZSIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiQ2VwaEJsb2NrUG9vbFJhZG9zTmFt - ZXNwYWNlIiwKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAg - ICAgICAgInJhZG9zTmFtZXNwYWNlTmFtZSI6IHNlbGYub3V0X21hcFsiUkFET1NfTkFNRVNQQUNF - Il0sCiAgICAgICAgICAgICAgICAgICAgICAgICJwb29sIjogc2VsZi5vdXRfbWFwWyJSQkRfUE9P - TF9OQU1FIl0sCiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0KICAgICAg - ICAgICAgKQogICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAg - ICAgICAgICAgICAgICAgICAgIm5hbWUiOiAiY2VwaC1yYmQtcmFkb3MtbmFtZXNwYWNlIiwKICAg + em9uZV9uYW1lICE9ICIiCiAgICAgICAgICAgICAgICApOgogICAgICAgICAgICAgICAgICAgICgK + ICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5vdXRfbWFwWyJSR1dfQURNSU5fT1BTX1VTRVJf + QUNDRVNTX0tFWSJdLAogICAgICAgICAgICAgICAgICAgICAgICBzZWxmLm91dF9tYXBbIlJHV19B + RE1JTl9PUFNfVVNFUl9TRUNSRVRfS0VZIl0sCiAgICAgICAgICAgICAgICAgICAgICAgIGluZm9f + Y2FwX3N1cHBvcnRlZCwKICAgICAgICAgICAgICAgICAgICAgICAgZXJyLAogICAgICAgICAgICAg + ICAgICAgICkgPSBzZWxmLmNyZWF0ZV9yZ3dfYWRtaW5fb3BzX3VzZXIoKQogICAgICAgICAgICAg + ICAgICAgIGVyciA9IHNlbGYudmFsaWRhdGVfcmd3X2VuZHBvaW50KGluZm9fY2FwX3N1cHBvcnRl + ZCkKICAgICAgICAgICAgICAgICAgICBpZiBzZWxmLl9hcmdfcGFyc2VyLnJnd190bHNfY2VydF9w + YXRoOgogICAgICAgICAgICAgICAgICAgICAgICBzZWxmLm91dF9tYXBbIlJHV19UTFNfQ0VSVCJd + ID0gKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi52YWxpZGF0ZV9yZ3dfZW5kcG9p + bnRfdGxzX2NlcnQoKQogICAgICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAg + ICAgIyBpZiB0aGVyZSBpcyBubyBlcnJvciwgc2V0IHRoZSBSR1dfRU5EUE9JTlQKICAgICAgICAg + ICAgICAgICAgICBpZiBlcnIgIT0gIi0xIjoKICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5v + dXRfbWFwWyJSR1dfRU5EUE9JTlQiXSA9IHNlbGYuX2FyZ19wYXJzZXIucmd3X2VuZHBvaW50CiAg + ICAgICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgICAgIGVyciA9ICJQbGVhc2UgcHJv + dmlkZSBhbGwgdGhlIFJHVyBtdWx0aXNpdGUgcGFyYW1ldGVycyBvciBub25lIG9mIHRoZW0iCiAg + ICAgICAgICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZShlcnIpCgogICAgZGVmIGdlbl9zaGVs + bF9vdXQoc2VsZik6CiAgICAgICAgc2VsZi5fZ2VuX291dHB1dF9tYXAoKQogICAgICAgIHNoT3V0 + SU8gPSBTdHJpbmdJTygpCiAgICAgICAgZm9yIGssIHYgaW4gc2VsZi5vdXRfbWFwLml0ZW1zKCk6 + CiAgICAgICAgICAgIGlmIHYgYW5kIGsgbm90IGluIHNlbGYuX2V4Y2x1ZGVkX2tleXM6CiAgICAg + ICAgICAgICAgICBzaE91dElPLndyaXRlKGYiZXhwb3J0IHtrfT17dn17TElORVNFUH0iKQogICAg + ICAgIHNoT3V0ID0gc2hPdXRJTy5nZXR2YWx1ZSgpCiAgICAgICAgc2hPdXRJTy5jbG9zZSgpCiAg + ICAgICAgcmV0dXJuIHNoT3V0CgogICAgZGVmIGdlbl9qc29uX291dChzZWxmKToKICAgICAgICBz + ZWxmLl9nZW5fb3V0cHV0X21hcCgpCiAgICAgICAgaWYgc2VsZi5fYXJnX3BhcnNlci5kcnlfcnVu + OgogICAgICAgICAgICByZXR1cm4gIiIKICAgICAgICBqc29uX291dCA9IFsKICAgICAgICAgICAg + ewogICAgICAgICAgICAgICAgIm5hbWUiOiAiZXh0ZXJuYWwtY2x1c3Rlci11c2VyLWNvbW1hbmQi + LAogICAgICAgICAgICAgICAgImtpbmQiOiAiQ29uZmlnTWFwIiwKICAgICAgICAgICAgICAgICJk + YXRhIjogewogICAgICAgICAgICAgICAgICAgICJhcmdzIjogc2VsZi5vdXRfbWFwWyJBUkdTIl0s + CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAg + ICAgICAgICAibmFtZSI6ICJyb29rLWNlcGgtbW9uLWVuZHBvaW50cyIsCiAgICAgICAgICAgICAg + ICAia2luZCI6ICJDb25maWdNYXAiLAogICAgICAgICAgICAgICAgImRhdGEiOiB7CiAgICAgICAg + ICAgICAgICAgICAgImRhdGEiOiBzZWxmLm91dF9tYXBbIlJPT0tfRVhURVJOQUxfQ0VQSF9NT05f + REFUQSJdLAogICAgICAgICAgICAgICAgICAgICJtYXhNb25JZCI6ICIwIiwKICAgICAgICAgICAg + ICAgICAgICAibWFwcGluZyI6ICJ7fSIsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9 + LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAibmFtZSI6ICJyb29rLWNlcGgtbW9uIiwK + ICAgICAgICAgICAgICAgICJraW5kIjogIlNlY3JldCIsCiAgICAgICAgICAgICAgICAiZGF0YSI6 + IHsKICAgICAgICAgICAgICAgICAgICAiYWRtaW4tc2VjcmV0IjogImFkbWluLXNlY3JldCIsCiAg + ICAgICAgICAgICAgICAgICAgImZzaWQiOiBzZWxmLm91dF9tYXBbIlJPT0tfRVhURVJOQUxfRlNJ + RCJdLAogICAgICAgICAgICAgICAgICAgICJtb24tc2VjcmV0IjogIm1vbi1zZWNyZXQiLAogICAg + ICAgICAgICAgICAgfSwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAg + ICAgIm5hbWUiOiAicm9vay1jZXBoLW9wZXJhdG9yLWNyZWRzIiwKICAgICAgICAgICAgICAgICJr + aW5kIjogIlNlY3JldCIsCiAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAg + ICAgICAidXNlcklEIjogc2VsZi5vdXRfbWFwWyJST09LX0VYVEVSTkFMX1VTRVJOQU1FIl0sCiAg + ICAgICAgICAgICAgICAgICAgInVzZXJLZXkiOiBzZWxmLm91dF9tYXBbIlJPT0tfRVhURVJOQUxf + VVNFUl9TRUNSRVQiXSwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgIH0sCiAgICAgICAg + XQoKICAgICAgICAjIGlmICdNT05JVE9SSU5HX0VORFBPSU5UJyBleGlzdHMsIHRoZW4gb25seSBh + ZGQgJ21vbml0b3JpbmctZW5kcG9pbnQnIHRvIENsdXN0ZXIKICAgICAgICBpZiAoCiAgICAgICAg + ICAgIHNlbGYub3V0X21hcFsiTU9OSVRPUklOR19FTkRQT0lOVCJdCiAgICAgICAgICAgIGFuZCBz + ZWxmLm91dF9tYXBbIk1PTklUT1JJTkdfRU5EUE9JTlRfUE9SVCJdCiAgICAgICAgKToKICAgICAg + ICAgICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAg + ICAgICJuYW1lIjogIm1vbml0b3JpbmctZW5kcG9pbnQiLAogICAgICAgICAgICAgICAgICAgICJr + aW5kIjogIkNlcGhDbHVzdGVyIiwKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAg + ICAgICAgICAgICAgICAgICAgIk1vbml0b3JpbmdFbmRwb2ludCI6IHNlbGYub3V0X21hcFsiTU9O + SVRPUklOR19FTkRQT0lOVCJdLAogICAgICAgICAgICAgICAgICAgICAgICAiTW9uaXRvcmluZ1Bv + cnQiOiBzZWxmLm91dF9tYXBbIk1PTklUT1JJTkdfRU5EUE9JTlRfUE9SVCJdLAogICAgICAgICAg + ICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKCiAgICAgICAgIyBp + ZiAnQ1NJX1JCRF9OT0RFX1NFQ1JFVCcgZXhpc3RzLCB0aGVuIG9ubHkgYWRkICdyb29rLWNzaS1y + YmQtcHJvdmlzaW9uZXInIFNlY3JldAogICAgICAgIGlmICgKICAgICAgICAgICAgc2VsZi5vdXRf + bWFwWyJDU0lfUkJEX05PREVfU0VDUkVUIl0KICAgICAgICAgICAgYW5kIHNlbGYub3V0X21hcFsi + Q1NJX1JCRF9OT0RFX1NFQ1JFVF9OQU1FIl0KICAgICAgICApOgogICAgICAgICAgICBqc29uX291 + dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiBm + InJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9OT0RFX1NFQ1JFVF9OQU1FJ119IiwKICAgICAg + ICAgICAgICAgICAgICAia2luZCI6ICJTZWNyZXQiLAogICAgICAgICAgICAgICAgICAgICJkYXRh + IjogewogICAgICAgICAgICAgICAgICAgICAgICAidXNlcklEIjogc2VsZi5vdXRfbWFwWyJDU0lf + UkJEX05PREVfU0VDUkVUX05BTUUiXSwKICAgICAgICAgICAgICAgICAgICAgICAgInVzZXJLZXki + OiBzZWxmLm91dF9tYXBbIkNTSV9SQkRfTk9ERV9TRUNSRVQiXSwKICAgICAgICAgICAgICAgICAg + ICB9LAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApCiAgICAgICAgIyBpZiAnQ1NJX1JC + RF9QUk9WSVNJT05FUl9TRUNSRVQnIGV4aXN0cywgdGhlbiBvbmx5IGFkZCAncm9vay1jc2ktcmJk + LXByb3Zpc2lvbmVyJyBTZWNyZXQKICAgICAgICBpZiAoCiAgICAgICAgICAgIHNlbGYub3V0X21h + cFsiQ1NJX1JCRF9QUk9WSVNJT05FUl9TRUNSRVQiXQogICAgICAgICAgICBhbmQgc2VsZi5vdXRf + bWFwWyJDU0lfUkJEX1BST1ZJU0lPTkVSX1NFQ1JFVF9OQU1FIl0KICAgICAgICApOgogICAgICAg + ICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAg + ICAgIm5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9QUk9WSVNJT05FUl9TRUNS + RVRfTkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiU2VjcmV0IiwKICAgICAg + ICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgInVzZXJJRCI6 + IHNlbGYub3V0X21hcFsiQ1NJX1JCRF9QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSJdLAogICAgICAg + ICAgICAgICAgICAgICAgICAidXNlcktleSI6IHNlbGYub3V0X21hcFsiQ1NJX1JCRF9QUk9WSVNJ + T05FUl9TRUNSRVQiXSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfQog + ICAgICAgICAgICApCiAgICAgICAgIyBpZiAnQ1NJX0NFUEhGU19QUk9WSVNJT05FUl9TRUNSRVQn + IGV4aXN0cywgdGhlbiBvbmx5IGFkZCAncm9vay1jc2ktY2VwaGZzLXByb3Zpc2lvbmVyJyBTZWNy + ZXQKICAgICAgICBpZiAoCiAgICAgICAgICAgIHNlbGYub3V0X21hcFsiQ1NJX0NFUEhGU19QUk9W + SVNJT05FUl9TRUNSRVQiXQogICAgICAgICAgICBhbmQgc2VsZi5vdXRfbWFwWyJDU0lfQ0VQSEZT + X1BST1ZJU0lPTkVSX1NFQ1JFVF9OQU1FIl0KICAgICAgICApOgogICAgICAgICAgICBqc29uX291 + dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiBm + InJvb2ste3NlbGYub3V0X21hcFsnQ1NJX0NFUEhGU19QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSdd + fSIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiU2VjcmV0IiwKICAgICAgICAgICAgICAg + ICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgImFkbWluSUQiOiBzZWxmLm91 + dF9tYXBbIkNTSV9DRVBIRlNfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUiXSwKICAgICAgICAgICAg + ICAgICAgICAgICAgImFkbWluS2V5Ijogc2VsZi5vdXRfbWFwWyJDU0lfQ0VQSEZTX1BST1ZJU0lP + TkVSX1NFQ1JFVCJdLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9CiAg + ICAgICAgICAgICkKICAgICAgICAjIGlmICdDU0lfQ0VQSEZTX05PREVfU0VDUkVUJyBleGlzdHMs + IHRoZW4gb25seSBhZGQgJ3Jvb2stY3NpLWNlcGhmcy1ub2RlJyBTZWNyZXQKICAgICAgICBpZiAo + CiAgICAgICAgICAgIHNlbGYub3V0X21hcFsiQ1NJX0NFUEhGU19OT0RFX1NFQ1JFVCJdCiAgICAg + ICAgICAgIGFuZCBzZWxmLm91dF9tYXBbIkNTSV9DRVBIRlNfTk9ERV9TRUNSRVRfTkFNRSJdCiAg + ICAgICAgKToKICAgICAgICAgICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAgewog + ICAgICAgICAgICAgICAgICAgICJuYW1lIjogZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9DRVBI + RlNfTk9ERV9TRUNSRVRfTkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiU2Vj + cmV0IiwKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAg + ICAgImFkbWluSUQiOiBzZWxmLm91dF9tYXBbIkNTSV9DRVBIRlNfTk9ERV9TRUNSRVRfTkFNRSJd + LAogICAgICAgICAgICAgICAgICAgICAgICAiYWRtaW5LZXkiOiBzZWxmLm91dF9tYXBbIkNTSV9D + RVBIRlNfTk9ERV9TRUNSRVQiXSwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAg + ICAgfQogICAgICAgICAgICApCiAgICAgICAgIyBpZiAnUk9PS19FWFRFUk5BTF9EQVNIQk9BUkRf + TElOSycgZXhpc3RzLCB0aGVuIG9ubHkgYWRkICdyb29rLWNlcGgtZGFzaGJvYXJkLWxpbmsnIFNl + Y3JldAogICAgICAgIGlmIHNlbGYub3V0X21hcFsiUk9PS19FWFRFUk5BTF9EQVNIQk9BUkRfTElO + SyJdOgogICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAg + ICAgICAgICAgICAgICAgIm5hbWUiOiAicm9vay1jZXBoLWRhc2hib2FyZC1saW5rIiwKICAgICAg + ICAgICAgICAgICAgICAia2luZCI6ICJTZWNyZXQiLAogICAgICAgICAgICAgICAgICAgICJkYXRh + IjogewogICAgICAgICAgICAgICAgICAgICAgICAidXNlcklEIjogImNlcGgtZGFzaGJvYXJkLWxp + bmsiLAogICAgICAgICAgICAgICAgICAgICAgICAidXNlcktleSI6IHNlbGYub3V0X21hcFsiUk9P + S19FWFRFUk5BTF9EQVNIQk9BUkRfTElOSyJdLAogICAgICAgICAgICAgICAgICAgIH0sCiAgICAg + ICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAgICAjIGlmICdSQURPU19OQU1FU1BBQ0Un + IGV4aXN0cywgdGhlbiBvbmx5IGFkZCB0aGUgIlJBRE9TX05BTUVTUEFDRSIgbmFtZXNwYWNlCiAg + ICAgICAgaWYgKAogICAgICAgICAgICBzZWxmLm91dF9tYXBbIlJBRE9TX05BTUVTUEFDRSJdCiAg + ICAgICAgICAgIGFuZCBzZWxmLm91dF9tYXBbIlJFU1RSSUNURURfQVVUSF9QRVJNSVNTSU9OIl0K + ICAgICAgICAgICAgYW5kIG5vdCBzZWxmLm91dF9tYXBbIlJCRF9NRVRBREFUQV9FQ19QT09MX05B + TUUiXQogICAgICAgICk6CiAgICAgICAgICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAg + ICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJyYWRvcy1uYW1lc3BhY2UiLAogICAg + ICAgICAgICAgICAgICAgICJraW5kIjogIkNlcGhCbG9ja1Bvb2xSYWRvc05hbWVzcGFjZSIsCiAg + ICAgICAgICAgICAgICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJyYWRv + c05hbWVzcGFjZU5hbWUiOiBzZWxmLm91dF9tYXBbIlJBRE9TX05BTUVTUEFDRSJdLAogICAgICAg + ICAgICAgICAgICAgICAgICAicG9vbCI6IHNlbGYub3V0X21hcFsiUkJEX1BPT0xfTkFNRSJdLAog + ICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAg + ICAgICAgICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAg + ICAgICAgICJuYW1lIjogImNlcGgtcmJkLXJhZG9zLW5hbWVzcGFjZSIsCiAgICAgICAgICAgICAg + ICAgICAgImtpbmQiOiAiU3RvcmFnZUNsYXNzIiwKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6 + IHsKICAgICAgICAgICAgICAgICAgICAgICAgInBvb2wiOiBzZWxmLm91dF9tYXBbIlJCRF9QT09M + X05BTUUiXSwKICAgICAgICAgICAgICAgICAgICAgICAgImNzaS5zdG9yYWdlLms4cy5pby9wcm92 + aXNpb25lci1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfUkJEX1BST1ZJ + U0lPTkVSX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAgICAgImNzaS5zdG9y + YWdlLms4cy5pby9jb250cm9sbGVyLWV4cGFuZC1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5v + dXRfbWFwWydDU0lfUkJEX1BST1ZJU0lPTkVSX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAg + ICAgICAgICAgICAgImNzaS5zdG9yYWdlLms4cy5pby9ub2RlLXN0YWdlLXNlY3JldC1uYW1lIjog + ZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfTk9ERV9TRUNSRVRfTkFNRSddfSIsCiAgICAg + ICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKQogICAgICAg + IGVsc2U6CiAgICAgICAgICAgIGlmIHNlbGYub3V0X21hcFsiUkJEX01FVEFEQVRBX0VDX1BPT0xf + TkFNRSJdOgogICAgICAgICAgICAgICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAg + ICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiAiY2VwaC1yYmQiLAogICAgICAg ICAgICAgICAgICAgICAgICAia2luZCI6ICJTdG9yYWdlQ2xhc3MiLAogICAgICAgICAgICAgICAg - ICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAicG9vbCI6IHNlbGYub3V0X21h - cFsiUkJEX1BPT0xfTkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2Uu - azhzLmlvL3Byb3Zpc2lvbmVyLXNlY3JldC1uYW1lIjogZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NT - SV9SQkRfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAgICAgICAg - ICAiY3NpLnN0b3JhZ2UuazhzLmlvL2NvbnRyb2xsZXItZXhwYW5kLXNlY3JldC1uYW1lIjogZiJy - b29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUnXX0iLAog - ICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL25vZGUtc3RhZ2Utc2Vj - cmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9OT0RFX1NFQ1JFVF9OQU1F - J119IiwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfQogICAgICAgICAg - ICApCiAgICAgICAgZWxzZToKICAgICAgICAgICAgaWYgc2VsZi5vdXRfbWFwWyJSQkRfTUVUQURB - VEFfRUNfUE9PTF9OQU1FIl06CiAgICAgICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAg - ICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJjZXBoLXJi - ZCIsCiAgICAgICAgICAgICAgICAgICAgICAgICJraW5kIjogIlN0b3JhZ2VDbGFzcyIsCiAgICAg - ICAgICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAgICAg - ImRhdGFQb29sIjogc2VsZi5vdXRfbWFwWyJSQkRfUE9PTF9OQU1FIl0sCiAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAicG9vbCI6IHNlbGYub3V0X21hcFsiUkJEX01FVEFEQVRBX0VDX1BPT0xf - TkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgImNzaS5zdG9yYWdlLms4cy5pby9w - cm92aXNpb25lci1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfUkJEX1BS - T1ZJU0lPTkVSX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJj - c2kuc3RvcmFnZS5rOHMuaW8vY29udHJvbGxlci1leHBhbmQtc2VjcmV0LW5hbWUiOiBmInJvb2st - e3NlbGYub3V0X21hcFsnQ1NJX1JCRF9QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSddfSIsCiAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL25vZGUtc3RhZ2Utc2Vj - cmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9OT0RFX1NFQ1JFVF9OQU1F - J119IiwKICAgICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICB9CiAg - ICAgICAgICAgICAgICApCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBqc29uX291 - dC5hcHBlbmQoCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAi - bmFtZSI6ICJjZXBoLXJiZCIsCiAgICAgICAgICAgICAgICAgICAgICAgICJraW5kIjogIlN0b3Jh - Z2VDbGFzcyIsCiAgICAgICAgICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAgICAg - ICAgICAgICAgICAgICAgInBvb2wiOiBzZWxmLm91dF9tYXBbIlJCRF9QT09MX05BTUUiXSwKICAg + ICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJkYXRhUG9vbCI6 + IHNlbGYub3V0X21hcFsiUkJEX1BPT0xfTkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAgICAg + ICAgInBvb2wiOiBzZWxmLm91dF9tYXBbIlJCRF9NRVRBREFUQV9FQ19QT09MX05BTUUiXSwKICAg ICAgICAgICAgICAgICAgICAgICAgICAgICJjc2kuc3RvcmFnZS5rOHMuaW8vcHJvdmlzaW9uZXIt c2VjcmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9QUk9WSVNJT05FUl9T RUNSRVRfTkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2Uu @@ -1752,147 +1745,159 @@ metadata: ICAgICAgICAgICAgImNzaS5zdG9yYWdlLms4cy5pby9ub2RlLXN0YWdlLXNlY3JldC1uYW1lIjog ZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfTk9ERV9TRUNSRVRfTkFNRSddfSIsCiAgICAg ICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAg - ICAgKQoKICAgICAgICAjIGlmICdUT1BPTE9HWV9QT09MUycsICdUT1BPTE9HWV9GQUlMVVJFX0RP - TUFJTl9MQUJFTCcsICdUT1BPTE9HWV9GQUlMVVJFX0RPTUFJTl9WQUxVRVMnICBleGlzdHMsCiAg - ICAgICAgIyB0aGVuIG9ubHkgYWRkICd0b3BvbG9neScgU3RvcmFnZUNsYXNzCiAgICAgICAgaWYg - KAogICAgICAgICAgICBzZWxmLm91dF9tYXBbIlRPUE9MT0dZX1BPT0xTIl0KICAgICAgICAgICAg - YW5kIHNlbGYub3V0X21hcFsiVE9QT0xPR1lfRkFJTFVSRV9ET01BSU5fTEFCRUwiXQogICAgICAg - ICAgICBhbmQgc2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9GQUlMVVJFX0RPTUFJTl9WQUxVRVMiXQog - ICAgICAgICk6CiAgICAgICAgICAgIGpzb25fb3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsK - ICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJjZXBoLXJiZC10b3BvbG9neSIsCiAgICAgICAg - ICAgICAgICAgICAgImtpbmQiOiAiU3RvcmFnZUNsYXNzIiwKICAgICAgICAgICAgICAgICAgICAi - ZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgInRvcG9sb2d5RmFpbHVyZURvbWFpbkxh - YmVsIjogc2VsZi5vdXRfbWFwWwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIlRPUE9MT0dZ - X0ZBSUxVUkVfRE9NQUlOX0xBQkVMIgogICAgICAgICAgICAgICAgICAgICAgICBdLAogICAgICAg - ICAgICAgICAgICAgICAgICAidG9wb2xvZ3lGYWlsdXJlRG9tYWluVmFsdWVzIjogc2VsZi5vdXRf - bWFwWwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIlRPUE9MT0dZX0ZBSUxVUkVfRE9NQUlO - X1ZBTFVFUyIKICAgICAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAgICAg - ICAgInRvcG9sb2d5UG9vbHMiOiBzZWxmLm91dF9tYXBbIlRPUE9MT0dZX1BPT0xTIl0sCiAgICAg - ICAgICAgICAgICAgICAgICAgICJjc2kuc3RvcmFnZS5rOHMuaW8vcHJvdmlzaW9uZXItc2VjcmV0 - LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JCRF9QUk9WSVNJT05FUl9TRUNSRVRf - TkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJjc2kuc3RvcmFnZS5rOHMuaW8vY29u - dHJvbGxlci1leHBhbmQtc2VjcmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX1JC - RF9QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJj - c2kuc3RvcmFnZS5rOHMuaW8vbm9kZS1zdGFnZS1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5v - dXRfbWFwWydDU0lfUkJEX05PREVfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAgICAg - IH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKCiAgICAgICAgIyBpZiAnQ0VQSEZT - X0ZTX05BTUUnIGV4aXN0cywgdGhlbiBvbmx5IGFkZCAnY2VwaGZzJyBTdG9yYWdlQ2xhc3MKICAg - ICAgICBpZiBzZWxmLm91dF9tYXBbIkNFUEhGU19GU19OQU1FIl06CiAgICAgICAgICAgIGpzb25f - b3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6 - ICJjZXBoZnMiLAogICAgICAgICAgICAgICAgICAgICJraW5kIjogIlN0b3JhZ2VDbGFzcyIsCiAg - ICAgICAgICAgICAgICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJmc05h - bWUiOiBzZWxmLm91dF9tYXBbIkNFUEhGU19GU19OQU1FIl0sCiAgICAgICAgICAgICAgICAgICAg - ICAgICJwb29sIjogc2VsZi5vdXRfbWFwWyJDRVBIRlNfUE9PTF9OQU1FIl0sCiAgICAgICAgICAg - ICAgICAgICAgICAgICJjc2kuc3RvcmFnZS5rOHMuaW8vcHJvdmlzaW9uZXItc2VjcmV0LW5hbWUi - OiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX0NFUEhGU19QUk9WSVNJT05FUl9TRUNSRVRfTkFN - RSddfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJjc2kuc3RvcmFnZS5rOHMuaW8vY29udHJv - bGxlci1leHBhbmQtc2VjcmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJX0NFUEhG - U19QUk9WSVNJT05FUl9TRUNSRVRfTkFNRSddfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJj - c2kuc3RvcmFnZS5rOHMuaW8vbm9kZS1zdGFnZS1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5v - dXRfbWFwWydDU0lfQ0VQSEZTX05PREVfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAg - ICAgIH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAgICAjIGlmICdSR1df - RU5EUE9JTlQnIGV4aXN0cywgdGhlbiBvbmx5IGFkZCAnY2VwaC1yZ3cnIFN0b3JhZ2VDbGFzcwog - ICAgICAgIGlmIHNlbGYub3V0X21hcFsiUkdXX0VORFBPSU5UIl06CiAgICAgICAgICAgIGpzb25f + ICAgKQogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAganNvbl9vdXQuYXBwZW5kKAog + ICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiAiY2Vw + aC1yYmQiLAogICAgICAgICAgICAgICAgICAgICAgICAia2luZCI6ICJTdG9yYWdlQ2xhc3MiLAog + ICAgICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICJwb29sIjogc2VsZi5vdXRfbWFwWyJSQkRfUE9PTF9OQU1FIl0sCiAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL3Byb3Zpc2lvbmVyLXNlY3JldC1uYW1l + IjogZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUn + XX0iLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgImNzaS5zdG9yYWdlLms4cy5pby9jb250 + cm9sbGVyLWV4cGFuZC1zZWNyZXQtbmFtZSI6IGYicm9vay17c2VsZi5vdXRfbWFwWydDU0lfUkJE + X1BST1ZJU0lPTkVSX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICJjc2kuc3RvcmFnZS5rOHMuaW8vbm9kZS1zdGFnZS1zZWNyZXQtbmFtZSI6IGYicm9vay17c2Vs + Zi5vdXRfbWFwWydDU0lfUkJEX05PREVfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAg + ICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICkKCiAgICAg + ICAgIyBpZiAnVE9QT0xPR1lfUE9PTFMnLCAnVE9QT0xPR1lfRkFJTFVSRV9ET01BSU5fTEFCRUwn + LCAnVE9QT0xPR1lfRkFJTFVSRV9ET01BSU5fVkFMVUVTJyAgZXhpc3RzLAogICAgICAgICMgdGhl + biBvbmx5IGFkZCAndG9wb2xvZ3knIFN0b3JhZ2VDbGFzcwogICAgICAgIGlmICgKICAgICAgICAg + ICAgc2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9QT09MUyJdCiAgICAgICAgICAgIGFuZCBzZWxmLm91 + dF9tYXBbIlRPUE9MT0dZX0ZBSUxVUkVfRE9NQUlOX0xBQkVMIl0KICAgICAgICAgICAgYW5kIHNl + bGYub3V0X21hcFsiVE9QT0xPR1lfRkFJTFVSRV9ET01BSU5fVkFMVUVTIl0KICAgICAgICApOgog + ICAgICAgICAgICBqc29uX291dC5hcHBlbmQoCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAg + ICAgICAgICAgIm5hbWUiOiAiY2VwaC1yYmQtdG9wb2xvZ3kiLAogICAgICAgICAgICAgICAgICAg + ICJraW5kIjogIlN0b3JhZ2VDbGFzcyIsCiAgICAgICAgICAgICAgICAgICAgImRhdGEiOiB7CiAg + ICAgICAgICAgICAgICAgICAgICAgICJ0b3BvbG9neUZhaWx1cmVEb21haW5MYWJlbCI6IHNlbGYu + b3V0X21hcFsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJUT1BPTE9HWV9GQUlMVVJFX0RP + TUFJTl9MQUJFTCIKICAgICAgICAgICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICAg + ICAgICAgInRvcG9sb2d5RmFpbHVyZURvbWFpblZhbHVlcyI6IHNlbGYub3V0X21hcFsKICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICJUT1BPTE9HWV9GQUlMVVJFX0RPTUFJTl9WQUxVRVMiCiAg + ICAgICAgICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAgICAgICAgICJ0b3BvbG9n + eVBvb2xzIjogc2VsZi5vdXRfbWFwWyJUT1BPTE9HWV9QT09MUyJdLAogICAgICAgICAgICAgICAg + ICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL3Byb3Zpc2lvbmVyLXNlY3JldC1uYW1lIjogZiJy + b29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUnXX0iLAog + ICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL2NvbnRyb2xsZXItZXhw + YW5kLXNlY3JldC1uYW1lIjogZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9SQkRfUFJPVklTSU9O + RVJfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2Uu + azhzLmlvL25vZGUtc3RhZ2Utc2VjcmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJ + X1JCRF9OT0RFX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAg + ICAgICAgICAgfQogICAgICAgICAgICApCgogICAgICAgICMgaWYgJ0NFUEhGU19GU19OQU1FJyBl + eGlzdHMsIHRoZW4gb25seSBhZGQgJ2NlcGhmcycgU3RvcmFnZUNsYXNzCiAgICAgICAgaWYgc2Vs + Zi5vdXRfbWFwWyJDRVBIRlNfRlNfTkFNRSJdOgogICAgICAgICAgICBqc29uX291dC5hcHBlbmQo + CiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiAiY2VwaGZzIiwK + ICAgICAgICAgICAgICAgICAgICAia2luZCI6ICJTdG9yYWdlQ2xhc3MiLAogICAgICAgICAgICAg + ICAgICAgICJkYXRhIjogewogICAgICAgICAgICAgICAgICAgICAgICAiZnNOYW1lIjogc2VsZi5v + dXRfbWFwWyJDRVBIRlNfRlNfTkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAgICAicG9vbCI6 + IHNlbGYub3V0X21hcFsiQ0VQSEZTX1BPT0xfTkFNRSJdLAogICAgICAgICAgICAgICAgICAgICAg + ICAiY3NpLnN0b3JhZ2UuazhzLmlvL3Byb3Zpc2lvbmVyLXNlY3JldC1uYW1lIjogZiJyb29rLXtz + ZWxmLm91dF9tYXBbJ0NTSV9DRVBIRlNfUFJPVklTSU9ORVJfU0VDUkVUX05BTUUnXX0iLAogICAg + ICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2UuazhzLmlvL2NvbnRyb2xsZXItZXhwYW5k + LXNlY3JldC1uYW1lIjogZiJyb29rLXtzZWxmLm91dF9tYXBbJ0NTSV9DRVBIRlNfUFJPVklTSU9O + RVJfU0VDUkVUX05BTUUnXX0iLAogICAgICAgICAgICAgICAgICAgICAgICAiY3NpLnN0b3JhZ2Uu + azhzLmlvL25vZGUtc3RhZ2Utc2VjcmV0LW5hbWUiOiBmInJvb2ste3NlbGYub3V0X21hcFsnQ1NJ + X0NFUEhGU19OT0RFX1NFQ1JFVF9OQU1FJ119IiwKICAgICAgICAgICAgICAgICAgICB9LAogICAg + ICAgICAgICAgICAgfQogICAgICAgICAgICApCiAgICAgICAgIyBpZiAnUkdXX0VORFBPSU5UJyBl + eGlzdHMsIHRoZW4gb25seSBhZGQgJ2NlcGgtcmd3JyBTdG9yYWdlQ2xhc3MKICAgICAgICBpZiBz + ZWxmLm91dF9tYXBbIlJHV19FTkRQT0lOVCJdOgogICAgICAgICAgICBqc29uX291dC5hcHBlbmQo + CiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiAiY2VwaC1yZ3ci + LAogICAgICAgICAgICAgICAgICAgICJraW5kIjogIlN0b3JhZ2VDbGFzcyIsCiAgICAgICAgICAg + ICAgICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJlbmRwb2ludCI6IHNl + bGYub3V0X21hcFsiUkdXX0VORFBPSU5UIl0sCiAgICAgICAgICAgICAgICAgICAgICAgICJwb29s + UHJlZml4Ijogc2VsZi5vdXRfbWFwWyJSR1dfUE9PTF9QUkVGSVgiXSwKICAgICAgICAgICAgICAg + ICAgICB9LAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApCiAgICAgICAgICAgIGpzb25f b3V0LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6 - ICJjZXBoLXJndyIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiU3RvcmFnZUNsYXNzIiwK - ICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgImVu - ZHBvaW50Ijogc2VsZi5vdXRfbWFwWyJSR1dfRU5EUE9JTlQiXSwKICAgICAgICAgICAgICAgICAg - ICAgICAgInBvb2xQcmVmaXgiOiBzZWxmLm91dF9tYXBbIlJHV19QT09MX1BSRUZJWCJdLAogICAg - ICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKICAgICAg - ICAgICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAg - ICAgICJuYW1lIjogInJndy1hZG1pbi1vcHMtdXNlciIsCiAgICAgICAgICAgICAgICAgICAgImtp - bmQiOiAiU2VjcmV0IiwKICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAg - ICAgICAgICAgICAgImFjY2Vzc0tleSI6IHNlbGYub3V0X21hcFsiUkdXX0FETUlOX09QU19VU0VS - X0FDQ0VTU19LRVkiXSwKICAgICAgICAgICAgICAgICAgICAgICAgInNlY3JldEtleSI6IHNlbGYu - b3V0X21hcFsiUkdXX0FETUlOX09QU19VU0VSX1NFQ1JFVF9LRVkiXSwKICAgICAgICAgICAgICAg - ICAgICB9LAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApCiAgICAgICAgIyBpZiAnUkdX - X1RMU19DRVJUJyBleGlzdHMsIHRoZW4gb25seSBhZGQgdGhlICJjZXBoLXJndy10bHMtY2VydCIg - c2VjcmV0CiAgICAgICAgaWYgc2VsZi5vdXRfbWFwWyJSR1dfVExTX0NFUlQiXToKICAgICAgICAg - ICAganNvbl9vdXQuYXBwZW5kKAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAg - ICJuYW1lIjogImNlcGgtcmd3LXRscy1jZXJ0IiwKICAgICAgICAgICAgICAgICAgICAia2luZCI6 - ICJTZWNyZXQiLAogICAgICAgICAgICAgICAgICAgICJkYXRhIjogewogICAgICAgICAgICAgICAg - ICAgICAgICAiY2VydCI6IHNlbGYub3V0X21hcFsiUkdXX1RMU19DRVJUIl0sCiAgICAgICAgICAg - ICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKQoKICAgICAgICByZXR1 - cm4ganNvbi5kdW1wcyhqc29uX291dCkgKyBMSU5FU0VQCgogICAgZGVmIHVwZ3JhZGVfdXNlcnNf - cGVybWlzc2lvbnMoc2VsZik6CiAgICAgICAgdXNlcnMgPSBbCiAgICAgICAgICAgICJjbGllbnQu - Y3NpLWNlcGhmcy1ub2RlIiwKICAgICAgICAgICAgImNsaWVudC5jc2ktY2VwaGZzLXByb3Zpc2lv - bmVyIiwKICAgICAgICAgICAgImNsaWVudC5jc2ktcmJkLW5vZGUiLAogICAgICAgICAgICAiY2xp - ZW50LmNzaS1yYmQtcHJvdmlzaW9uZXIiLAogICAgICAgICAgICAiY2xpZW50LmhlYWx0aGNoZWNr - ZXIiLAogICAgICAgIF0KICAgICAgICBpZiBzZWxmLnJ1bl9hc191c2VyICE9ICIiIGFuZCBzZWxm - LnJ1bl9hc191c2VyIG5vdCBpbiB1c2VyczoKICAgICAgICAgICAgdXNlcnMuYXBwZW5kKHNlbGYu - cnVuX2FzX3VzZXIpCiAgICAgICAgZm9yIHVzZXIgaW4gdXNlcnM6CiAgICAgICAgICAgIHNlbGYu - dXBncmFkZV91c2VyX3Blcm1pc3Npb25zKHVzZXIpCgogICAgZGVmIGdldF9yZ3dfcG9vbF9uYW1l - X2R1cmluZ191cGdyYWRlKHNlbGYsIHVzZXIsIGNhcHMpOgogICAgICAgIGlmIHVzZXIgPT0gImNs - aWVudC5oZWFsdGhjaGVja2VyIjoKICAgICAgICAgICAgIyB3aGVuIGFkbWluIGhhcyBub3QgcHJv - dmlkZWQgcmd3IHBvb2wgbmFtZSBkdXJpbmcgdXBncmFkZSwKICAgICAgICAgICAgIyBnZXQgdGhl - IHJndyBwb29sIG5hbWUgZnJvbSBjbGllbnQuaGVhbHRoY2hlY2tlciB1c2VyIHdoaWNoIHdhcyB1 - c2VkIGR1cmluZyBjb25uZWN0aW9uCiAgICAgICAgICAgIGlmIG5vdCBzZWxmLl9hcmdfcGFyc2Vy - LnJnd19wb29sX3ByZWZpeDoKICAgICAgICAgICAgICAgICMgVG8gZ2V0IHZhbHVlICdkZWZhdWx0 - JyB3aGljaCBpcyByZ3cgcG9vbCBuYW1lIGZyb20gJ2FsbG93IHJ3eCBwb29sPWRlZmF1bHQucmd3 - Lm1ldGEnCiAgICAgICAgICAgICAgICBwYXR0ZXJuID0gciJwb29sPSguKj8pXC5yZ3dcLm1ldGEi - CiAgICAgICAgICAgICAgICBtYXRjaCA9IHJlLnNlYXJjaChwYXR0ZXJuLCBjYXBzKQogICAgICAg - ICAgICAgICAgaWYgbWF0Y2g6CiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYXJnX3BhcnNlci5y - Z3dfcG9vbF9wcmVmaXggPSBtYXRjaC5ncm91cCgxKQogICAgICAgICAgICAgICAgZWxzZToKICAg - ICAgICAgICAgICAgICAgICByYWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAg - ICAgICAgICAgICAgICAgICAiZmFpbGVkIHRvIGdldCByZ3cgcG9vbCBuYW1lIGZvciB1cGdyYWRl - IgogICAgICAgICAgICAgICAgICAgICkKCiAgICBkZWYgdXBncmFkZV91c2VyX3Blcm1pc3Npb25z - KHNlbGYsIHVzZXIpOgogICAgICAgICMgY2hlY2sgd2hldGhlciB0aGUgZ2l2ZW4gdXNlciBleGlz - dHMgb3Igbm90CiAgICAgICAgY21kX2pzb24gPSB7InByZWZpeCI6ICJhdXRoIGdldCIsICJlbnRp - dHkiOiBmInt1c2VyfSIsICJmb3JtYXQiOiAianNvbiJ9CiAgICAgICAgcmV0X3ZhbCwganNvbl9v - dXQsIGVycl9tc2cgPSBzZWxmLl9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29uKQogICAgICAg - IGlmIHJldF92YWwgIT0gMCBvciBsZW4oanNvbl9vdXQpID09IDA6CiAgICAgICAgICAgIHByaW50 - KGYidXNlciB7dXNlcn0gbm90IGZvdW5kIGZvciB1cGdyYWRpbmcuIikKICAgICAgICAgICAgcmV0 - dXJuCiAgICAgICAgZXhpc3RpbmdfY2FwcyA9IGpzb25fb3V0WzBdWyJjYXBzIl0KICAgICAgICBz - ZWxmLmdldF9yZ3dfcG9vbF9uYW1lX2R1cmluZ191cGdyYWRlKHVzZXIsIHN0cihleGlzdGluZ19j - YXBzKSkKICAgICAgICBuZXdfY2FwLCBfID0gc2VsZi5nZXRfY2Fwc19hbmRfZW50aXR5KHVzZXIp - CiAgICAgICAgY2FwX2tleXMgPSBbIm1vbiIsICJtZ3IiLCAib3NkIiwgIm1kcyJdCiAgICAgICAg - Y2FwcyA9IFtdCiAgICAgICAgZm9yIGVhY2hDYXAgaW4gY2FwX2tleXM6CiAgICAgICAgICAgIGN1 - cl9jYXBfdmFsdWVzID0gZXhpc3RpbmdfY2Fwcy5nZXQoZWFjaENhcCwgIiIpCiAgICAgICAgICAg - IG5ld19jYXBfdmFsdWVzID0gbmV3X2NhcC5nZXQoZWFjaENhcCwgIiIpCiAgICAgICAgICAgIGN1 - cl9jYXBfcGVybV9saXN0ID0gWwogICAgICAgICAgICAgICAgeC5zdHJpcCgpIGZvciB4IGluIGN1 - cl9jYXBfdmFsdWVzLnNwbGl0KCIsIikgaWYgeC5zdHJpcCgpCiAgICAgICAgICAgIF0KICAgICAg - ICAgICAgbmV3X2NhcF9wZXJtX2xpc3QgPSBbCiAgICAgICAgICAgICAgICB4LnN0cmlwKCkgZm9y - IHggaW4gbmV3X2NhcF92YWx1ZXMuc3BsaXQoIiwiKSBpZiB4LnN0cmlwKCkKICAgICAgICAgICAg - XQogICAgICAgICAgICAjIGFwcGVuZCBuZXdfY2FwX2xpc3QgdG8gY3VyX2NhcF9saXN0IHRvIG1h - aW50YWluIHRoZSBvcmRlciBvZiBjYXBzCiAgICAgICAgICAgIGN1cl9jYXBfcGVybV9saXN0LmV4 - dGVuZChuZXdfY2FwX3Blcm1fbGlzdCkKICAgICAgICAgICAgIyBlbGltaW5hdGUgZHVwbGljYXRl - cyB3aXRob3V0IHVzaW5nICdzZXQnCiAgICAgICAgICAgICMgc2V0IHJlLW9yZGVycyBpdGVtcyBp - biB0aGUgbGlzdCBhbmQgd2UgaGF2ZSB0byBrZWVwIHRoZSBvcmRlcgogICAgICAgICAgICBuZXdf - Y2FwX2xpc3QgPSBbXQogICAgICAgICAgICBbbmV3X2NhcF9saXN0LmFwcGVuZCh4KSBmb3IgeCBp - biBjdXJfY2FwX3Blcm1fbGlzdCBpZiB4IG5vdCBpbiBuZXdfY2FwX2xpc3RdCiAgICAgICAgICAg - IGV4aXN0aW5nX2NhcHNbZWFjaENhcF0gPSAiLCAiLmpvaW4obmV3X2NhcF9saXN0KQogICAgICAg - ICAgICBpZiBleGlzdGluZ19jYXBzW2VhY2hDYXBdOgogICAgICAgICAgICAgICAgY2Fwcy5hcHBl - bmQoZWFjaENhcCkKICAgICAgICAgICAgICAgIGNhcHMuYXBwZW5kKGV4aXN0aW5nX2NhcHNbZWFj - aENhcF0pCiAgICAgICAgY21kX2pzb24gPSB7CiAgICAgICAgICAgICJwcmVmaXgiOiAiYXV0aCBj - YXBzIiwKICAgICAgICAgICAgImVudGl0eSI6IHVzZXIsCiAgICAgICAgICAgICJjYXBzIjogY2Fw - cywKICAgICAgICAgICAgImZvcm1hdCI6ICJqc29uIiwKICAgICAgICB9CiAgICAgICAgcmV0X3Zh - bCwganNvbl9vdXQsIGVycl9tc2cgPSBzZWxmLl9jb21tb25fY21kX2pzb25fZ2VuKGNtZF9qc29u - KQogICAgICAgIGlmIHJldF92YWwgIT0gMDoKICAgICAgICAgICAgcmFpc2UgRXhlY3V0aW9uRmFp - bHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgIGYiJ2F1dGggY2FwcyB7dXNlcn0nIGNvbW1h - bmQgZmFpbGVkLlxuIEVycm9yOiB7ZXJyX21zZ30iCiAgICAgICAgICAgICkKICAgICAgICBwcmlu - dChmIlVwZGF0ZWQgdXNlciB7dXNlcn0gc3VjY2Vzc2Z1bGx5LiIpCgogICAgZGVmIG1haW4oc2Vs - Zik6CiAgICAgICAgZ2VuZXJhdGVkX291dHB1dCA9ICIiCiAgICAgICAgaWYgc2VsZi5fYXJnX3Bh - cnNlci51cGdyYWRlOgogICAgICAgICAgICBzZWxmLnVwZ3JhZGVfdXNlcnNfcGVybWlzc2lvbnMo - KQogICAgICAgIGVsaWYgc2VsZi5fYXJnX3BhcnNlci5mb3JtYXQgPT0gImpzb24iOgogICAgICAg - ICAgICBnZW5lcmF0ZWRfb3V0cHV0ID0gc2VsZi5nZW5fanNvbl9vdXQoKQogICAgICAgIGVsaWYg - c2VsZi5fYXJnX3BhcnNlci5mb3JtYXQgPT0gImJhc2giOgogICAgICAgICAgICBnZW5lcmF0ZWRf - b3V0cHV0ID0gc2VsZi5nZW5fc2hlbGxfb3V0KCkKICAgICAgICBlbHNlOgogICAgICAgICAgICBy - YWlzZSBFeGVjdXRpb25GYWlsdXJlRXhjZXB0aW9uKAogICAgICAgICAgICAgICAgZiJVbnN1cHBv - cnRlZCBmb3JtYXQ6IHtzZWxmLl9hcmdfcGFyc2VyLmZvcm1hdH0iCiAgICAgICAgICAgICkKICAg - ICAgICBwcmludChnZW5lcmF0ZWRfb3V0cHV0KQogICAgICAgIGlmIHNlbGYub3V0cHV0X2ZpbGUg - YW5kIGdlbmVyYXRlZF9vdXRwdXQ6CiAgICAgICAgICAgIGZPdXQgPSBvcGVuKHNlbGYub3V0cHV0 - X2ZpbGUsIG1vZGU9InciLCBlbmNvZGluZz0iVVRGLTgiKQogICAgICAgICAgICBmT3V0LndyaXRl - KGdlbmVyYXRlZF9vdXRwdXQpCiAgICAgICAgICAgIGZPdXQuY2xvc2UoKQoKCiMjIyMjIyMjIyMj - IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwojIyMjIyMjIyMjIyMjIyMjIyMj - IyMgTUFJTiAjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj - IyMjIyMjIyMjIyMjIyMjIyMjIyMjCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICByak9i - aiA9IFJhZG9zSlNPTigpCiAgICB0cnk6CiAgICAgICAgcmpPYmoubWFpbigpCiAgICBleGNlcHQg - RXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbiBhcyBlcnI6CiAgICAgICAgcHJpbnQoZiJFeGVjdXRp - b24gRmFpbGVkOiB7ZXJyfSIpCiAgICAgICAgcmFpc2UgZXJyCiAgICBleGNlcHQgS2V5RXJyb3Ig - YXMga0VycjoKICAgICAgICBwcmludChmIktleUVycm9yOiB7a0Vycn0iKQogICAgZXhjZXB0IE9T - RXJyb3IgYXMgb3NFcnI6CiAgICAgICAgcHJpbnQoZiJFcnJvciB3aGlsZSB0cnlpbmcgdG8gb3V0 - cHV0IHRoZSBkYXRhOiB7b3NFcnJ9IikKICAgIGZpbmFsbHk6CiAgICAgICAgcmpPYmouc2h1dGRv - d24oKQo= + ICJyZ3ctYWRtaW4tb3BzLXVzZXIiLAogICAgICAgICAgICAgICAgICAgICJraW5kIjogIlNlY3Jl + dCIsCiAgICAgICAgICAgICAgICAgICAgImRhdGEiOiB7CiAgICAgICAgICAgICAgICAgICAgICAg + ICJhY2Nlc3NLZXkiOiBzZWxmLm91dF9tYXBbIlJHV19BRE1JTl9PUFNfVVNFUl9BQ0NFU1NfS0VZ + Il0sCiAgICAgICAgICAgICAgICAgICAgICAgICJzZWNyZXRLZXkiOiBzZWxmLm91dF9tYXBbIlJH + V19BRE1JTl9PUFNfVVNFUl9TRUNSRVRfS0VZIl0sCiAgICAgICAgICAgICAgICAgICAgfSwKICAg + ICAgICAgICAgICAgIH0KICAgICAgICAgICAgKQogICAgICAgICMgaWYgJ1JHV19UTFNfQ0VSVCcg + ZXhpc3RzLCB0aGVuIG9ubHkgYWRkIHRoZSAiY2VwaC1yZ3ctdGxzLWNlcnQiIHNlY3JldAogICAg + ICAgIGlmIHNlbGYub3V0X21hcFsiUkdXX1RMU19DRVJUIl06CiAgICAgICAgICAgIGpzb25fb3V0 + LmFwcGVuZCgKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJj + ZXBoLXJndy10bHMtY2VydCIsCiAgICAgICAgICAgICAgICAgICAgImtpbmQiOiAiU2VjcmV0IiwK + ICAgICAgICAgICAgICAgICAgICAiZGF0YSI6IHsKICAgICAgICAgICAgICAgICAgICAgICAgImNl + cnQiOiBzZWxmLm91dF9tYXBbIlJHV19UTFNfQ0VSVCJdLAogICAgICAgICAgICAgICAgICAgIH0s + CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICkKCiAgICAgICAgcmV0dXJuIGpzb24uZHVt + cHMoanNvbl9vdXQpICsgTElORVNFUAoKICAgIGRlZiB1cGdyYWRlX3VzZXJzX3Blcm1pc3Npb25z + KHNlbGYpOgogICAgICAgIHVzZXJzID0gWwogICAgICAgICAgICAiY2xpZW50LmNzaS1jZXBoZnMt + bm9kZSIsCiAgICAgICAgICAgICJjbGllbnQuY3NpLWNlcGhmcy1wcm92aXNpb25lciIsCiAgICAg + ICAgICAgICJjbGllbnQuY3NpLXJiZC1ub2RlIiwKICAgICAgICAgICAgImNsaWVudC5jc2ktcmJk + LXByb3Zpc2lvbmVyIiwKICAgICAgICAgICAgImNsaWVudC5oZWFsdGhjaGVja2VyIiwKICAgICAg + ICBdCiAgICAgICAgaWYgc2VsZi5ydW5fYXNfdXNlciAhPSAiIiBhbmQgc2VsZi5ydW5fYXNfdXNl + ciBub3QgaW4gdXNlcnM6CiAgICAgICAgICAgIHVzZXJzLmFwcGVuZChzZWxmLnJ1bl9hc191c2Vy + KQogICAgICAgIGZvciB1c2VyIGluIHVzZXJzOgogICAgICAgICAgICBzZWxmLnVwZ3JhZGVfdXNl + cl9wZXJtaXNzaW9ucyh1c2VyKQoKICAgIGRlZiBnZXRfcmd3X3Bvb2xfbmFtZV9kdXJpbmdfdXBn + cmFkZShzZWxmLCB1c2VyLCBjYXBzKToKICAgICAgICBpZiB1c2VyID09ICJjbGllbnQuaGVhbHRo + Y2hlY2tlciI6CiAgICAgICAgICAgICMgd2hlbiBhZG1pbiBoYXMgbm90IHByb3ZpZGVkIHJndyBw + b29sIG5hbWUgZHVyaW5nIHVwZ3JhZGUsCiAgICAgICAgICAgICMgZ2V0IHRoZSByZ3cgcG9vbCBu + YW1lIGZyb20gY2xpZW50LmhlYWx0aGNoZWNrZXIgdXNlciB3aGljaCB3YXMgdXNlZCBkdXJpbmcg + Y29ubmVjdGlvbgogICAgICAgICAgICBpZiBub3Qgc2VsZi5fYXJnX3BhcnNlci5yZ3dfcG9vbF9w + cmVmaXg6CiAgICAgICAgICAgICAgICAjIFRvIGdldCB2YWx1ZSAnZGVmYXVsdCcgd2hpY2ggaXMg + cmd3IHBvb2wgbmFtZSBmcm9tICdhbGxvdyByd3ggcG9vbD1kZWZhdWx0LnJndy5tZXRhJwogICAg + ICAgICAgICAgICAgcGF0dGVybiA9IHIicG9vbD0oLio/KVwucmd3XC5tZXRhIgogICAgICAgICAg + ICAgICAgbWF0Y2ggPSByZS5zZWFyY2gocGF0dGVybiwgY2FwcykKICAgICAgICAgICAgICAgIGlm + IG1hdGNoOgogICAgICAgICAgICAgICAgICAgIHNlbGYuX2FyZ19wYXJzZXIucmd3X3Bvb2xfcHJl + Zml4ID0gbWF0Y2guZ3JvdXAoMSkKICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAg + ICAgICAgcmFpc2UgRXhlY3V0aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgICAg + ICAgICAgImZhaWxlZCB0byBnZXQgcmd3IHBvb2wgbmFtZSBmb3IgdXBncmFkZSIKICAgICAgICAg + ICAgICAgICAgICApCgogICAgZGVmIHVwZ3JhZGVfdXNlcl9wZXJtaXNzaW9ucyhzZWxmLCB1c2Vy + KToKICAgICAgICAjIGNoZWNrIHdoZXRoZXIgdGhlIGdpdmVuIHVzZXIgZXhpc3RzIG9yIG5vdAog + ICAgICAgIGNtZF9qc29uID0geyJwcmVmaXgiOiAiYXV0aCBnZXQiLCAiZW50aXR5IjogZiJ7dXNl + cn0iLCAiZm9ybWF0IjogImpzb24ifQogICAgICAgIHJldF92YWwsIGpzb25fb3V0LCBlcnJfbXNn + ID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRfanNvbikKICAgICAgICBpZiByZXRfdmFs + ICE9IDAgb3IgbGVuKGpzb25fb3V0KSA9PSAwOgogICAgICAgICAgICBwcmludChmInVzZXIge3Vz + ZXJ9IG5vdCBmb3VuZCBmb3IgdXBncmFkaW5nLiIpCiAgICAgICAgICAgIHJldHVybgogICAgICAg + IGV4aXN0aW5nX2NhcHMgPSBqc29uX291dFswXVsiY2FwcyJdCiAgICAgICAgc2VsZi5nZXRfcmd3 + X3Bvb2xfbmFtZV9kdXJpbmdfdXBncmFkZSh1c2VyLCBzdHIoZXhpc3RpbmdfY2FwcykpCiAgICAg + ICAgbmV3X2NhcCwgXyA9IHNlbGYuZ2V0X2NhcHNfYW5kX2VudGl0eSh1c2VyKQogICAgICAgIGNh + cF9rZXlzID0gWyJtb24iLCAibWdyIiwgIm9zZCIsICJtZHMiXQogICAgICAgIGNhcHMgPSBbXQog + ICAgICAgIGZvciBlYWNoQ2FwIGluIGNhcF9rZXlzOgogICAgICAgICAgICBjdXJfY2FwX3ZhbHVl + cyA9IGV4aXN0aW5nX2NhcHMuZ2V0KGVhY2hDYXAsICIiKQogICAgICAgICAgICBuZXdfY2FwX3Zh + bHVlcyA9IG5ld19jYXAuZ2V0KGVhY2hDYXAsICIiKQogICAgICAgICAgICBjdXJfY2FwX3Blcm1f + bGlzdCA9IFsKICAgICAgICAgICAgICAgIHguc3RyaXAoKSBmb3IgeCBpbiBjdXJfY2FwX3ZhbHVl + cy5zcGxpdCgiLCIpIGlmIHguc3RyaXAoKQogICAgICAgICAgICBdCiAgICAgICAgICAgIG5ld19j + YXBfcGVybV9saXN0ID0gWwogICAgICAgICAgICAgICAgeC5zdHJpcCgpIGZvciB4IGluIG5ld19j + YXBfdmFsdWVzLnNwbGl0KCIsIikgaWYgeC5zdHJpcCgpCiAgICAgICAgICAgIF0KICAgICAgICAg + ICAgIyBhcHBlbmQgbmV3X2NhcF9saXN0IHRvIGN1cl9jYXBfbGlzdCB0byBtYWludGFpbiB0aGUg + b3JkZXIgb2YgY2FwcwogICAgICAgICAgICBjdXJfY2FwX3Blcm1fbGlzdC5leHRlbmQobmV3X2Nh + cF9wZXJtX2xpc3QpCiAgICAgICAgICAgICMgZWxpbWluYXRlIGR1cGxpY2F0ZXMgd2l0aG91dCB1 + c2luZyAnc2V0JwogICAgICAgICAgICAjIHNldCByZS1vcmRlcnMgaXRlbXMgaW4gdGhlIGxpc3Qg + YW5kIHdlIGhhdmUgdG8ga2VlcCB0aGUgb3JkZXIKICAgICAgICAgICAgbmV3X2NhcF9saXN0ID0g + W10KICAgICAgICAgICAgW25ld19jYXBfbGlzdC5hcHBlbmQoeCkgZm9yIHggaW4gY3VyX2NhcF9w + ZXJtX2xpc3QgaWYgeCBub3QgaW4gbmV3X2NhcF9saXN0XQogICAgICAgICAgICBleGlzdGluZ19j + YXBzW2VhY2hDYXBdID0gIiwgIi5qb2luKG5ld19jYXBfbGlzdCkKICAgICAgICAgICAgaWYgZXhp + c3RpbmdfY2Fwc1tlYWNoQ2FwXToKICAgICAgICAgICAgICAgIGNhcHMuYXBwZW5kKGVhY2hDYXAp + CiAgICAgICAgICAgICAgICBjYXBzLmFwcGVuZChleGlzdGluZ19jYXBzW2VhY2hDYXBdKQogICAg + ICAgIGNtZF9qc29uID0gewogICAgICAgICAgICAicHJlZml4IjogImF1dGggY2FwcyIsCiAgICAg + ICAgICAgICJlbnRpdHkiOiB1c2VyLAogICAgICAgICAgICAiY2FwcyI6IGNhcHMsCiAgICAgICAg + ICAgICJmb3JtYXQiOiAianNvbiIsCiAgICAgICAgfQogICAgICAgIHJldF92YWwsIGpzb25fb3V0 + LCBlcnJfbXNnID0gc2VsZi5fY29tbW9uX2NtZF9qc29uX2dlbihjbWRfanNvbikKICAgICAgICBp + ZiByZXRfdmFsICE9IDA6CiAgICAgICAgICAgIHJhaXNlIEV4ZWN1dGlvbkZhaWx1cmVFeGNlcHRp + b24oCiAgICAgICAgICAgICAgICBmIidhdXRoIGNhcHMge3VzZXJ9JyBjb21tYW5kIGZhaWxlZC5c + biBFcnJvcjoge2Vycl9tc2d9IgogICAgICAgICAgICApCiAgICAgICAgcHJpbnQoZiJVcGRhdGVk + IHVzZXIge3VzZXJ9IHN1Y2Nlc3NmdWxseS4iKQoKICAgIGRlZiBtYWluKHNlbGYpOgogICAgICAg + IGdlbmVyYXRlZF9vdXRwdXQgPSAiIgogICAgICAgIGlmIHNlbGYuX2FyZ19wYXJzZXIudXBncmFk + ZToKICAgICAgICAgICAgc2VsZi51cGdyYWRlX3VzZXJzX3Blcm1pc3Npb25zKCkKICAgICAgICBl + bGlmIHNlbGYuX2FyZ19wYXJzZXIuZm9ybWF0ID09ICJqc29uIjoKICAgICAgICAgICAgZ2VuZXJh + dGVkX291dHB1dCA9IHNlbGYuZ2VuX2pzb25fb3V0KCkKICAgICAgICBlbGlmIHNlbGYuX2FyZ19w + YXJzZXIuZm9ybWF0ID09ICJiYXNoIjoKICAgICAgICAgICAgZ2VuZXJhdGVkX291dHB1dCA9IHNl + bGYuZ2VuX3NoZWxsX291dCgpCiAgICAgICAgZWxzZToKICAgICAgICAgICAgcmFpc2UgRXhlY3V0 + aW9uRmFpbHVyZUV4Y2VwdGlvbigKICAgICAgICAgICAgICAgIGYiVW5zdXBwb3J0ZWQgZm9ybWF0 + OiB7c2VsZi5fYXJnX3BhcnNlci5mb3JtYXR9IgogICAgICAgICAgICApCiAgICAgICAgcHJpbnQo + Z2VuZXJhdGVkX291dHB1dCkKICAgICAgICBpZiBzZWxmLm91dHB1dF9maWxlIGFuZCBnZW5lcmF0 + ZWRfb3V0cHV0OgogICAgICAgICAgICBmT3V0ID0gb3BlbihzZWxmLm91dHB1dF9maWxlLCBtb2Rl + PSJ3IiwgZW5jb2Rpbmc9IlVURi04IikKICAgICAgICAgICAgZk91dC53cml0ZShnZW5lcmF0ZWRf + b3V0cHV0KQogICAgICAgICAgICBmT3V0LmNsb3NlKCkKCgojIyMjIyMjIyMjIyMjIyMjIyMjIyMj + IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIE1BSU4gIyMj + IyMjIyMjIyMjIyMjIyMjIyMjCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj + IyMjIyMjIyMjIwppZiBfX25hbWVfXyA9PSAiX19tYWluX18iOgogICAgcmpPYmogPSBSYWRvc0pT + T04oKQogICAgdHJ5OgogICAgICAgIHJqT2JqLm1haW4oKQogICAgZXhjZXB0IEV4ZWN1dGlvbkZh + aWx1cmVFeGNlcHRpb24gYXMgZXJyOgogICAgICAgIHByaW50KGYiRXhlY3V0aW9uIEZhaWxlZDog + e2Vycn0iKQogICAgICAgIHJhaXNlIGVycgogICAgZXhjZXB0IEtleUVycm9yIGFzIGtFcnI6CiAg + ICAgICAgcHJpbnQoZiJLZXlFcnJvcjoge2tFcnJ9IikKICAgIGV4Y2VwdCBPU0Vycm9yIGFzIG9z + RXJyOgogICAgICAgIHByaW50KGYiRXJyb3Igd2hpbGUgdHJ5aW5nIHRvIG91dHB1dCB0aGUgZGF0 + YToge29zRXJyfSIpCiAgICBmaW5hbGx5OgogICAgICAgIHJqT2JqLnNodXRkb3duKCkK name: rook-ceph-operator.v4.17.0 namespace: placeholder spec: