- def add_network(self, name):
- """add to the template a Neutron Net"""
- log.debug("adding Neutron::Net '%s'", name)
+ def add_flavor(self, name, vcpus=1, ram=1024, disk=1, ephemeral=0,
+ is_public=True, rxtx_factor=1.0, swap=0,
+ extra_specs=None):
+ """add to the template a Flavor description"""
+ if name is None:
+ name = 'auto'
+ log.debug("adding Nova::Flavor '%s' vcpus '%d' ram '%d' disk '%d' " +
+ "ephemeral '%d' is_public '%s' rxtx_factor '%d' " +
+ "swap '%d' extra_specs '%s' ",
+ name, vcpus, ram, disk, ephemeral, is_public,
+ rxtx_factor, swap, str(extra_specs))
+
+ if extra_specs:
+ assert isinstance(extra_specs, collections.Mapping)
+