def up(self):

        self.log("determining if we need to create an instance")
        me = self.describe().provider_specific
        if me is None:
            self.log("creating an instance")
            reservation = self.connection.run_instances(
                image_id = self.image_id, min_count = 1, max_count = 1,
                key_name = self.key_name, user_data = self.user_data,
                addressing_type = None, subnet_id = self.subnet_id,
                instance_type = self.instance_type,
                instance_profile_name = self.instance_profile_name,
                security_group_ids = self.security_groups,
                block_device_map = self.block_device_map
            )
            self.log("instance created")
            self._tag_instances(reservation)
            self._start_instances(reservation)
        else:
            self.log("instance already exists, starting if needed")
            self.connection.start_instances([me.id])

        me = self.describe()
        if not me.present:
            raise Exception("unexpectedly can't find the instance.")

    # --------------------------------------------------------------------------
Filtering plugins
dataset/ETHPy150Open mpdehaan/strider/lib/strider/virt/ec2.py/EC2.up--crossover with--dataset/ETHPy150Open gsi-upm/senpy/tests/extensions_test/__init__.py/ExtensionsTest.test_filtering