~aisrael/charms/trusty/mongodb/benchmarking

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/fetch/archiveurl.py

  • Committer: Marco Ceppi
  • Date: 2015-03-24 19:55:48 UTC
  • mfrom: (66.1.3 mongodb)
  • Revision ID: marco@ceppi.net-20150324195548-qms64mwxd1w70vhe
[brad-marshall] Adds nrpe-external-master interface and adds basic nrpe checks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2014-2015 Canonical Limited.
 
2
#
 
3
# This file is part of charm-helpers.
 
4
#
 
5
# charm-helpers is free software: you can redistribute it and/or modify
 
6
# it under the terms of the GNU Lesser General Public License version 3 as
 
7
# published by the Free Software Foundation.
 
8
#
 
9
# charm-helpers is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
# GNU Lesser General Public License for more details.
 
13
#
 
14
# You should have received a copy of the GNU Lesser General Public License
 
15
# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
 
16
 
1
17
import os
2
18
import hashlib
3
19
import re
4
20
 
 
21
from charmhelpers.fetch import (
 
22
    BaseFetchHandler,
 
23
    UnhandledSource
 
24
)
 
25
from charmhelpers.payload.archive import (
 
26
    get_archive_handler,
 
27
    extract,
 
28
)
 
29
from charmhelpers.core.host import mkdir, check_hash
 
30
 
5
31
import six
6
32
if six.PY3:
7
33
    from urllib.request import (
19
45
    )
20
46
    from urlparse import urlparse, urlunparse, parse_qs
21
47
 
22
 
from charmhelpers.fetch import (
23
 
    BaseFetchHandler,
24
 
    UnhandledSource
25
 
)
26
 
from charmhelpers.payload.archive import (
27
 
    get_archive_handler,
28
 
    extract,
29
 
)
30
 
from charmhelpers.core.host import mkdir, check_hash
31
 
 
32
48
 
33
49
def splituser(host):
34
50
    '''urllib.splituser(), but six's support of this seems broken'''