1
# Copyright (c) 2011, Eucalyptus Systems, Inc.
4
# Redistribution and use of this software in source and binary forms, with or
5
# without modification, are permitted provided that the following conditions
8
# Redistributions of source code must retain the above
9
# copyright notice, this list of conditions and the
10
# following disclaimer.
12
# Redistributions in binary form must reproduce the above
13
# copyright notice, this list of conditions and the
14
# following disclaimer in the documentation and/or other
15
# materials provided with the distribution.
17
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
# POSSIBILITY OF SUCH DAMAGE.
29
# Author: Mitch Garnaat mgarnaat@eucalyptus.com
31
from boto.roboto.awsqueryrequest import AWSQueryRequest
32
from boto.roboto.param import Param
35
def encode_prop(param, dict, value):
38
print "Options must be of the form KEY=VALUE: %s" % value
40
dict['Attribute'] = t[0]
43
class ModifyStorageControllerAttribute(AWSQueryRequest):
45
ServicePath = '/services/Properties'
46
ServiceClass = eucadmin.EucAdmin
47
Description = 'Modify storage controller attribute'
49
Params = [Param(name='property',
55
doc='Modify attribute (KEY=VALUE)'),
56
Param(name='Partition',
58
long_name='partition',
61
doc='Partition for the cluster.')]
62
Args = [Param(name='Name',
66
doc='The storage controller name')]
68
def get_connection(self, **args):
69
if self.connection is None:
70
args['path'] = self.ServicePath
71
self.connection = self.ServiceClass(**args)
72
return self.connection
74
def cli_formatter(self, data):
77
def main(self, **args):
78
return self.send(**args)
81
eucadmin.print_version_if_necessary()