Skip to content

Commit a014b0b

Browse files
committed
Update sitemap generator with current series
This hasn't been updated in four years, we need to get current content into the sitemap and drop unmaintained releases. Change-Id: If2f9a3459f7570b92328002ca8c13ebcca67f54c
1 parent a5cadb2 commit a014b0b

2 files changed

Lines changed: 19 additions & 11 deletions

File tree

‎sitemap/generator/spiders/sitemap_file.py‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@ class SitemapSpider(spiders.CrawlSpider):
3131
name = 'sitemap'
3232

3333
MAINT_SERIES = [
34-
'ocata',
35-
'pike',
36-
'queens',
37-
'rocky',
38-
'stein',
39-
'train',
40-
'ussuri',
34+
'zed',
35+
'2023.1',
36+
'2023.2',
37+
'2024.1',
4138
]
4239
MAINT_RELEASES_PAT = re.compile('^.*/(' + '|'.join(MAINT_SERIES) + ')/')
4340
LATEST_PAT = re.compile('^.*/latest/')
@@ -69,6 +66,17 @@ class SitemapSpider(spiders.CrawlSpider):
6966
r'/liberty/',
7067
r'/mitaka/',
7168
r'/newton/',
69+
r'/ocata/',
70+
r'/pike/',
71+
r'/queens/',
72+
r'/rocky/',
73+
r'/stein/',
74+
r'/train/',
75+
r'/ussuri/',
76+
r'/victoria/',
77+
r'/wallaby/',
78+
r'/xena/',
79+
r'/yoga/',
7280
],
7381
deny_domains=[
7482
# docs.o.o redirects to a few sites, filter

‎test/test_sitemap_file.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_parse_items_inits_sitemap(self):
6161
path = sitemap_file.urlparse.SplitResult(
6262
scheme='https',
6363
netloc='docs.openstack.org',
64-
path='/ocata/something.html',
64+
path='/2024.1/something.html',
6565
query='',
6666
fragment=''
6767
)
@@ -79,7 +79,7 @@ def test_parse_items_gets_path(self):
7979
path = sitemap_file.urlparse.SplitResult(
8080
scheme='https',
8181
netloc='docs.openstackorg',
82-
path='/ocata/something.html',
82+
path='/2024.1/something.html',
8383
query='',
8484
fragment=''
8585
)
@@ -97,7 +97,7 @@ def test_parse_items_low_priority_weekly_freq(self):
9797
path = sitemap_file.urlparse.SplitResult(
9898
scheme='https',
9999
netloc='docs.openstack.org',
100-
path='/ocata/something.html',
100+
path='/2024.1/something.html',
101101
query='',
102102
fragment=''
103103
)
@@ -131,7 +131,7 @@ def test_parse_returns_populated_item(self):
131131
path = sitemap_file.urlparse.SplitResult(
132132
scheme='https',
133133
netloc='docs.openstack.org',
134-
path='/ocata',
134+
path='/2024.1',
135135
query='',
136136
fragment=''
137137
)

0 commit comments

Comments
 (0)