Skip to content

Commit

Permalink
Fix use of regex in yamale schema (#830)
Browse files Browse the repository at this point in the history
This will be fixed:

<unknown>:1: SyntaxWarning: invalid escape sequence '\/'
<unknown>:1: SyntaxWarning: invalid escape sequence '\/'
<unknown>:1: SyntaxWarning: invalid escape sequence '\w'
<unknown>:1: SyntaxWarning: invalid escape sequence '\/'
<unknown>:1: SyntaxWarning: invalid escape sequence '\/'
<unknown>:1: SyntaxWarning: invalid escape sequence '\/'
<unknown>:1: SyntaxWarning: invalid escape sequence '\/'

Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored Sep 6, 2024
1 parent 25e0bd2 commit e69398a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions etc/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ images: list(include('image'), min=1)
image:
enable: bool()
format: enum('aki', 'ari', 'ami', 'raw', 'iso', 'vhd', 'vdi', 'qcow2', 'vmdk')
latest_checksum_url: regex('^(http|ftp)s?:\/\/\w+.*', name='valid URL', required=False)
latest_url: regex('^(http|ftp)s?:\/\/\w+.*', name='valid URL', required=False)
latest_checksum_url: regex(r'^(http|ftp)s?:\/\/\w+.*', name='valid URL', required=False)
latest_url: regex(r'^(http|ftp)s?:\/\/\w+.*', name='valid URL', required=False)
login: str()
meta: include('meta', required=True)
min_disk: int(min=0)
Expand Down Expand Up @@ -42,15 +42,15 @@ meta:
---
versions:
build_date: any(day(), timestamp())
checksum: regex('\w+:([a-f0-9]{32}|[a-f0-9]{40}|[a-f0-9]{64}|[a-f0-9]{128})$', name='valid checksum', required=False)
checksums_url: regex('^(http|ftp)s?:\/\/\w+.*', name='valid URL', required=False)
checksum: regex(r'\w+:([a-f0-9]{32}|[a-f0-9]{40}|[a-f0-9]{64}|[a-f0-9]{128})$', name='valid checksum', required=False)
checksums_url: regex(r'^(http|ftp)s?:\/\/\w+.*', name='valid URL', required=False)
hidden: bool(required=False)
image_description: str(required=False)
meta: include('meta', required=False)
os_version: str(required=False)
source: regex('^(http|ftp)s?:\/\/\w+.*|^private$', name='valid URL or private', required=False)
url: regex('^(http|ftp)s?:\/\/\w+.*|^(file:|file:///)\w+.*', name='valid URL')
mirror_url: regex('^(http|ftp)s?:\/\/\w+.*|^(file:|file:///)\w+.*', name='valid URL', required=False)
source: regex(r'^(http|ftp)s?:\/\/\w+.*|^private$', name='valid URL or private', required=False)
url: regex(r'^(http|ftp)s?:\/\/\w+.*|^(file:|file:///)\w+.*', name='valid URL')
mirror_url: regex(r'^(http|ftp)s?:\/\/\w+.*|^(file:|file:///)\w+.*', name='valid URL', required=False)
version: str()
visibility: enum('public', 'private', 'community', 'shared', required=False)
id: regex('^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$', required=False)
id: regex(r'^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$', required=False)

0 comments on commit e69398a

Please sign in to comment.