update_allowed_keys = ('Properties',)
update_allowed_properties = ('Size',)
- def __init__(self, name, json_snippet, stack):
- super(InstanceGroup, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
return self.resize(int(self.properties['Size']), raise_on_error=True)
update_allowed_properties = ('MaxSize', 'MinSize',
'Cooldown', 'DesiredCapacity',)
- def __init__(self, name, json_snippet, stack):
- super(AutoScalingGroup, self).__init__(name, json_snippet, stack)
- # resource_id is a list of resources
-
def handle_create(self):
if self.properties['DesiredCapacity']:
'Schema': tags_schema}},
}
- def __init__(self, name, json_snippet, stack):
- super(LaunchConfiguration, self).__init__(name, json_snippet, stack)
-
class ScalingPolicy(resource.Resource, CooldownMixin):
properties_schema = {
update_allowed_properties = ('ScalingAdjustment', 'AdjustmentType',
'Cooldown',)
- def __init__(self, name, json_snippet, stack):
- super(ScalingPolicy, self).__init__(name, json_snippet, stack)
-
def handle_update(self, json_snippet, tmpl_diff, prop_diff):
# If Properties has changed, update self.properties, so we
# get the new values during any subsequent adjustment
'AllocationId': {'Type': 'String',
'Implemented': False}}
- def __init__(self, name, json_snippet, stack):
- super(ElasticIpAssociation, self).__init__(name, json_snippet, stack)
-
def FnGetRefId(self):
return unicode(self.properties.get('EIP', '0.0.0.0'))
'Schema': tags_schema}}
}
- def __init__(self, name, json_snippet, stack):
- super(InternetGateway, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
client = self.quantum()
'Implemented': False}
}
- def __init__(self, name, json_snippet, stack):
- super(VPCGatewayAttachment, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
client = self.quantum()
gateway = self.stack[self.properties.get('InternetGatewayId')]
'Schema': tags_schema}}
}
- def __init__(self, name, json_snippet, stack):
- super(NetworkInterface, self).__init__(name, json_snippet, stack)
-
@staticmethod
def network_id_from_subnet_id(quantumclient, subnet_id):
subnet_info = quantumclient.show_subnet(subnet_id)
'Required': True},
'fixed_ip_address': {'Type': 'String'}}
- def __init__(self, name, json_snippet, stack):
- super(FloatingIPAssociation, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
props = self.prepare_properties(self.properties, self.name)
'admin_state_up': {'Default': True,
'Type': 'Boolean'}}
- def __init__(self, name, json_snippet, stack):
- super(Net, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
props = self.prepare_properties(
self.properties,
'device_id': {'Type': 'String'},
'security_groups': {'Type': 'List'}}
- def __init__(self, name, json_snippet, stack):
- super(Port, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
props = self.prepare_properties(
self.properties,
class QuantumResource(resource.Resource):
- def __init__(self, name, json_snippet, stack):
- super(QuantumResource, self).__init__(name, json_snippet, stack)
-
def validate(self):
'''
Validate any of the provided params
'admin_state_up': {'Type': 'Boolean',
'Default': True}}
- def __init__(self, name, json_snippet, stack):
- super(Router, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
props = self.prepare_properties(
self.properties,
'subnet_id': {'Type': 'String',
'Required': True}}
- def __init__(self, name, json_snippet, stack):
- super(RouterInterface, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
router_id = self.properties.get('router_id')
subnet_id = self.properties.get('subnet_id')
'network_id': {'Type': 'String',
'Required': True}}
- def __init__(self, name, json_snippet, stack):
- super(RouterGateway, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
router_id = self.properties.get('router_id')
network_id = self.properties.get('network_id')
'Schema': allocation_schema
}}}
- def __init__(self, name, json_snippet, stack):
- super(Subnet, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
props = self.prepare_properties(
self.properties,
'Schema': tags_schema}}
}
- def __init__(self, name, json_snippet, stack):
- super(RouteTable, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
client = self.quantum()
props = {'name': self.physical_resource_name()}
'Required': True}
}
- def __init__(self, name, json_snippet, stack):
- super(SubnetRouteTableAssocation, self).__init__(
- name, json_snippet, stack)
-
def handle_create(self):
client = self.quantum()
subnet = self.stack.resource_by_refid(self.properties.get('SubnetId'))
'WebsiteConfiguration': {'Type': 'Map',
'Schema': website_schema}}
- def __init__(self, name, json_snippet, stack):
- super(S3Bucket, self).__init__(name, json_snippet, stack)
-
def validate(self):
'''
Validate any of the provided params
'SecurityGroupIngress': {'Type': 'List'},
'SecurityGroupEgress': {'Type': 'List'}}
- def __init__(self, name, json_snippet, stack):
- super(SecurityGroup, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
if self.properties['VpcId'] and clients.quantumclient is not None:
self._handle_create_quantum()
'Schema': tags_schema}}
}
- def __init__(self, name, json_snippet, stack):
- super(Subnet, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
client = self.quantum()
# TODO(sbaker) Verify that this CidrBlock is within the vpc CidrBlock
'X-Container-Write': {'Type': 'String'},
'X-Container-Meta': {'Type': 'Map', 'Default': {}}}
- def __init__(self, name, json_snippet, stack):
- super(SwiftContainer, self).__init__(name, json_snippet, stack)
-
def validate(self):
'''
Validate any of the provided params
}},
'Policies': {'Type': 'List'}}
- def __init__(self, name, json_snippet, stack):
- super(User, self).__init__(name, json_snippet, stack)
-
def _validate_policies(self, policies):
for policy in (policies or []):
# When we support AWS IAM style policies, we will have to accept
properties_schema = {'AllowedResources': {'Type': 'List',
'Required': True}}
- def __init__(self, name, json_snippet, stack):
- super(AccessPolicy, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
resources = self.properties['AllowedResources']
# All of the provided resource names must exist in this stack
'Schema': tags_schema}}
}
- def __init__(self, name, json_snippet, stack):
- super(VPC, self).__init__(name, json_snippet, stack)
-
def handle_create(self):
client = self.quantum()
props = {'name': self.physical_resource_name()}
'''
properties_schema = {}
- def __init__(self, name, json_snippet, stack):
- super(WaitConditionHandle, self).__init__(name, json_snippet, stack)
-
def _sign_url(self, credentials, path):
"""
Create properly formatted and pre-signed URL using supplied credentials