~ubuntu-branches/ubuntu/saucy/heat/saucy

« back to all changes in this revision

Viewing changes to heat/api/cfn/v1/stacks.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman
  • Date: 2013-09-08 21:51:19 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130908215119-r939tu4aumqgdrkx
Tags: 2013.2~b3-0ubuntu1
[ Chuck Short ]
* New upstream release.
* debian/control: Add python-netaddr as build-dep.
* debian/heat-common.install: Remove heat-boto and associated man-page
* debian/heat-common.install: Remove heat-cfn and associated man-page
* debian/heat-common.install: Remove heat-watch and associated man-page
* debian/patches/fix-sqlalchemy-0.8.patch: Dropped

[ Adam Gandelman ]
* debian/patches/default-kombu.patch: Dropped.
* debian/patches/default-sqlite.patch: Refreshed.
* debian/*.install, rules: Install heat.conf.sample as common
  config file in heat-common. Drop other per-package configs, they
  are no longer used.
* debian/rules: Clean pbr .egg from build dir if it exists.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
from heat.common import urlfetch
32
32
from heat.common import policy
33
33
 
34
 
import heat.openstack.common.rpc.common as rpc_common
35
 
 
36
34
from heat.openstack.common import log as logging
37
35
from heat.openstack.common.gettextutils import _
38
36
 
146
144
        con = req.context
147
145
        try:
148
146
            stack_list = self.engine_rpcapi.list_stacks(con)
149
 
        except rpc_common.RemoteError as ex:
 
147
        except Exception as ex:
150
148
            return exception.map_remote_error(ex)
151
149
 
152
150
        res = {'StackSummaries': [format_stack_summary(s) for s in stack_list]}
237
235
 
238
236
            stack_list = self.engine_rpcapi.show_stack(con, identity)
239
237
 
240
 
        except rpc_common.RemoteError as ex:
 
238
        except Exception as ex:
241
239
            return exception.map_remote_error(ex)
242
240
 
243
241
        res = {'Stacks': [format_stack(s) for s in stack_list]}
353
351
                args['stack_identity'] = self._get_identity(con, stack_name)
354
352
 
355
353
            result = engine_action[action](con, **args)
356
 
        except rpc_common.RemoteError as ex:
 
354
        except Exception as ex:
357
355
            return exception.map_remote_error(ex)
358
356
 
359
357
        try:
376
374
        try:
377
375
            identity = self._get_identity(con, req.params['StackName'])
378
376
            templ = self.engine_rpcapi.get_template(con, identity)
379
 
        except rpc_common.RemoteError as ex:
 
377
        except Exception as ex:
380
378
            return exception.map_remote_error(ex)
381
379
 
382
380
        if templ is None:
445
443
            res['Parameters'] = [format_validate_parameter(k, v)
446
444
                                 for k, v in res['Parameters'].items()]
447
445
            return api_utils.format_response('ValidateTemplate', res)
448
 
        except rpc_common.RemoteError as ex:
 
446
        except Exception as ex:
449
447
            return exception.map_remote_error(ex)
450
448
 
451
449
    def delete(self, req):
460
458
            identity = self._get_identity(con, req.params['StackName'])
461
459
            res = self.engine_rpcapi.delete_stack(con, identity, cast=False)
462
460
 
463
 
        except rpc_common.RemoteError as ex:
 
461
        except Exception as ex:
464
462
            return exception.map_remote_error(ex)
465
463
 
466
464
        if res is None:
505
503
        try:
506
504
            identity = stack_name and self._get_identity(con, stack_name)
507
505
            events = self.engine_rpcapi.list_events(con, identity)
508
 
        except rpc_common.RemoteError as ex:
 
506
        except Exception as ex:
509
507
            return exception.map_remote_error(ex)
510
508
 
511
509
        result = [format_stack_event(e) for e in events]
557
555
                stack_identity=identity,
558
556
                resource_name=req.params.get('LogicalResourceId'))
559
557
 
560
 
        except rpc_common.RemoteError as ex:
 
558
        except Exception as ex:
561
559
            return exception.map_remote_error(ex)
562
560
 
563
561
        result = format_resource_detail(resource_details)
623
621
                stack_identity=identity,
624
622
                resource_name=req.params.get('LogicalResourceId'))
625
623
 
626
 
        except rpc_common.RemoteError as ex:
 
624
        except Exception as ex:
627
625
            return exception.map_remote_error(ex)
628
626
 
629
627
        result = [format_stack_resource(r) for r in resources]
663
661
            resources = self.engine_rpcapi.list_stack_resources(
664
662
                con,
665
663
                stack_identity=identity)
666
 
        except rpc_common.RemoteError as ex:
 
664
        except Exception as ex:
667
665
            return exception.map_remote_error(ex)
668
666
 
669
667
        summaries = [format_resource_summary(r) for r in resources]