), url( r"^images-stream/streams/v1/(?P<filename>.*)$", simplestreams_stream_handler, name="simplestreams_stream_handler", ), url( r"^images-stream/(?P<os>.*)/(?P<arch>.*)/(?P<subarch>.*)/" "(?P<series>.*)/(?P<version>.*)/(?P<filename>.*)$", simplestreams_file_handler, name="simplestreams_file_handler", ), url(r"^metrics$", prometheus_stats_handler, name="metrics"), url( r"^robots\.txt$", TextTemplateView.as_view(template_name="maasserver/robots.txt"), name="robots", ), ] # # URLs for logged-in users. # Preferences views. urlpatterns += [url(r"^account/csrf/$", csrf, name="csrf")] # Logout view. urlpatterns += [url(r"^accounts/logout/$", logout, name="logout")] # API URLs. If old API requested, provide error message directing to new API. urlpatterns += [ url(r"^api/2\.0/", include(urls_api)), url( r"^api/version/",
# Anonymous views. urlpatterns += [ url(r'^accounts/login/$', login, name='login'), url(r'^accounts/authenticate/$', authenticate, name='authenticate'), url( r'^accounts/discharge-request/$', MacaroonDischargeRequest(), name='discharge-request'), url( r'^images-stream/streams/v1/(?P<filename>.*)$', simplestreams_stream_handler, name='simplestreams_stream_handler'), url( r'^images-stream/(?P<os>.*)/(?P<arch>.*)/(?P<subarch>.*)/' '(?P<series>.*)/(?P<version>.*)/(?P<filename>.*)$', simplestreams_file_handler, name='simplestreams_file_handler'), url( r'^robots\.txt$', TextTemplateView.as_view( template_name='maasserver/robots.txt'), name='robots'), ] # # URLs for logged-in users. # Preferences views. urlpatterns += [ url(r'^account/prefs/$', userprefsview, name='prefs'), url( r'^account/prefs/sslkey/add/$', SSLKeyCreateView.as_view(), name='prefs-add-sslkey'), url( r'^account/prefs/sslkey/delete/(?P<keyid>\d*)/$', SSLKeyDeleteView.as_view(), name='prefs-delete-sslkey'), ] # Logout view.
return url(regexp, view, *args, **kwargs) ## URLs accessible to anonymous users. # Combo URLs. urlpatterns = patterns( '', (r'combo/', include('maasserver.urls_combo')) ) # Anonymous views. urlpatterns += patterns( 'maasserver.views', url(r'^accounts/login/$', login, name='login'), url( r'^robots\.txt$', TextTemplateView.as_view( template_name='maasserver/robots.txt'), name='robots'), ) ## URLs for logged-in users. # Preferences views. urlpatterns += patterns( 'maasserver.views', url(r'^account/prefs/$', userprefsview, name='prefs'), url( r'^account/prefs/sshkey/add/$', SSHKeyCreateView.as_view(), name='prefs-add-sshkey'), url( r'^account/prefs/sshkey/delete/(?P<keyid>\d*)/$', SSHKeyDeleteView.as_view(), name='prefs-delete-sshkey'), )