From d967ae8f57ab49ab8205c93c034b3b31a75c2649 Mon Sep 17 00:00:00 2001 From: Saul Paredes Date: Thu, 21 Dec 2023 10:19:30 -0800 Subject: [PATCH] lib: Add type definition for Windows support And update sample Signed-off-by: Saul Paredes --- .../policy/yaml/deployment/deployment-docker-busybox.yaml | 2 +- src/libs/oci/src/lib.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/agent/samples/policy/yaml/deployment/deployment-docker-busybox.yaml b/src/agent/samples/policy/yaml/deployment/deployment-docker-busybox.yaml index ce4cd6ffc189..f253e15dbdd2 100644 --- a/src/agent/samples/policy/yaml/deployment/deployment-docker-busybox.yaml +++ b/src/agent/samples/policy/yaml/deployment/deployment-docker-busybox.yaml @@ -13,7 +13,7 @@ spec: labels: app: busybox-deployment annotations: - io.katacontainers.config.agent.policy: cGFja2FnZSBhZ2VudF9wb2xpY3kKCmltcG9ydCBmdXR1cmUua2V5d29yZHMuaW4KaW1wb3J0IGZ1dHVyZS5rZXl3b3Jkcy5ldmVyeQoKaW1wb3J0IGlucHV0CgojIERlZmF1bHQgdmFsdWVzLCByZXR1cm5lZCBieSBPUEEgd2hlbiBydWxlcyBjYW5ub3QgYmUgZXZhbHVhdGVkIHRvIHRydWUuCmRlZmF1bHQgQ29weUZpbGVSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQ3JlYXRlQ29udGFpbmVyUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENyZWF0ZVNhbmRib3hSZXF1ZXN0IDo9IHRydWUKZGVmYXVsdCBEZXN0cm95U2FuZGJveFJlcXVlc3QgOj0gdHJ1ZQpkZWZhdWx0IEV4ZWNQcm9jZXNzUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IEdldE9PTUV2ZW50UmVxdWVzdCA6PSB0cnVlCmRlZmF1bHQgR3Vlc3REZXRhaWxzUmVxdWVzdCA6PSB0cnVlCmRlZmF1bHQgT25saW5lQ1BVTWVtUmVxdWVzdCA6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WluZXJfdHlwZShpX2NyaV90eXBlLCBwX29jaSwgaV9vY2ksIHNfbmFtZSwgc19uYW1lc3BhY2UpIHsKICAgIHByaW50KCJhbGxvd19ieV9jb250YWluZXJfdHlwZSAyOiBpX2NyaV90eXBlID0iLCBpX2NyaV90eXBlKQogICAgaV9jcmlfdHlwZSA9PSAiY29udGFpbmVyIgoKICAgIGlfa2F0YV90eXBlIDo9IGlfb2NpLkFubm90YXRpb25zWyJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmNvbnRhaW5lcl90eXBlIl0KICAgIHByaW50KCJhbGxvd19ieV9jb250YWluZXJfdHlwZSAyOiBpX2thdGFfdHlwZSA9IiwgaV9rYXRhX3R5cGUpCiAgICBpX2thdGFfdHlwZSA9PSAicG9kX2NvbnRhaW5lciIKCiAgICBhbGxvd19jb250YWluZXJfbmFtZShwX29jaSwgaV9vY2kpCiAgICBhbGxvd19uZXRfbmFtZXNwYWNlKHBfb2NpLCBpX29jaSkKICAgIGFsbG93X2xvZ19kaXJlY3RvcnkocF9vY2ksIGlfb2NpKQoKICAgIHByaW50KCJhbGxvd19ieV9jb250YWluZXJfdHlwZSAyOiB0cnVlIikKfQoKIyAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLW5hbWUiIGFubm90YXRpb24KYWxsb3dfc2FuZGJveF9jb250YWluZXJfbmFtZShwX29jaSwgaV9vY2kpIHsKICAgIHByaW50KCJhbGxvd19zYW5kYm94X2NvbnRhaW5lcl9uYW1lOiBzdGFydCIpCgogICAgY29udGFpbmVyX2Fubm90YXRpb25fbWlzc2luZyhwX29jaSwgaV9vY2ksICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItbmFtZSIpCgogICAgcHJpbnQoImFsbG93X3NhbmRib3hfY29udGFpbmVyX25hbWU6IHRydWUiKQp9CgphbGxvd19jb250YWluZXJfbmFtZShwX29jaSwgaV9vY2kpIHsKICAgIHByaW50KCJhbGxvd19jb250YWluZXJfbmFtZTogc3RhcnQ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ICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwcmludCgiY2hlY2tfbW91bnQgMTogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIHByaW50KCJjaGVja19tb3VudCAxOiBpX21vdW50ID0iLCBpX21vdW50KQoKICAgIHBfbW91bnQgPT0gaV9tb3VudAoKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHByaW50KCJjaGVja19tb3VudCAyOiBpIGRlc3RpbmF0aW9uID0iLCBpX21vdW50LmRlc3RpbmF0aW9uLCAicCBkZXN0aW5hdGlvbiA9IiwgcF9tb3VudC5kZXN0aW5hdGlvbikKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgoKICAgIHByaW50KCJjaGVja19tb3VudCAyOiBpIHR5cGUgPSIsIGlfbW91bnQudHlwZV8sICJwIHR5cGUgPSIsIHBfbW91bnQudHlwZV8pCiAgICBwX21vdW50LnR5cGVfID09IGlfbW91bnQudHlwZV8KCiAgICBwcmludCgiY2hlY2tfbW91bnQgMjogaSBvcHRpb25zID0iLCBpX21vdW50Lm9wdGlvbnMpCiAgICBwcmludCgiY2hlY2tfbW91bnQgMjogcCBvcHRpb25zID0iLCBwX21vdW50Lm9wdGlvbnMpCiAgICBwX21vdW50Lm9wdGlvbnMgPT0gaV9tb3VudC5vcHRpb25zCgogICAgbW91bnRfc291cmNlX2FsbG93cyhwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpCgogICAgcHJpbnQoImNoZWNrX21vd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mVnZXgKICAgIHByaW50KCJFeGVjUHJvY2Vzc1JlcXVlc3QgMzogcF9yZWdleCA9IiwgcF9yZWdleCkKCiAgICByZWdleC5tYXRjaChwX3JlZ2V4LCBpX2NvbW1hbmQpCgogICAgcHJpbnQoIkV4ZWNQcm9jZXNzUmVxdWVzdCAzOiB0cnVlIikKfQoKUmVhZFN0cmVhbVJlcXVlc3QgewogICAgcG9saWN5X2RhdGEucmVxdWVzdF9kZWZhdWx0cy5SZWFkU3RyZWFtUmVxdWVzdCA9PSB0cnVlCn0KClVwZGF0ZUVwaGVtZXJhbE1vdW50c1JlcXVlc3QgewogICAgcG9saWN5X2RhdGEucmVxdWVzdF9kZWZhdWx0cy5VcGRhdGVFcGhlbWVyYWxNb3VudHNSZXF1ZXN0ID09IHRydWUKfQoKV3JpdGVTdHJlYW1SZXF1ZXN0IHsKICAgIHBvbGljeV9kYXRhLnJlcXVlc3RfZGVmYXVsdHMuV3JpdGVTdHJlYW1SZXF1ZXN0ID09IHRydWUKfQoKcG9saWN5X2RhdGEgOj0gewogICJjb250YWluZXJzIjogWwogICAgewogICAgICAiT0NJIjogewogICAgICAgICJWZXJzaW9uIjogIjEuMS4wLXJjLjEiLAogICAgICAgICJQcm9jZXNzIjogewogICAgICAgICAgIlRlcm1pbmFsIjogZmFsc2UsCiAgICAgICAgICAiVXNlciI6IHsKICAgICAgICAgICAgIlVJRCI6IDY1NTM1LAogICAgICAgICAgICAiR0lEIjogNjU1MzUsCiAgICAgICAgICAgICJBZGRpdGlvbmFsR2lkcyI6IFtdLAogICAgICAgICAgICAiVXNlcm5hbWUiOiAiIgogICAgICAgICAgfSwKICAgICAgICAgICJBcmdzIjogWwogICAgICAgICAgICAiL3BhdXNlIgogICAgICAgICAgXSwKICAgICAgICAgICJFbnYiOiBbCiAgICAgICAgICAgICJQQVRIPS91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbiIKICAgICAgICAgIF0sCiAgICAgICAgICAiQ3dkIjogIi8iLAogICAgICAgICAgIkNhcGFiaWxpdGllcyI6IHsKICAgICAgICAgICAgIkFtYmllbnQiOiBbXSwKICAgICAgICAgICAgIkJvdW5kaW5nIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJFZmZlY3RpdmUiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkluaGVyaXRhYmxlIjogW10sCiAgICAgICAgICAgICJQZXJtaXR0ZWQiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgICJOb05ld1ByaXZpbGVnZXMiOiB0cnVlCiAgICAgICAgfSwKICAgICAgICAiUm9vdCI6IHsKICAgICAgICAgICJQYXRoIjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiUmVhZG9ubHkiOiB0cnVlCiAgICAgICAgfSwKICAgICAgICAiTW91bnRzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Byb2MiLAogICAgICAgICAgICAic291cmNlIjogInByb2MiLAogICAgICAgICAgICAidHlwZV8iOiAicHJvYyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYiLAogICAgICAgICAgICAic291cmNlIjogInRtcGZzIiwKICAgICAgICAgICAgInR5cGVfIjogInRtcGZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgInN0cmljdGF0aW1lIiwKICAgICAgICAgICAgICAibW9kZT03NTUiLAogICAgICAgICAgICAgICJzaXplPTY1NTM2ayIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvcHRzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJkZXZwdHMiLAogICAgICAgICAgICAidHlwZV8iOiAiZGV2cHRzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5ld2luc3RhbmNlIiwKICAgICAgICAgICAgICAicHRteG1vZGU9MDY2NiIsCiAgICAgICAgICAgICAgIm1vZGU9MDYyMCIsCiAgICAgICAgICAgICAgImdpZD01IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9zaG0iLAogICAgICAgICAgICAic291cmNlIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc2htIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L21xdWV1ZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAibXF1ZXVlIiwKICAgICAgICAgICAgInR5cGVfIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMiLAogICAgICAgICAgICAic291cmNlIjogInN5c2ZzIiwKICAgICAgICAgICAgInR5cGVfIjogInN5c2ZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL3Jlc29sdi5jb25mIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXJlc29sdi5jb25mJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicm8iLAogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgIm5vZXhlYyIKICAgICAgICAgICAgXQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgIkFubm90YXRpb25zIjogewogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuYnVuZGxlX3BhdGgiOiAiL3J1bi9jb250YWluZXJkL2lvLmNvbnRhaW5lcmQucnVudGltZS52Mi50YXNrL2s4cy5pby8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuY29udGFpbmVyX3R5cGUiOiAicG9kX3NhbmRib3giLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci10eXBlIjogInNhbmRib3giLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtaWQiOiAiXlthLXowLTldezY0fSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbG9nLWRpcmVjdG9yeSI6ICJeL3Zhci9sb2cvcG9kcy8kKHNhbmRib3gtbmFtZXNwYWNlKV8kKHNhbmRib3gtbmFtZSlfWzAtOWEtZl17OH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17MTJ9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1uYW1lc3BhY2UiOiAiZGVmYXVsdCIsCiAgICAgICAgICAibmVyZGN0bC9uZXR3b3JrLW5hbWVzcGFjZSI6ICJeL3Zhci9ydW4vbmV0bnMvY25pLVswLTlhLWZdezh9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezEyfSQiCiAgICAgICAgfSwKICAgICAgICAiTGludXgiOiB7CiAgICAgICAgICAiTmFtZXNwYWNlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogImlwYyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAidXRzIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJtb3VudCIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgIk1hc2tlZFBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYWNwaSIsCiAgICAgICAgICAgICIvcHJvYy9hc291bmQiLAogICAgICAgICAgICAiL3Byb2Mva2NvcmUiLAogICAgICAgICAgICAiL3Byb2Mva2V5cyIsCiAgICAgICAgICAgICIvcHJvYy9sYXRlbmN5X3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX2xpc3QiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2Mvc2NoZWRfZGVidWciLAogICAgICAgICAgICAiL3N5cy9maXJtd2FyZSIsCiAgICAgICAgICAgICIvcHJvYy9zY3NpIgogICAgICAgICAgXSwKICAgICAgICAgICJSZWFkb25seVBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYnVzIiwKICAgICAgICAgICAgIi9wcm9jL2ZzIiwKICAgICAgICAgICAgIi9wcm9jL2lycSIsCiAgICAgICAgICAgICIvcHJvYy9zeXMiLAogICAgICAgICAgICAiL3Byb2Mvc3lzcnEtdHJpZ2dlciIKICAgICAgICAgIF0KICAgICAgICB9CiAgICAgIH0sCiAgICAgICJzdG9yYWdlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMCkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIwKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogIm92ZXJsYXlmcyIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAiZnVzZTMua2F0YS1vdmVybGF5IiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiNWE1YWFkODAwNTVmZjIwMDEyYTUwZGMyNWY4ZGY3YTI5OTI0NDc0MzI0ZDY1ZjdkNTMwNmVlOGVlMjdmZjcxZCIsCiAgICAgICAgICAgICI4MTcyNTBmMWEzZTMzNmRhNzZmNWJkM2ZhNzg0ZTFiMjZkOTU5YjljMTMxODc2ODE1YmEyNjA0MDQ4YjcwYzE4IgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0KICAgICAgXSwKICAgICAgImV4ZWNfY29tbWFuZHMiOiBbXQogICAgfSwKICAgIHsKICAgICAgIk9DSSI6IHsKICAgICAgICAiVmVyc2lvbiI6ICIxLjEuMC1yYy4xIiwKICAgICAgICAiUHJvY2VzcyI6IHsKICAgICAgICAgICJUZXJtaW5hbCI6IGZhbHNlLAogICAgICAgICAgIlVzZXIiOiB7CiAgICAgICAgICAgICJVSUQiOiAwLAogICAgICAgICAgICAiR0lEIjogMCwKICAgICAgICAgICAgIkFkZGl0aW9uYWxHaWRzIjogW10sCiAgICAgICAgICAgICJVc2VybmFtZSI6ICIiCiAgICAgICAgICB9LAogICAgICAgICAgIkFyZ3MiOiBbCiAgICAgICAgICAgICJzaCIKICAgICAgICAgIF0sCiAgICAgICAgICAiRW52IjogWwogICAgICAgICAgICAiUEFUSD0vdXNyL2xvY2FsL3NiaW46L3Vzci9sb2NhbC9iaW46L3Vzci9zYmluOi91c3IvYmluOi9zYmluOi9iaW4iLAogICAgICAgICAgICAiSE9TVE5BTUU9JChob3N0LW5hbWUpIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAiUm9vdCI6IHsKICAgICAgICAgICJQYXRoIjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiUmVhZG9ubHkiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIk1vdW50cyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9wcm9jIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJwcm9jIiwKICAgICAgICAgICAgInR5cGVfIjogInByb2MiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2IiwKICAgICAgICAgICAgInNvdXJjZSI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJzdHJpY3RhdGltZSIsCiAgICAgICAgICAgICAgIm1vZGU9NzU1IiwKICAgICAgICAgICAgICAic2l6ZT02NTUzNmsiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3B0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiZGV2cHRzIiwKICAgICAgICAgICAgInR5cGVfIjogImRldnB0cyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJuZXdpbnN0YW5jZSIsCiAgICAgICAgICAgICAgInB0bXhtb2RlPTA2NjYiLAogICAgICAgICAgICAgICJtb2RlPTA2MjAiLAogICAgICAgICAgICAgICJnaWQ9NSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvc2htIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9tcXVldWUiLAogICAgICAgICAgICAic291cmNlIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJtcXVldWUiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJzeXNmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJzeXNmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cy9mcy9jZ3JvdXAiLAogICAgICAgICAgICAic291cmNlIjogImNncm91cCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJjZ3JvdXAiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJyZWxhdGltZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0cyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3Rlcm1pbmF0aW9uLWxvZyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0ZXJtaW5hdGlvbi1sb2ckIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0bmFtZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0bmFtZSQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL3Jlc29sdi5jb25mIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXJlc29sdi5jb25mJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi92YXIvcnVuL3NlY3JldHMva3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClzZXJ2aWNlYWNjb3VudCQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdmFyL3J1bi9zZWNyZXRzL2F6dXJlL3Rva2VucyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0b2tlbnMkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2RfY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItbmFtZSI6ICJidXN5Ym94LWRlcGxveW1lbnQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci10eXBlIjogImNvbnRhaW5lciIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuaW1hZ2UtbmFtZSI6ICJkb2NrZXIuaW8vbGlicmFyeS9idXN5Ym94OmxhdGVzdCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1uYW1lc3BhY2UiOiAiZGVmYXVsdCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2tjb3JlIiwKICAgICAgICAgICAgIi9wcm9jL2tleXMiLAogICAgICAgICAgICAiL3Byb2MvbGF0ZW5jeV9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9saXN0IiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3NjaGVkX2RlYnVnIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiLAogICAgICAgICAgICAiL3N5cy9maXJtd2FyZSIKICAgICAgICAgIF0sCiAgICAgICAgICAiUmVhZG9ubHlQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAib3ZlcmxheWZzIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJmdXNlMy5rYXRh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dfc2FuZGJveF9uZXRfbmFtZXNwYWNlKHBfb2NpLCBpX29jaSkKICAgIGFsbG93X3NhbmRib3hfbG9nX2RpcmVjdG9yeShwX29jaSwgaV9vY2ksIHNfbmFtZSwgc19uYW1lc3BhY2UpCgogICAgcHJpbnQoImFsbG93X2J5X2NvbnRhaW5lcl90eXBlIDE6IHRydWUiKQp9CgphbGxvd19ieV9jb250YWluZXJfdHlwZShpX2NyaV90eXBlLCBwX29jaSwgaV9vY2ksIHNfbmFtZSwgc19uYW1lc3BhY2UpIHsKICAgIHByaW50KCJhbGxvd19ieV9jb250YWluZXJfdHlwZSAyOiBpX2NyaV90eXBlID0iLCBpX2NyaV90eXBlKQogICAgaV9jcmlfdHlwZSA9PSAiY29udGFpbmVyIgoKICAgIGlfa2F0YV90eXBlIDo9IGlfb2NpLkFubm90YXRpb25zWyJpby5rYXRhY29udGFpbmVycy5wa2cub2NpLmNvbnRhaW5lcl90eXBlIl0KICAgIHByaW50KCJhbGxvd19ieV9jb250YWluZXJfdHlwZSAyOiBpX2thdGFfdHlwZSA9IiwgaV9rYXRhX3R5cGUpCiAgICBpX2thdGFfdHlwZSA9PSAicG9kX2NvbnRhaW5lciIKCiAgICBhbGxvd19jb250YWluZXJfbmFtZShwX29jaSwgaV9vY2kpCiAgICBhbGxvd19uZXRfbmFtZXNwYWNlKHBfb2NpLCBpX29jaSkKICAgIGFsbG93X2xvZ19kaXJlY3RvcnkocF9vY2ksIGlfb2NpKQoKICAgIHByaW50KCJhbGxvd19ieV9jb250YWluZXJfdHlwZSAyOiB0cnVlIikKfQoKIyAiaW8ua3ViZXJuZXRlcy5jcmkuY29udGFpbmVyLW5hbWUiIGFubm90YXRpb24KYWxsb3dfc2FuZGJveF9jb250YWluZXJfbmFtZShwX29jaSwgaV9vY2kpIHsKICAgIHByaW50KCJhbGxvd19zYW5kYm94X2NvbnRhaW5lcl9uYW1lOiBzdGFydCIpCgogICAgY29udGFpbmVyX2Fubm90YXRpb25fbWlzc2luZyhwX29jaSwgaV9vY2ksICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItbmFtZSIpCgogICAgcHJpbnQoImFsbG93X3NhbmRib3hfY29udGFpbmVyX25hbWU6IHRydWUiKQp9CgphbGxvd19jb250YWluZXJfbmFtZShwX29jaSwgaV9vY2kpIHsKICAgIHByaW50KCJhbGxvd19jb250YWluZXJfbmFtZTogc3RhcnQiKQoKICAgIGFsbG93X2NvbnRhaW5lcl9hbm5vdGF0aW9uKHBfb2NpLCBpX29jaSwgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci1uYW1lIikKCiAgICBwcmludCgiYWxsb3dfY29udGFpbmVyX25hbWU6IHRydWUiKQp9Cgpjb250YWluZXJfYW5ub3RhdGlvbl9taXNzaW5nKHBfb2NpLCBpX29jaSwga2V5KSB7CiAgICBwcmludCgiY29udGFpbmVyX2Fubm90YXRpb25fbWlzc2luZzoiLCBrZXkpCgogICAgbm90IHBfb2NpLkFubm90YXRpb25zW2tleV0KICAgIG5vdCBpX29jaS5Bbm5vdGF0aW9uc1trZXldCgogICAgcHJpbnQoImNvbnRhaW5lcl9hbm5vdGF0aW9uX21pc3Npbmc6IHRydWUiKQp9CgphbGxvd19jb250YWluZXJfYW5ub3RhdGlvbihwX29jaSwgaV9vY2ksIGtleSkgewogICAgcHJpbnQoImFsbG93X2NvbnRhaW5lcl9hbm5vdGF0aW9uOiBrZXkgPSIsIGtleSkKCiAgICBwX3ZhbHVlIDo9IHBfb2NpLkFubm90YXRpb25zW2tleV0KICAgIGlfdmFsdWUgOj0gaV9vY2kuQW5ub3RhdGlvbnNba2V5XQogICAgcHJpbnQoImFsbG93X2NvbnRhaW5lcl9hbm5vdGF0aW9uOiBwX3ZhbHVlID0iLCBwX3ZhbHVlLCAiaV92YWx1ZSA9IiwgaV92YWx1ZSkKCiAgICBwX3ZhbHVlID09IGlfdmFsdWUKCiAgICBwcmludCgiYWxsb3dfY29udGFpbmVyX2Fubm90YXRpb246IHRydWUiK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UgcF9tb3VudCBpbiBwX29jaS5Nb3VudHMKICAgIGNoZWNrX21vdW50KHBfbW91bnQsIGlfbW91bnQsIGJ1bmRsZV9pZCwgc2FuZGJveF9pZCkKCiAgICAjIFRPRE86IGFyZSB0aGVyZSBhbnkgb3RoZXIgcmVxdWlyZWQgcG9saWN5IGNoZWNrcyBmb3IgbW91bnRzIC0gZS5nLiwKICAgICMgICAgICAgbXVsdGlwbGUgbW91bnRzIHdpdGggc2FtZSBzb3VyY2Ugb3IgZGVzdGluYXRpb24/CgogICAgcHJpbnQoImFsbG93X21vdW50OiB0cnVlIikKfQoKY2hlY2tfbW91bnQocF9tb3VudCwgaV9tb3VudCwgYnVuZGxlX2lkLCBzYW5kYm94X2lkKSB7CiAgICBwcmludCgiY2hlY2tfbW91bnQgMTogcF9tb3VudCA9IiwgcF9tb3VudCkKICAgIHByaW50KCJjaGVja19tb3VudCAxOiBpX21vdW50ID0iLCBpX21vdW50KQoKICAgIHBfbW91bnQgPT0gaV9tb3VudAoKICAgIHByaW50KCJjaGVja19tb3VudCAxOiB0cnVlIikKfQpjaGVja19tb3VudChwX21vdW50LCBpX21vdW50LCBidW5kbGVfaWQsIHNhbmRib3hfaWQpIHsKICAgIHByaW50KCJjaGVja19tb3VudCAyOiBpIGRlc3RpbmF0aW9uID0iLCBpX21vdW50LmRlc3RpbmF0aW9uLCAicCBkZXN0aW5hdGlvbiA9IiwgcF9tb3VudC5kZXN0aW5hdGlvbikKICAgIHBfbW91bnQuZGVzdGluYXRpb24gPT0gaV9tb3VudC5kZXN0aW5hdGlvbgoKICAgIHByaW50KCJjaGVja19tb3VudCAyOiBpIHR5cGUgPSIsIGlfbW91bnQudHlwZV8sICJwIHR5cGUgPSIsIHBfbW91bnQudHlwZV8pCiAgICBwX21vdW50LnR5cGVfID09IGlfbW91bnQudHlwZV8KCiAgICBwcmludCgiY2hlY2tfbW91bnQgMjogaSBvcHRpb25zID0iLCBpX21vdW50Lm9wdGlvbnMpCiAgICBwcmludCg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bWUiOiAiIgogICAgICAgICAgfSwKICAgICAgICAgICJBcmdzIjogWwogICAgICAgICAgICAiL3BhdXNlIgogICAgICAgICAgXSwKICAgICAgICAgICJFbnYiOiBbCiAgICAgICAgICAgICJQQVRIPS91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbiIKICAgICAgICAgIF0sCiAgICAgICAgICAiQ3dkIjogIi8iLAogICAgICAgICAgIkNhcGFiaWxpdGllcyI6IHsKICAgICAgICAgICAgIkFtYmllbnQiOiBbXSwKICAgICAgICAgICAgIkJvdW5kaW5nIjogWwogICAgICAgICAgICAgICIkKGRlZmF1bHRfY2FwcykiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJFZmZlY3RpdmUiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkluaGVyaXRhYmxlIjogW10sCiAgICAgICAgICAgICJQZXJtaXR0ZWQiOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgICJOb05ld1ByaXZpbGVnZXMiOiB0cnVlCiAgICAgICAgfSwKICAgICAgICAiUm9vdCI6IHsKICAgICAgICAgICJQYXRoIjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiUmVhZG9ubHkiOiB0cnVlCiAgICAgICAgfSwKICAgICAgICAiTW91bnRzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3Byb2MiLAogICAgICAgICAgICAic291cmNlIjogInByb2MiLAogICAgICAgICAgICAidHlwZV8iOiAicHJvYyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYiLAogICAgICAgICAgICAic291cmNlIjogInRtcGZzIiwKICAgICAgICAgICAgInR5cGVfIjogInRtcGZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgInN0cmljdGF0aW1lIiwKICAgICAgICAgICAgICAibW9kZT03NTUiLAogICAgICAgICAgICAgICJzaXplPTY1NTM2ayIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvcHRzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJkZXZwdHMiLAogICAgICAgICAgICAidHlwZV8iOiAiZGV2cHRzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5ld2luc3RhbmNlIiwKICAgICAgICAgICAgICAicHRteG1vZGU9MDY2NiIsCiAgICAgICAgICAgICAgIm1vZGU9MDYyMCIsCiAgICAgICAgICAgICAgImdpZD01IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9zaG0iLAogICAgICAgICAgICAic291cmNlIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NhbmRib3gvc2htIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L21xdWV1ZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAibXF1ZXVlIiwKICAgICAgICAgICAgInR5cGVfIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9zeXMiLAogICAgICAgICAgICAic291cmNlIjogInN5c2ZzIiwKICAgICAgICAgICAgInR5cGVfIjogInN5c2ZzIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgIm5vc3VpZCIsCiAgICAgICAgICAgICAgIm5vZXhlYyIsCiAgICAgICAgICAgICAgIm5vZGV2IiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL3Jlc29sdi5jb25mIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXJlc29sdi5jb25mJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicm8iLAogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgIm5vZXhlYyIKICAgICAgICAgICAgXQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgIkFubm90YXRpb25zIjogewogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuYnVuZGxlX3BhdGgiOiAiL3J1bi9jb250YWluZXJkL2lvLmNvbnRhaW5lcmQucnVudGltZS52Mi50YXNrL2s4cy5pby8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImlvLmthdGFjb250YWluZXJzLnBrZy5vY2kuY29udGFpbmVyX3R5cGUiOiAicG9kX3NhbmRib3giLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci10eXBlIjogInNhbmRib3giLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtaWQiOiAiXlthLXowLTldezY0fSQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLnNhbmRib3gtbG9nLWRpcmVjdG9yeSI6ICJeL3Zhci9sb2cvcG9kcy8kKHNhbmRib3gtbmFtZXNwYWNlKV8kKHNhbmRib3gtbmFtZSlfWzAtOWEtZl17OH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17NH0tWzAtOWEtZl17MTJ9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1uYW1lc3BhY2UiOiAiZGVmYXVsdCIsCiAgICAgICAgICAibmVyZGN0bC9uZXR3b3JrLW5hbWVzcGFjZSI6ICJeL3Zhci9ydW4vbmV0bnMvY25pLVswLTlhLWZdezh9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezR9LVswLTlhLWZdezEyfSQiCiAgICAgICAgfSwKICAgICAgICAiTGludXgiOiB7CiAgICAgICAgICAiTmFtZXNwYWNlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogImlwYyIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAidXRzIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJtb3VudCIsCiAgICAgICAgICAgICAgIlBhdGgiOiAiIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgIk1hc2tlZFBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYWNwaSIsCiAgICAgICAgICAgICIvcHJvYy9hc291bmQiLAogICAgICAgICAgICAiL3Byb2Mva2NvcmUiLAogICAgICAgICAgICAiL3Byb2Mva2V5cyIsCiAgICAgICAgICAgICIvcHJvYy9sYXRlbmN5X3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX2xpc3QiLAogICAgICAgICAgICAiL3Byb2MvdGltZXJfc3RhdHMiLAogICAgICAgICAgICAiL3Byb2Mvc2NoZWRfZGVidWciLAogICAgICAgICAgICAiL3N5cy9maXJtd2FyZSIsCiAgICAgICAgICAgICIvcHJvYy9zY3NpIgogICAgICAgICAgXSwKICAgICAgICAgICJSZWFkb25seVBhdGhzIjogWwogICAgICAgICAgICAiL3Byb2MvYnVzIiwKICAgICAgICAgICAgIi9wcm9jL2ZzIiwKICAgICAgICAgICAgIi9wcm9jL2lycSIsCiAgICAgICAgICAgICIvcHJvYy9zeXMiLAogICAgICAgICAgICAiL3Byb2Mvc3lzcnEtdHJpZ2dlciIKICAgICAgICAgIF0KICAgICAgICB9CiAgICAgIH0sCiAgICAgICJzdG9yYWdlcyI6IFsKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogImJsayIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAidGFyIiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiJChoYXNoMCkiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQobGF5ZXIwKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiZHJpdmVyIjogIm92ZXJsYXlmcyIsCiAgICAgICAgICAiZHJpdmVyX29wdGlvbnMiOiBbXSwKICAgICAgICAgICJzb3VyY2UiOiAiIiwKICAgICAgICAgICJmc3R5cGUiOiAiZnVzZTMua2F0YS1vdmVybGF5IiwKICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAiNWE1YWFkODAwNTVmZjIwMDEyYTUwZGMyNWY4ZGY3YTI5OTI0NDc0MzI0ZDY1ZjdkNTMwNmVlOGVlMjdmZjcxZCIsCiAgICAgICAgICAgICI4MTcyNTBmMWEzZTMzNmRhNzZmNWJkM2ZhNzg0ZTFiMjZkOTU5YjljMTMxODc2ODE1YmEyNjA0MDQ4YjcwYzE4IgogICAgICAgICAgXSwKICAgICAgICAgICJtb3VudF9wb2ludCI6ICIkKGNwYXRoKS8kKGJ1bmRsZS1pZCkiLAogICAgICAgICAgImZzX2dyb3VwIjogbnVsbAogICAgICAgIH0KICAgICAgXSwKICAgICAgImV4ZWNfY29tbWFuZHMiOiBbXQogICAgfSwKICAgIHsKICAgICAgIk9DSSI6IHsKICAgICAgICAiVmVyc2lvbiI6ICIxLjEuMC1yYy4xIiwKICAgICAgICAiUHJvY2VzcyI6IHsKICAgICAgICAgICJUZXJtaW5hbCI6IGZhbHNlLAogICAgICAgICAgIlVzZXIiOiB7CiAgICAgICAgICAgICJVSUQiOiAwLAogICAgICAgICAgICAiR0lEIjogMCwKICAgICAgICAgICAgIkFkZGl0aW9uYWxHaWRzIjogW10sCiAgICAgICAgICAgICJVc2VybmFtZSI6ICIiCiAgICAgICAgICB9LAogICAgICAgICAgIkFyZ3MiOiBbCiAgICAgICAgICAgICJzaCIKICAgICAgICAgIF0sCiAgICAgICAgICAiRW52IjogWwogICAgICAgICAgICAiUEFUSD0vdXNyL2xvY2FsL3NiaW46L3Vzci9sb2NhbC9iaW46L3Vzci9zYmluOi91c3IvYmluOi9zYmluOi9iaW4iLAogICAgICAgICAgICAiSE9TVE5BTUU9JChob3N0LW5hbWUpIgogICAgICAgICAgXSwKICAgICAgICAgICJDd2QiOiAiLyIsCiAgICAgICAgICAiQ2FwYWJpbGl0aWVzIjogewogICAgICAgICAgICAiQW1iaWVudCI6IFtdLAogICAgICAgICAgICAiQm91bmRpbmciOiBbCiAgICAgICAgICAgICAgIiQoZGVmYXVsdF9jYXBzKSIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIkVmZmVjdGl2ZSI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdLAogICAgICAgICAgICAiSW5oZXJpdGFibGUiOiBbXSwKICAgICAgICAgICAgIlBlcm1pdHRlZCI6IFsKICAgICAgICAgICAgICAiJChkZWZhdWx0X2NhcHMpIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgIk5vTmV3UHJpdmlsZWdlcyI6IGZhbHNlCiAgICAgICAgfSwKICAgICAgICAiUm9vdCI6IHsKICAgICAgICAgICJQYXRoIjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiUmVhZG9ubHkiOiBmYWxzZQogICAgICAgIH0sCiAgICAgICAgIk1vdW50cyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9wcm9jIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJwcm9jIiwKICAgICAgICAgICAgInR5cGVfIjogInByb2MiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2IiwKICAgICAgICAgICAgInNvdXJjZSI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJ0bXBmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJzdHJpY3RhdGltZSIsCiAgICAgICAgICAgICAgIm1vZGU9NzU1IiwKICAgICAgICAgICAgICAic2l6ZT02NTUzNmsiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3B0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiZGV2cHRzIiwKICAgICAgICAgICAgInR5cGVfIjogImRldnB0cyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJuZXdpbnN0YW5jZSIsCiAgICAgICAgICAgICAgInB0bXhtb2RlPTA2NjYiLAogICAgICAgICAgICAgICJtb2RlPTA2MjAiLAogICAgICAgICAgICAgICJnaWQ9NSIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi9kZXYvc2htIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIvcnVuL2thdGEtY29udGFpbmVycy9zYW5kYm94L3NobSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2Rldi9tcXVldWUiLAogICAgICAgICAgICAic291cmNlIjogIm1xdWV1ZSIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJtcXVldWUiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvc3lzIiwKICAgICAgICAgICAgInNvdXJjZSI6ICJzeXNmcyIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJzeXNmcyIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJub3N1aWQiLAogICAgICAgICAgICAgICJub2V4ZWMiLAogICAgICAgICAgICAgICJub2RldiIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL3N5cy9mcy9jZ3JvdXAiLAogICAgICAgICAgICAic291cmNlIjogImNncm91cCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJjZ3JvdXAiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAibm9zdWlkIiwKICAgICAgICAgICAgICAibm9leGVjIiwKICAgICAgICAgICAgICAibm9kZXYiLAogICAgICAgICAgICAgICJyZWxhdGltZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0cyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0cyQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZGV2L3Rlcm1pbmF0aW9uLWxvZyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0ZXJtaW5hdGlvbi1sb2ckIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJ3IgogICAgICAgICAgICBdCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiZGVzdGluYXRpb24iOiAiL2V0Yy9ob3N0bmFtZSIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClob3N0bmFtZSQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicnciCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvZXRjL3Jlc29sdi5jb25mIiwKICAgICAgICAgICAgInNvdXJjZSI6ICIkKHNmcHJlZml4KXJlc29sdi5jb25mJCIsCiAgICAgICAgICAgICJ0eXBlXyI6ICJiaW5kIiwKICAgICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICAgInJiaW5kIiwKICAgICAgICAgICAgICAicnByaXZhdGUiLAogICAgICAgICAgICAgICJydyIKICAgICAgICAgICAgXQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImRlc3RpbmF0aW9uIjogIi92YXIvcnVuL3NlY3JldHMva3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudCIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeClzZXJ2aWNlYWNjb3VudCQiLAogICAgICAgICAgICAidHlwZV8iOiAiYmluZCIsCiAgICAgICAgICAgICJvcHRpb25zIjogWwogICAgICAgICAgICAgICJyYmluZCIsCiAgICAgICAgICAgICAgInJwcml2YXRlIiwKICAgICAgICAgICAgICAicm8iCiAgICAgICAgICAgIF0KICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJkZXN0aW5hdGlvbiI6ICIvdmFyL3J1bi9zZWNyZXRzL2F6dXJlL3Rva2VucyIsCiAgICAgICAgICAgICJzb3VyY2UiOiAiJChzZnByZWZpeCl0b2tlbnMkIiwKICAgICAgICAgICAgInR5cGVfIjogImJpbmQiLAogICAgICAgICAgICAib3B0aW9ucyI6IFsKICAgICAgICAgICAgICAicmJpbmQiLAogICAgICAgICAgICAgICJycHJpdmF0ZSIsCiAgICAgICAgICAgICAgInJvIgogICAgICAgICAgICBdCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiQW5ub3RhdGlvbnMiOiB7CiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5idW5kbGVfcGF0aCI6ICIvcnVuL2NvbnRhaW5lcmQvaW8uY29udGFpbmVyZC5ydW50aW1lLnYyLnRhc2svazhzLmlvLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiaW8ua2F0YWNvbnRhaW5lcnMucGtnLm9jaS5jb250YWluZXJfdHlwZSI6ICJwb2RfY29udGFpbmVyIiwKICAgICAgICAgICJpby5rdWJlcm5ldGVzLmNyaS5jb250YWluZXItbmFtZSI6ICJidXN5Ym94LWRlcGxveW1lbnQiLAogICAgICAgICAgImlvLmt1YmVybmV0ZXMuY3JpLmNvbnRhaW5lci10eXBlIjogImNvbnRhaW5lciIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuaW1hZ2UtbmFtZSI6ICJkb2NrZXIuaW8vbGlicmFyeS9idXN5Ym94OmxhdGVzdCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1pZCI6ICJeW2EtejAtOV17NjR9JCIsCiAgICAgICAgICAiaW8ua3ViZXJuZXRlcy5jcmkuc2FuZGJveC1uYW1lc3BhY2UiOiAiZGVmYXVsdCIKICAgICAgICB9LAogICAgICAgICJMaW51eCI6IHsKICAgICAgICAgICJOYW1lc3BhY2VzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgIlR5cGUiOiAiaXBjIiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiVHlwZSI6ICJ1dHMiLAogICAgICAgICAgICAgICJQYXRoIjogIiIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICJUeXBlIjogIm1vdW50IiwKICAgICAgICAgICAgICAiUGF0aCI6ICIiCiAgICAgICAgICAgIH0KICAgICAgICAgIF0sCiAgICAgICAgICAiTWFza2VkUGF0aHMiOiBbCiAgICAgICAgICAgICIvcHJvYy9hY3BpIiwKICAgICAgICAgICAgIi9wcm9jL2tjb3JlIiwKICAgICAgICAgICAgIi9wcm9jL2tleXMiLAogICAgICAgICAgICAiL3Byb2MvbGF0ZW5jeV9zdGF0cyIsCiAgICAgICAgICAgICIvcHJvYy90aW1lcl9saXN0IiwKICAgICAgICAgICAgIi9wcm9jL3RpbWVyX3N0YXRzIiwKICAgICAgICAgICAgIi9wcm9jL3NjaGVkX2RlYnVnIiwKICAgICAgICAgICAgIi9wcm9jL3Njc2kiLAogICAgICAgICAgICAiL3N5cy9maXJtd2FyZSIKICAgICAgICAgIF0sCiAgICAgICAgICAiUmVhZG9ubHlQYXRocyI6IFsKICAgICAgICAgICAgIi9wcm9jL2Fzb3VuZCIsCiAgICAgICAgICAgICIvcHJvYy9idXMiLAogICAgICAgICAgICAiL3Byb2MvZnMiLAogICAgICAgICAgICAiL3Byb2MvaXJxIiwKICAgICAgICAgICAgIi9wcm9jL3N5cyIsCiAgICAgICAgICAgICIvcHJvYy9zeXNycS10cmlnZ2VyIgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfSwKICAgICAgInN0b3JhZ2VzIjogWwogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAiYmxrIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJ0YXIiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICIkKGhhc2gwKSIKICAgICAgICAgIF0sCiAgICAgICAgICAibW91bnRfcG9pbnQiOiAiJChsYXllcjApIiwKICAgICAgICAgICJmc19ncm91cCI6IG51bGwKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICJkcml2ZXIiOiAib3ZlcmxheWZzIiwKICAgICAgICAgICJkcml2ZXJfb3B0aW9ucyI6IFtdLAogICAgICAgICAgInNvdXJjZSI6ICIiLAogICAgICAgICAgImZzdHlwZSI6ICJmdXNlMy5rYXRhLW92ZXJsYXkiLAogICAgICAgICAgIm9wdGlvbnMiOiBbCiAgICAgICAgICAgICJlYzkyMjA5MDdjOWM5ZmYxMzBlNWFhYTNmZTAzODVkZTM4NTBiNzI3ZTRmMjgyMTA3N2RlZTEyMDMzNzIyMDFhIiwKICAgICAgICAgICAgIjhjYWRlNDJmOGMwNzA5YjY5YzIxNTExNGJjNTFkNDA0NjY4YTQ3ZDBhZWU0NzU2MjkwOTA4ZjZhYzY0NzFlZGQiCiAgICAgICAgICBdLAogICAgICAgICAgIm1vdW50X3BvaW50IjogIiQoY3BhdGgpLyQoYnVuZGxlLWlkKSIsCiAgICAgICAgICAiZnNfZ3JvdXAiOiBudWxsCiAgICAgICAgfQogICAgICBdLAogICAgICAiZXhlY19jb21tYW5kcyI6IFtdCiAgICB9CiAgXSwKICAiY29tbW9uIjogewogICAgImNwYXRoIjogIi9ydW4va2F0YS1jb250YWluZXJzL3NoYXJlZC9jb250YWluZXJzIiwKICAgICJzZnByZWZpeCI6ICJeJChjcGF0aCkvJChidW5kbGUtaWQpLVthLXowLTldezE2fS0iLAogICAgImlwdjRfYSI6ICIoKDI1WzAtNV18KDJbMC00XXwxXFxkfFsxLTldfClcXGQpXFwuP1xcYil7NH0iLAogICAgImlwX3AiOiAiWzAtOV17MSw1fSIsCiAgICAic3ZjX25hbWUiOiAiW0EtWjAtOV9cXC5cXC1dKyIsCiAgICAiZG5zX2xhYmVsIjogIlthLXpBLVowLTlfXFwuXFwtXSsiLAogICAgImRlZmF1bHRfY2FwcyI6IFsKICAgICAgIkNBUF9DSE9XTiIsCiAgICAgIC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iwKICAgICAgICAiXiQoc3ZjX25hbWUpX1NFUlZJQ0VfUE9SVD0kKGlwX3ApJCIsCiAgICAgICAgIl4kKHN2Y19uYW1lKV9TRVJWSUNFX1BPUlRfJChkbnNfbGFiZWwpPSQoaXBfcCkkIiwKICAgICAgICAiXiQoc3ZjX25hbWUpX1BPUlQ9dGNwOi8vJChpcHY0X2EpOiQoaXBfcCkkIiwKICAgICAgICAiXkFaVVJFX0NMSUVOVF9JRD1bQS1GYS1mMC05LV0qJCIsCiAgICAgICAgIl5BWlVSRV9URU5BTlRfSUQ9W0EtRmEtZjAtOS1dKiQiLAogICAgICAgICJeQVpVUkVfRkVERVJBVEVEX1RPS0VOX0ZJTEU9L3Zhci9ydW4vc2VjcmV0cy9henVyZS90b2tlbnMvYXp1cmUtaWRlbnRpdHktdG9rZW4kIiwKICAgICAgICAiXkFaVVJFX0FVVEhPUklUWV9IT1NUPWh0dHBzOi8vbG9naW5cXC5taWNyb3NvZnRvbmxpbmVcXC5jb20vJCIKICAgICAgXQogICAgfSwKICAgICJDb3B5RmlsZVJlcXVlc3QiOiBbCiAgICAgICJeJChjcGF0aCkvIgogICAgXSwKICAgICJFeGVjUHJvY2Vzc1JlcXVlc3QiOiB7CiAgICAgICJjb21tYW5kcyI6IFtdLAogICAgICAicmVnZXgiOiBbXQogICAgfSwKICAgICJSZWFkU3RyZWFtUmVxdWVzdCI6IHRydWUsCiAgICAiVXBkYXRlRXBoZW1lcmFsTW91bnRzUmVxdWVzdCI6IGZhbHNlLAogICAgIldyaXRlU3RyZWFtUmVxdWVzdCI6IGZhbHNlCiAgfQp9 spec: runtimeClassName: kata-cc containers: diff --git a/src/libs/oci/src/lib.rs b/src/libs/oci/src/lib.rs index d48ad404007a..dbfab6c08d16 100644 --- a/src/libs/oci/src/lib.rs +++ b/src/libs/oci/src/lib.rs @@ -8,7 +8,13 @@ extern crate serde; extern crate serde_derive; extern crate serde_json; +#[cfg(target_family = "unix")] use libc::{self, mode_t}; + +#[cfg(target_family = "windows")] +#[allow(non_camel_case_types)] +type mode_t = u32; + use std::collections::HashMap; mod serialize;