x[hhdZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl m Z ddlmZddlmZddlmZdd lmZmZmZmZmZmZmZmZddlZdd lmZm Z m!Z!m"Z"dd l#m$Z$dd l%m&Z&m'Z'dd l(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1m2Z2 ddl3m4Z4 ddl7m8Z8m9Z9dZ:ejve<Z=dZ>dZ?dZ@dZAeBe&jDcgc] }|ddk(s |c}ZDerddlZddlEmFZFmGZGGddeGZHneIZHGdde4ZJGd d!eZKeeKZLGd"d#eZMeMjd$e>ieMjd$e@ieMjd$e?ieMjd$e@iiZRGd%d&eZSGd'd(eZTGd)d*eZUdd+d,d-eLd.eeVd/eVd0eVfd1ZWGd2d3eXZYGd4d5eYZZd6Z[ ddd7eId0eVfd8Z\d0ee4fd9Z]eJfde^d:eId;eVdZ`eJfds@r3r5r5[s$$$$r2r5c.eZdZUeed<eed<defdZy) SchemaProblempathr6returnc8|jd|jS)N: )rCr6r<s r3formatzSchemaProblem.formatjs))Bt||n--r2N)r+r,r-r.r/rHr1r2r3rBrBfs I L..r2rBc eZdZdZdZdZdZdZy) SchemaTypeaSupported schema types are either cloud-config or network-config. Vendordata and Vendordata2 format adheres to cloud-config schema type. Cloud Metadata is unique schema to each cloud platform and likely will not be represented in this enum. z cloud-confignetwork-configznetwork-config-v1znetwork-config-v2N)r+r,r-__doc__ CLOUD_CONFIGNETWORK_CONFIGNETWORK_CONFIG_V1NETWORK_CONFIG_V2r1r2r3rJrJqs"L%N++r2rJlatestc&eZdZdZdZdZdZdZdZy)InstanceDataTypez-Types of instance data provided to cloud-initz user-datarKz vendor-dataz vendor2-datac|jSr9)valuerGs r3__str__zInstanceDataType.__str__s zzr2N) r+r,r-rLUSERDATArN VENDORDATA VENDOR2DATArVr1r2r3rSrSs7H%NJ Kr2rSc,eZdZUeed<eed<eed<y)InstanceDataPart config_type schema_type config_pathN)r+r,r-rSr/rJr.r1r2r3r[r[s!!r2r[c"eZdZUeed<eed<y)UserDataTypeAndDecodedContent userdata_typecontentN)r+r,r-r.r/r1r2r3r`r`s  Lr2r`, prefix separatorschema_problemsrerfrDcN|jtd|}|r||}|S)Nc"|jSr9)rH)ps r3z)_format_schema_problems..s QXXZr2)joinmap)rgrerf formatteds r3_format_schema_problemsros1 s#7IJI hyk* r2cJeZdZdZ ddeedeeffd ZdefdZxZ S)SchemaValidationErrorz.handle_problemssB6!d3x=12H .xG GGOr2zCloud config schema errors: rx"Cloud config schema deprecations: N)rrrsr:r;)r<rrrsr}r6r>s @r3r;zSchemaValidationError.__init__sH - 1 $3 7$   !r2rDc,t|jSr9)boolrrrGs r3 has_errorsz SchemaValidationError.has_errorssD&&''r2)NN) r+r,r-rLr SchemaProblemsr;rrr?r@s@r3rqrqs<F378< "/ "&n5 "D(D(r2rqceZdZdZy)"SchemaValidationInvalidHeaderErrorz>Raised when no valid header is declared in the user-data file.N)r+r,r-rLr1r2r3rrsHr2rc ddlm}|jj |dxst |t fS#t$rYywxYw)zWTYPE_CHECKER override allowing bytes for string type For jsonschema v. 3.0.0+ r)Draft4ValidatorFstring) jsonschemar ImportError TYPE_CHECKERis_type isinstancebytes)checkerinstancers r3is_schema_byte_stringrsO .  ' ' / /(  ( Huh '( s7 AAconfigcdtffd }|r|ngd}djt||}jdd}||j S)zcombine description with new/changed/deprecated message deprecated/changed/new keys require a _version key (this is verified in a unittest), a _description key is optional keycj|syj|dd}j|dd|d}|jd|d|}rd|Sd |jd S) Nru _description_versionz z in version .  z **)get capitalizestrip)rkey_descriptionvmsgannotaters r3format_messagez:_add_deprecated_changed_or_new_msg..format_messageszzSE# **uL%92> JJe8 uC D !",qcO3DE se9 syy{m1%%r2)r!changednewru description)r.rlrmrrstrip)rr filter_keyr filter_keyschanged_new_deprecatedrs`` r3"_add_deprecated_changed_or_new_msgrs` &C &"! &F  WWS%EF**]B/K]12 3 : : <>,#C#G#G$c&"ou sK(==%/ '',chhqkV3##C( ]j (    $ ]Z 'SXXJ5L)!* r2rr error_typec#fK|r+t|d|g}|||jddyyw)zJsonschema validator for `deprecated` items. It yields an instance of `error_type` if deprecated that must be handled, otherwise the instance is consider faulty. T)rrdeprecated_versiondevelN)rr) _validatorr! _instancerrrrs r3rr4s>0 Tzl fjj)=wGHH s/1c# Kddlm}g}g}d}t|D]\} } t|j || | } tt fd| } tt fd| } | s|j | nrt|tr1d|vr-d| jd d vrd |d| d vr d }| Ed {|j | |s ||t|d||Ed {y 7@7w)aJsonschema validator for `anyOf`. It treats occurrences of `error_type` as non-errors, but yield them for external processing. Useful to process schema annotations, as `deprecated`. Cloud-init's network schema under the `config` key has a complexity of allowing each list dict item to declare it's type with a `type` key which can contain the values: bond, bridge, nameserver, physical, route, vlan. This schema 'flexibility' makes it hard for the default jsonschema.exceptions.best_match function to find the correct schema failure because it typically returns the failing schema error based on the schema of greatest match depth. Since each anyOf dict matches the same depth into the network schema path, `best_match` just returns the first set of schema errors, which is almost always incorrect. To find a better schema match when encountering schema validation errors, cloud-init network schema introduced schema $defs with the prefix `anyOf_type_`. If the object we are validating contains a 'type' key, and one of the failing schema objects in an anyOf clause has a name of the format anyOf_type_XXX, raise those schema errors instead of calling best_match. r) best_matchF schema_pathct| Sr9rers r3rkz_anyOf..oAz)B%Br2ct|Sr9rrs r3rkz_anyOf..qZ:6r2r anyOf_typez$refru anyOf_type_TNz, is not valid under any of the given schemas)context) jsonschema.exceptionsr enumeraterzdescendfilterextendrrrr) validatoranyOfr_schemarr all_errorsall_deprecationsskip_best_matchindex subschemaall_errserrs deprecationss ` r3_anyOfrHs*<1JO%e, y   h u  E FBHMN 6 A   # #L 1  x &(" fb 99Xf-./9V3DD#'$+ .Z( (@H J     s$B.rr2ct|Sr9rrs r3rkz_oneOf..rr2Nrcc32K|]}t|ywr9)repr).0rs r3 z_oneOf..s@6$v,@z is valid under each of ) rrzrrrris_validrrlr)roneOfrrr subschemasrrrrrrr first_validis more_validreprss ` r3_oneOfrs05!JJ&Dy   h u  E FBHMN 6 A #K  # #L 1 $D.j(CCC *N1i.@.@1.M!NJN+& @Z@@.6 >  $## DN $s7BD !D" D +DD AD DD D cddlm}m}ddlm}t |j }ddi|dd<i}d|d <|jjdt}d |i}t|j}ttd |t<ttd |d <t|d<t |d<|d||dd|}dd}dd} |} t#|dr| } | |_||fS)zGet metaschema validator and format checker Older versions of jsonschema require some compatibility changes. @returns: Tuple: (jsonschema.Validator, FormatChecker) @raises: ImportError when jsonschema is not present r)r FormatChecker)createrrrlabelFadditionalProperties type_checkerr!)rrrrdraft4) meta_schema validatorsr7cXtd|j||}t|dduS)gOverride version of `is_valid`. It does ignore instances of `SchemaDeprecationError`. c$t|t Sr9rr5rs r3rkzFget_jsonschema_validator..is_valid_pre_4_0_0..*)r2N)r iter_errorsnextr<rr__rs r3is_valid_pre_4_0_0z4get_jsonschema_validator..is_valid_pre_4_0_0s9     Xw /   FD!T))r2cvtd|j|j|}t|dduS)rc$t|t Sr9rrs r3rkz.is_valid..rr2)rN)revolverrrs r3rz*get_jsonschema_validator..is_validsB   KKwK ' 3 3H =   FD!T))r2rr1r9)rrrjsonschema.validatorsrr META_SCHEMArredefinerr VALIDATORSrrDEPRECATED_KEYrrrr) rrrrvalidator_kwargsrrcloudinitValidatorrr is_valid_fns r3get_jsonschema_validatorrs:, ?667K+1();K g&*/K&'"//88'L   o001J!( !MJ~#J9EJy Jw Jw   * *%K!8, #.  ..r2c 8ddlm} |j|y#|$rz}|rXtt dj |j Dcgc] }t|ncc}wc}|jg|tjd|Yd}~yd}~wwxYw)a Validate provided schema meets the metaschema definition. Return strict Validator and FormatChecker for use in validation @param validator: Draft4Validator instance used to validate the schema @param schema: schema to validate @param throw: Sometimes the validator and checker are required, even if the schema is invalid. Toggle for whether to raise SchemaValidationError or log warnings. @raises: ImportError when jsonschema is not present @raises: SchemaValidationError when the schema is invalid r) SchemaError.rrzGMeta-schema validation failed, attempting to validate config anyway: %sN) rr check_schemarqrBrlrCr.r6LOGwarning)rrthrowrrrjs r3validate_cloudconfig_metaschemar s2 v&   '!#((!;Q#a&!;!;? J   I77<< +LML~&Gg&..)K|[u5 XF F   ""9- ww~~i  i  #33K@5.#&,(/ / -!006678++ G,,2234%%  G M "  '..AFF.I*199+6    s F G% A G  G%zValidating schemar]strict_metaschemalog_deprecationsc ddlm}|tjk(rAt |}|dk(rtj }n|dk(rtj }t|}|tj k(rt|||ry|ry| t|} t\} } |rt| |d| || } g} g} g}t| j|d D];}d j!|j"Dcgc] }t%|c}}|sE|j&dk(r6|j(|k(r't+j,d|j.}|r|d}t1|t2r|j4dk(s.t7j8|j4t:j<r&| j?tA||j.|j?tA||j.| j?tA||j.>|rH|r"tC|d}tjE|| r"tC| d}tjG||r| s| s|rtI| | |z| rB|rtC| |jJdd}n|jJd}tjM|y#t$rtjd YywxYwcc}w)aPValidate provided config meets the schema definition. @param config: Dict of cloud configuration settings validated against schema. Ignored if strict_metaschema=True @param schema: jsonschema dict describing the supported schema definition for the cloud config module (config.cc_*). If None, validate against global schema. @param schema_type: Optional SchemaType. One of: SchemaType.CLOUD_CONFIG or SchemaType.NETWORK_CONFIG_V1 or SchemaType.NETWORK_CONFIG_V2 Default: SchemaType.CLOUD_CONFIG @param strict: Boolean, when True raise SchemaValidationErrors instead of logging warnings. @param strict_metaschema: Boolean, when True validates schema using strict metaschema definition at runtime (currently unused) @param log_details: Boolean, when True logs details of validation errors. If there are concerns about logging sensitive userdata, this should be set to False. @param log_deprecations: Controls whether to log deprecations or not. @raises: SchemaValidationError when provided config does not validate against the provided schema. @raises: RuntimeError when provided config sourced from YAML is not a dict. @raises: ValueError on invalid schema_type not in CLOUD_CONFIG or NETWORK_CONFIG_V1 or NETWORK_CONFIG_V2 r available)rrrTF)rz5Ignoring schema validation. jsonschema is not present)format_checkerc|jSr9)rCrs r3rkz-validate_cloudconfig_schema..s QVVr2)rrrz#.*\('(?P.*)' was unexpected\)namerz"Deprecated cloud-config provided: rxr%r&rdr')'cloudinit.net.netplanr@rJrNrrPrO get_schemar;rrrrr)ryrrlrCr.rrrematchr6rr5r7rshould_log_deprecationrDEPRECATION_INFO_BOUNDARYrrBroinfor!rqrUr)rrr]rr<rr=netplan_availablenetwork_versionr rrrrinfo_deprecations schema_errorrjrC prop_matchr6detailss r3validate_cloudconfig_schemarSsHEj///08 a $66K  !$66KK(j222 *!&k    ~K(.F.H+ ]  +"F% #6-/JIF#%L(*f%+;E xx):):;AQ;<&&*@@##v-6 8L8LJ!&)  0 $$/33 (((*L*L##M$ 8L8L$MN!((!$ (<(<= MM-l.B.BC D=E@ -!;G HHW  -;G NN7 # 6\->#FL;L,LMM -%++,,HIG$$%&%%  G Q  IJtt}|D]\}}tjd|}|r1|j \}}|t |j |n#d}||j|j ||udj||}|S)Nz&format-l(?P\d+)\.c(?P\d+).*zLine {line} column {col}: {msg})r#r$r) rrzrHrIgroupsintrrZrH)r<rgerrors_by_linerCrrIr#r$s r3_build_errors_by_linez _Annotator._build_errors_by_line2s=H=N( ID#HHFME!LLN cs4y)005t0067>>sC7>>3C? r2r|labelsfooterr label_prefixcz|D]5}||}|j||jd|d||dz }7|S)Nr]rFrB)r)r|rerfrrgproblemrs r3 _add_problemsz_Annotator._add_problemsBsV  G#nUG,E MM% MMBugRy1 2 QJE    r2linesrcdeprecations_by_linec g}g}g}d}d}t|dD]y\} } || } || } | s| rUg} j| | ||d}j| | ||d}|j| dzdj| zi|j| {|j t fdt dd |fd |ff|S) NrBE)rgDz # ,c"j|Sr9)r_)seqr<s r3rkz._Annotator._annotate_content..qs.D..4r2ct|dS)NrB)r)rrs r3rkz._Annotator._annotate_content..ssSV r2Errors Deprecations)rrjrrlrrmr)r<rkrcrlannotated_content error_footerdeprecation_footer error_indexdeprecation_index line_numberr#rrres` r3_annotate_contentz_Annotator._annotate_contentQs "$ (* !*5!!4 / K#K0F/ #7 yy*++r2N)ru)r+r,r-r.rr; staticmethodr r_rrdrbrjr|rr1r2r3rUrU$s(((7S749777^   s) S  S       *!Cy*!*!# *! c *!X ,% ,, , ,r2rUrrrsrVrWrrrscJt||j|xsg|xsgS)aReturn contents of the cloud-config file annotated with schema errors. @param cloudconfig: YAML-loaded dict from the original_content or empty dict if unparsable. @param original_content: The contents of a cloud-config file @param schemamarks: Dict with schema marks. @param schema_errors: Instance of `SchemaProblems`. @param schema_deprecations: Instance of `SchemaProblems`. @return Annotated schema )rUr)rVrWrrrss r3r3r3s/$ & 4 = =06B r2rbc ddlm}||vrgSg}t|jdD]F\}}|j |s|j t d|d|j|dH|S)aAnnotate and return schema validation errors in merged cloud-config.txt When merging multiple cloud-config parts cloud-init logs an error and ignores any user-data parts which are declared as #cloud-config but cannot be processed. the handler.cloud_config module also leaves comments in the final merged config for every invalid part file which begin with MERGED_CONFIG_SCHEMA_ERROR_PREFIX to aid in triage. r)MERGED_PART_SCHEMA_ERROR_PREFIXrBzformat-lz.c1zIgnored invalid user-data: )cloudinit.handlers.cloud_configrr splitlines startswithrrBreplace)rbrrline_numr#s r3)process_merged_cloud_config_part_problemsrsP&g5 "$F#G$6$6$8!< $ ??: ; MMxj,LL75   Mr2r^instance_data_pathc ddlm}m}m}m}t |}d}|dk(r ||||}d }t |}|sG|jd \} } } tt|d |d | ddjtg|dk7rtd|dt||S#|$r} t t|dg| d} ~ w|$r#} tdt| zd Yd} ~ d} ~ w|$r } tt| d Yd} ~ d} ~ wwxYw)a Return tuple of user-data-type and rendered content. When encountering jinja user-data, render said content. :return: UserDataTypeAndDecodedContent :raises: SchemaValidationError when non-jinja content found but header declared ## template: jinja. :raises JinjaSyntaxParsingException when jinja syntax error found. :raises JinjaLoadError when jinja template fails to load. r)JinjaLoadErrorJinjaSyntaxParsingException NotJinjaErrorrender_jinja_payload_from_filez format-l1.c1z text/jinja2zRDetected type '{user_data_type}' from header. But, content is not a jinja templateNz&Failed to render templated user-data. Tsys_exitz format-l2.c1r&z!Unrecognized user-data header in z: "z%". Expected first line to be one of: rctext/cloud-configzUser-data type 'z.' not currently evaluated by cloud-init schema)!cloudinit.handlers.jinja_templaterrrrrrqrBrr. partitionrrlUSERDATA_VALID_HEADERSr2r`) r^rbrrrrruser_data_typeschema_positionr header_liner9s r3&_get_config_type_and_rendered_userdatarsb +73N$O& )4&8G().w7 #--d3 Q0#7 }E$ &&&*ii0F&G%HJ    . . ~./$ $  ) AAI '!'? +  83q6A   ) #a&4 ( ( )s/ B D %B<<D C""D *DD c ddlm}t|}|std|jd|dy|t j fvrt|j|}n t|||}|jdvry|j}t|} |rtj|\} } ntj|} i} t9| t:s|st=|jd|d|t j k(r| j?d| s tdytA| }|dk(r2t jB}tE| d|ry|r,tdy|dk(rt jF}tI|} tK| ||ddstd|jdy y#tj $r} dx} }d }t#| d rt%| d r t%| d }n$t#| d rt%| d r t%| d }|r|j&dz} |j(dz}| j+t-d j/| | dj/|t1| t3| }|r!tt5|i|j6|| d } ~ wwxYw#t2$r} | jMr| | j6z } |r#tt5|| | | jNn/| jNr#tQ| jNdd}t|| r t3| | Yd } ~ yd } ~ wwxYw)aValidate cloudconfig file adheres to a specific jsonschema. @param config_path: Path to the yaml cloud-config file to parse, or None to default to system userdata from Paths object. @param schema: Dict describing a valid jsonschema to validate against. @param schema_type: One of SchemaType.NETWORK_CONFIG or CLOUD_CONFIG @param annotate: Boolean set True to print original config file with error annotations on the offending lines. @param instance_data_path: Path to instance_data JSON, used for text/jinja rendering. :return: True when validation was performed successfully :raises SchemaValidationError containing any of schema_errors encountered. :raises RuntimeError when config_path does not exist. rr?zEmpty 'z ' found at z. Nothing to validate.F)rKrrBN context_mark problem_markr!r"zFile {0} is not valid YAML. {1}rrz is not a YAML dict.rz:Skipping network-config schema validation on empty config.rAT)rrrzSSkipping network-config schema validation for version: 2. No netplan API available.)rr]rr=z Skipping z2 schema validation. Jsonschema dependency missing.rr~rcrd))rFr@rr2rUrJrNr`rrarbrrr1yaml safe_load YAMLErrorrgetattrr#r-rrBrHr.rqr3rrrr RuntimeErrorrrrPr;rOrGrSrrsro)r^rr]rrrMdecoded_contentdecoded_configrbr cloudconfigr:rr#r-markrPrNr6s r3validate_cloudconfig_filersf,E$[1O    + / z00226    @ *< ##,$$G 6w ?F" !)!9!9'!B K..1KE2 k4 ($$%Q{m3GH j///y+6 N O0= a $66K.*4("$1  !$66K ,F!E* #"   K--./22  B k >>"v 1n %'!^*D1n-D Q 'GA~,F1n-D 99q=D[[1_F '..Df.E188c!fM  -V4  *R|/I/I  !/"@ !E <<> aoo %F  *"(()(=(=   " "-%%;G 'N 'f=1 D  +Es22F.)J..J+C%J&&J+. M7BL>>Mctjjtjjtjj t dS)Nschemas)r*rCrldirnameabspath__file__r1r2r3get_schema_dirrs1 77<<(ABI NNr2ctjjtt|d}d} t j t|}|S#ttf$r&tjd|j|icYSwxYw)ziReturn jsonschema for a specific type. Return empty schema when no specific schema file exists. rQNz 1CSC 12a7 A  {{t''  " ({ 2s A+A+c jdtdtdtdtfd} td}|jr |j}n:tjd k7r|jd }n|jd }g}|jr|j rt#|j }nt"j$}|t"j&k(rt(j&}nt(j*}|j-t/|||jnRtjd k7r t1dd||dd}|j-t/t(j*t"j$|t/t(j2t"j$||ddt/t(j4t"j$||ddt/t(j&t"j&|j7dxsdg} | D]J} | j8stj:j=| j8s:|j-| Ltj:j=|d j8st1d|d j8ddd||fS#ttf$r?}|j t k(r tjdt}nYd }~d }~wt$r#t}tjd YwxYw)aReturn appropriate instance-data.json and instance data parts Based on command line args, and user permissions, determine the appropriate instance-data.json to source for jinja templates and a list of applicable InstanceDataParts such as user-data, vendor-data and network-config for which to validate schema. Avoid returning any InstanceDataParts when the expected config_path does not exist. :return: A tuple of the instance-data.json path and a list of viable InstanceDataParts present on the system. pathsprimary_path_keyraw_fallback_path_keyrDc6|j|xsd}tt5tj|j s?|j|xsd}tj|j r |cdddSddd|S#1swY|SxYw)akGet processed data path when non-empty of fallback to raw data path. - When primary path and raw path exist and are empty, prefer primary path. - When primary path is empty but the raw fallback path is non-empty, this indicates an invalid and ignored raw user-data was provided and cloud-init emitted a warning and did not process unknown raw user-data. In the case of invalid raw user-data header, prefer raw_fallback_path_key so actionable sensible warnings can be reported to the user about the raw unparsable user-data. ruN) get_ipathrFileNotFoundErrorr*statst_size)rrrprimary_datapathraw_paths r3get_processed_or_fallback_pathzBget_config_paths_from_args..get_processed_or_fallback_paths"!??+;<B ' ( $77+,44 ??+@AGR778$,,#  $ $ $    $  s ABBtrust)fetch_existing_datasourcez=Using default instance-data/user-data paths for non-root userNzEdatasource not detected, using default instance-data/user-data paths.rrinstance_data_sensitivezNUnable to read system userdata or vendordata as non-root user. Try using sudo.Tr cloud_config userdata_rawvendor_cloud_configvendordata_rawvendor2_cloud_configvendordata2_rawrruz Config file z does not existz Error: {}fmtr)rr.rrrerrnorrr)rrrr*getuidrrr]rJrMrNrSrWrr[rrXrYrr^rCr.) rrrrr config_filesr]instancedata_type userdata_filesupplemental_config_files data_parts r3get_config_paths_from_argsrs    #   2 A !//  "..?"../HI+-L    $T%5%56K$11K *33 3 0 ? ?  0 9 9  . T=M=M N  99;!  )  7 >>    ))''    ++''.02B   ,,''.13D   //)) 017R = !*3 /I$$ 8M8M)N##I. / 77>>,q/55 6 <?667 G | ++a W  77f  IIO #$E   '    .  s J::L2 4L+L21L2c t|t}t|\}}d}tt |dkD}|r&t ddj d|Dzd}g}t|dD]\}} d} |r)t d|d | jd | jd | jtjk(rt| j} n|} t| j| | j|j|} | s|jr | j} nt!| j} t |d | |r%t%dj d|Dddyy#t"$rr} |js@t |d | jd| jt%t!| |dz|j'| jYd} ~ wd} ~ wt($rY} t |d | jt%t!| |dz|j'| jYd} ~ d} ~ wwxYw)z@Handle provided schema args and perform the appropriate actions.rurBz!Found cloud-config data types: %srcc3FK|]}t|jywr9)r.r\)rcfg_parts r3rz%handle_schema_args..sOhH001Os!z Fr&rz at :z Valid schema zInvalid rz Error: {} )rNc32K|]}t|ywr9)r.)rrs r3rz%handle_schema_args..sD*c*oDrzError: Invalid schema: {} Tr)rrGrrrr2rlrr\r^r]rJrNrrrr.rqrrr)rErrrrnested_output_prefixmulti_config_output error_typesidxrperformed_schema_validation cfg_schemacfgrs r3handle_schema_argsrtsT4 ,K'A$'G$ s<0145 /iiO,OO P  $K"<3'E X&+#  SEH001h6J6J5K1M    :#<#< <#H$8$89J$J E*C$$$$ " + '.+##"..Ch223C-.mC7CDO'EP IID D D- -% 5==+,- ,,-Qx/C/C.DFF,}<   x33 4 4 5 )*(83G3G2JK L #a&2]B C   x33 4 4 5s&-E44 I=A'G** I6AI  Ic\tjtdtjddy)zProvide a stub for backwards compatibility. This function is no longer used, but earlier versions of modules required this function for documentation purposes. This is a stub so that custom modules do not break on upgrade. z24.4zbThe 'get_meta_doc()' function is deprecated and will be removed in a future version of cloud-init.r1)loggerr7requested_levelrrru)rlog_with_downgradable_levelrloggingWARNING)_args_kwargss r3 get_meta_docrs.)) 1  r2cLt}td|jy)zDTool to validate schema of a cloud-config file or print schema docs.rr)rr parse_argsrs r3mainrs \F+V->->-@A r2__main__)FN)T)FFTr9)xrLrrrr*rHr/sys collectionsr contextlibrcopyrrrrr functoolsrr0r r r r r rrrr cloudinitrrrrcloudinit.cmd.develrcloudinit.handlersrrcloudinit.helpersrcloudinit.log.log_utilrcloudinit.sourcesrcloudinit.temp_utilsrcloudinit.utilrrrrr Exceptionnetplanrr r( getLoggerr+rUSERDATA_SCHEMA_FILENETWORK_CONFIG_V1_SCHEMA_FILENETWORK_CONFIG_V2_SCHEMA_FILEr rykeysrtyping_extensionsr#r$r&rr5rBrrJrMrNrOrPrrSr[r`r.ro ValueErrorrqrrrrrrrrrrrbrr;timedrSrUrr3rrrrrGrrrrrrexit)ts0r3rsjL  #    @@.I#(9(5 *!6 g!5 ? ? (#((*:1adckQ: 88Y8J$_$.J.m$ , ,"&/   /#  /#  t z J! #  SM    &(J&(RI)>I (.2 =  = =FD4IN#9 II  I  I Y I2#9 @ Y @ P#9 '$ Y '$TS/l  t  F)4)HSM) \\ \\ \  \~&'"(55#"L L TNLL  L  L  LL L(L^f,f,Z/348 N+  ".1   3: .  -B)-BBBB BB! BB# BBP)55(, JJ JJ J ! J  JZOO*4)@)@JT*8v  z, 3%& &'z,z= @s(  z CHHTVO- O ! !0;s0L L! L/$L/LL!L,+L,