Did I find the right examples for you? yes no

All Samples(41)  |  Call(41)  |  Derive(0)  |  Import(0)

src/n/o/nova-HEAD/nova/api/openstack/compute/plugins/v3/servers.py   nova(Download)
                        msg = _("Unknown argument: port")
                        raise exc.HTTPBadRequest(explanation=msg)
                    if not uuidutils.is_uuid_like(port_id):
                        msg = _("Bad port format: port uuid is "
                                "not in proper format "
                    network_uuid = network['uuid']
 
                if not port_id and not uuidutils.is_uuid_like(network_uuid):
                    br_uuid = network_uuid.split('-', 1)[-1]
                    if not uuidutils.is_uuid_like(br_uuid):
        image_uuid = image_href.split('/').pop()
 
        if not uuidutils.is_uuid_like(image_uuid):
            msg = _("Invalid image_ref provided.")
            raise exc.HTTPBadRequest(explanation=msg)

src/n/o/nova-HEAD/nova/api/openstack/compute/servers.py   nova(Download)
                        msg = _("Unknown argument : port")
                        raise exc.HTTPBadRequest(explanation=msg)
                    if not uuidutils.is_uuid_like(port_id):
                        msg = _("Bad port format: port uuid is "
                                "not in proper format "
                    network_uuid = network['uuid']
 
                if not port_id and not uuidutils.is_uuid_like(network_uuid):
                    br_uuid = network_uuid.split('-', 1)[-1]
                    if not uuidutils.is_uuid_like(br_uuid):
        image_uuid = image_href.split('/').pop()
 
        if not uuidutils.is_uuid_like(image_uuid):
            msg = _("Invalid imageRef provided.")
            raise exc.HTTPBadRequest(explanation=msg)

src/n/o/nova-HEAD/nova/db/sqlalchemy/api.py   nova(Download)
    used to filter on the fixed ip address
    """
    if not uuidutils.is_uuid_like(instance_uuid):
        raise exception.InvalidUUID(uuid=instance_uuid)
 
def fixed_ip_associate_pool(context, network_id, instance_uuid=None,
                            host=None):
    if instance_uuid and not uuidutils.is_uuid_like(instance_uuid):
        raise exception.InvalidUUID(uuid=instance_uuid)
 
def fixed_ip_get_by_instance(context, instance_uuid):
    if not uuidutils.is_uuid_like(instance_uuid):
        raise exception.InvalidUUID(uuid=instance_uuid)
 
    result = model_query(context, models.FixedIp, read_deleted="no").\
def instance_destroy(context, instance_uuid, constraint=None):
    session = get_session()
    with session.begin():
        if uuidutils.is_uuid_like(instance_uuid):
            instance_ref = _instance_get_by_uuid(context, instance_uuid,
def instance_floating_address_get_all(context, instance_uuid):
    if not uuidutils.is_uuid_like(instance_uuid):
        raise exception.InvalidUUID(uuid=instance_uuid)
 
    fixed_ip_ids = model_query(context, models.FixedIp.id,

src/n/o/nova-HEAD/nova/api/ec2/ec2utils.py   nova(Download)
def id_to_ec2_inst_id(instance_id):
    """Get or create an ec2 instance ID (i-[base 16 number]) from uuid."""
    if instance_id is None:
        return None
    elif uuidutils.is_uuid_like(instance_id):
def id_to_ec2_snap_id(snapshot_id):
    """Get or create an ec2 volume ID (vol-[base 16 number]) from uuid."""
    if uuidutils.is_uuid_like(snapshot_id):
        ctxt = context.get_admin_context()
        int_id = get_int_id_from_snapshot_uuid(ctxt, snapshot_id)
def id_to_ec2_vol_id(volume_id):
    """Get or create an ec2 volume ID (vol-[base 16 number]) from uuid."""
    if uuidutils.is_uuid_like(volume_id):
        ctxt = context.get_admin_context()
        int_id = get_int_id_from_volume_uuid(ctxt, volume_id)

src/n/o/nova-HEAD/nova/network/manager.py   nova(Download)
        """
        instance_uuid = kwargs['instance_id']
        if not uuidutils.is_uuid_like(instance_uuid):
            instance_uuid = kwargs.get('instance_uuid')
        host = kwargs['host']
        else:
            instance_id = kwargs['instance_id']
            if uuidutils.is_uuid_like(instance_id):
                instance = instance_obj.Instance.get_by_uuid(
                        read_deleted_context, instance_id)
        use_slave = kwargs.get('use_slave') or False
 
        if not uuidutils.is_uuid_like(instance_id):
            instance_id = instance_uuid
        instance_uuid = instance_id
    def add_fixed_ip_to_instance(self, context, instance_id, host, network_id,
                                 rxtx_factor=None):
        """Adds a fixed ip to an instance from specified network."""
        if uuidutils.is_uuid_like(network_id):
            network = self.get_network(context, network_id)

src/n/o/nova-HEAD/nova/virt/baremetal/db/sqlalchemy/api.py   nova(Download)
def bm_node_get_by_instance_uuid(context, instance_uuid):
    if not uuidutils.is_uuid_like(instance_uuid):
        raise exception.InstanceNotFound(instance_id=instance_uuid)
 
    result = model_query(context, models.BareMetalNode, read_deleted="no").\

src/n/o/nova-HEAD/nova/api/openstack/compute/contrib/volumes.py   nova(Download)
    def _validate_volume_id(self, volume_id):
        if not uuidutils.is_uuid_like(volume_id):
            msg = _("Bad volumeId format: volumeId is "
                    "not in proper format (%s)") % volume_id
            raise exc.HTTPBadRequest(explanation=msg)

src/n/o/nova-HEAD/nova/api/openstack/compute/contrib/floating_ips.py   nova(Download)
        if (instance and
            floating_ip.get('fixed_ip_id') and
            (uuidutils.is_uuid_like(id) and
             [instance['uuid'] == id] or
             [instance['id'] == id])[0]):

src/n/o/nova-HEAD/nova/network/floating_ips.py   nova(Download)
        """
        instance_uuid = kwargs.get('instance_id')
        if not uuidutils.is_uuid_like(instance_uuid):
            instance_uuid = kwargs.get('instance_uuid')
        project_id = kwargs.get('project_id')
        else:
            instance_uuid = kwargs['instance_id']
            if not uuidutils.is_uuid_like(instance_uuid):
                # NOTE(francois.charlier): in some cases the instance might be
                # deleted before the IPs are released, so we need to get

src/n/o/nova-HEAD/nova/compute/api.py   nova(Download)
        instance_uuids = [instance.uuid for instance in instances]
 
        if uuidutils.is_uuid_like(group_hint):
            instance_group_obj.InstanceGroup.add_members(context, group_hint,
                    instance_uuids)
        # NOTE(ameade): we still need to support integer ids for ec2
        try:
            if uuidutils.is_uuid_like(instance_id):
                instance = instance_obj.Instance.get_by_uuid(
                    context, instance_id, expected_attrs=expected_attrs)

  1 | 2  Next