root / image_creator / os_type / unsupported.py @ f953c647
History | View | Annotate | Download (2.1 kB)
1 | e482b7f9 | Nikos Skalkotos | # -*- coding: utf-8 -*-
|
---|---|---|---|
2 | e482b7f9 | Nikos Skalkotos | #
|
3 | e482b7f9 | Nikos Skalkotos | # Copyright 2013 GRNET S.A. All rights reserved.
|
4 | e482b7f9 | Nikos Skalkotos | #
|
5 | e482b7f9 | Nikos Skalkotos | # Redistribution and use in source and binary forms, with or
|
6 | e482b7f9 | Nikos Skalkotos | # without modification, are permitted provided that the following
|
7 | e482b7f9 | Nikos Skalkotos | # conditions are met:
|
8 | e482b7f9 | Nikos Skalkotos | #
|
9 | e482b7f9 | Nikos Skalkotos | # 1. Redistributions of source code must retain the above
|
10 | e482b7f9 | Nikos Skalkotos | # copyright notice, this list of conditions and the following
|
11 | e482b7f9 | Nikos Skalkotos | # disclaimer.
|
12 | e482b7f9 | Nikos Skalkotos | #
|
13 | e482b7f9 | Nikos Skalkotos | # 2. Redistributions in binary form must reproduce the above
|
14 | e482b7f9 | Nikos Skalkotos | # copyright notice, this list of conditions and the following
|
15 | e482b7f9 | Nikos Skalkotos | # disclaimer in the documentation and/or other materials
|
16 | e482b7f9 | Nikos Skalkotos | # provided with the distribution.
|
17 | e482b7f9 | Nikos Skalkotos | #
|
18 | e482b7f9 | Nikos Skalkotos | # THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
|
19 | e482b7f9 | Nikos Skalkotos | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20 | e482b7f9 | Nikos Skalkotos | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
21 | e482b7f9 | Nikos Skalkotos | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
|
22 | e482b7f9 | Nikos Skalkotos | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23 | e482b7f9 | Nikos Skalkotos | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
24 | e482b7f9 | Nikos Skalkotos | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
25 | e482b7f9 | Nikos Skalkotos | # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
26 | e482b7f9 | Nikos Skalkotos | # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
27 | e482b7f9 | Nikos Skalkotos | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
28 | e482b7f9 | Nikos Skalkotos | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
29 | e482b7f9 | Nikos Skalkotos | # POSSIBILITY OF SUCH DAMAGE.
|
30 | e482b7f9 | Nikos Skalkotos | #
|
31 | e482b7f9 | Nikos Skalkotos | # The views and conclusions contained in the software and
|
32 | e482b7f9 | Nikos Skalkotos | # documentation are those of the authors and should not be
|
33 | e482b7f9 | Nikos Skalkotos | # interpreted as representing official policies, either expressed
|
34 | e482b7f9 | Nikos Skalkotos | # or implied, of GRNET S.A.
|
35 | e482b7f9 | Nikos Skalkotos | |
36 | e482b7f9 | Nikos Skalkotos | """This module hosts code to handle unknown OSs."""
|
37 | e482b7f9 | Nikos Skalkotos | |
38 | e482b7f9 | Nikos Skalkotos | from image_creator.os_type import OSBase |
39 | e482b7f9 | Nikos Skalkotos | |
40 | e482b7f9 | Nikos Skalkotos | |
41 | e482b7f9 | Nikos Skalkotos | class Unsupported(OSBase): |
42 | e482b7f9 | Nikos Skalkotos | """OS class for unsupported OSs"""
|
43 | e482b7f9 | Nikos Skalkotos | def __init__(self, image, **kargs): |
44 | e482b7f9 | Nikos Skalkotos | super(Unsupported, self).__init__(image, **kargs) |
45 | e482b7f9 | Nikos Skalkotos | |
46 | e482b7f9 | Nikos Skalkotos | def collect_metadata(self): |
47 | e482b7f9 | Nikos Skalkotos | """Collect metadata about the OS"""
|
48 | e482b7f9 | Nikos Skalkotos | self.out.warn("Unable to collect metadata for unsupported media") |
49 | e482b7f9 | Nikos Skalkotos | |
50 | e482b7f9 | Nikos Skalkotos | def _do_mount(self, readonly): |
51 | e482b7f9 | Nikos Skalkotos | """Mount partitions in corrent order"""
|
52 | e482b7f9 | Nikos Skalkotos | self.out.warn('not supported on this media.') |
53 | e482b7f9 | Nikos Skalkotos | return False |
54 | e482b7f9 | Nikos Skalkotos | |
55 | e482b7f9 | Nikos Skalkotos | # vim: set sta sts=4 shiftwidth=4 sw=4 et ai : |