Skip to content

Commit

Permalink
Merge pull request #66 from Ouranosinc/issue-62_geoserver-api
Browse files Browse the repository at this point in the history
Add basic geoserver-api service
  • Loading branch information
fmigneault authored Jun 19, 2018
2 parents 248d55f + 2d0e5ae commit 5f0b6d7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
22 changes: 20 additions & 2 deletions magpie/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,26 @@ def __acl__(self):
return self.acl


class ServiceGeoserverAPI(ServiceI):

permission_names = []

params_expected = []

resource_types_permissions = {}

def __init__(self, service, request):
super(ServiceGeoserverAPI, self).__init__(service, request)

@property
def __acl__(self):
self.expand_acl(self.service, self.request.user)
return self.acl

def permission_requested(self):
return u'read'


class ServiceWFS(ServiceI):

permission_names = [
Expand Down Expand Up @@ -360,8 +380,6 @@ def __acl__(self):
def permission_requested(self):
return u'read'

pass


service_type_dict = {
u'wps': ServiceWPS,
Expand Down
7 changes: 7 additions & 0 deletions providers.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ providers:
c4i: false
type: wfs

geoserver-api:
url: http://${HOSTNAME}:8087/geoserver/rest/
title: geoserver-api
public: true
c4i: false
type: geoserver-api

project-api:
url: http://${HOSTNAME}:3005
title: project-api
Expand Down

0 comments on commit 5f0b6d7

Please sign in to comment.