def serialize_yaml_tofile(filename, resource):
    """
    Serializes a K8S resource to YAML-formatted file.
    """
    stream = file(filename, "w")
    yaml.dump(resource, stream, default_flow_style=False)
def serialize_yaml_tofile ( filename , resource ) : stream = file ( filename , "w" ) yaml . dump ( resource , stream , default_flow_style = False )
Serializes a K8S resource to YAML-formatted file.