Create a snapshot for a container

    container :
        The name of the container to get.

    name :
        The name of the snapshot.

    remote_addr :
        An URL to a remote server. The 'cert' and 'key' fields must also be
        provided if 'remote_addr' is defined.

        Examples:
            https://myserver.lan:8443
            /var/lib/mysocket.sock

    cert :
        PEM Formatted SSL Certificate.

        Examples:
            ~/.config/lxc/client.crt

    key :
        PEM Formatted SSL Key.

        Examples:
            ~/.config/lxc/client.key

    verify_cert : True
        Verify the ssl certificate.  Default: True

    CLI Examples:

    .. code-block:: bash

        $ salt '*' lxd.snapshots_create test-container test-snapshot

def snapshots_create(container, name=None, remote_addr=None,
                     cert=None, key=None, verify_cert=True):
    '''
    Create a snapshot for a container

    container :
        The name of the container to get.

    name :
        The name of the snapshot.

    remote_addr :
        An URL to a remote server. The 'cert' and 'key' fields must also be
        provided if 'remote_addr' is defined.

        Examples:
            https://myserver.lan:8443
            /var/lib/mysocket.sock

    cert :
        PEM Formatted SSL Certificate.

        Examples:
            ~/.config/lxc/client.crt

    key :
        PEM Formatted SSL Key.

        Examples:
            ~/.config/lxc/client.key

    verify_cert : True
        Verify the ssl certificate.  Default: True

    CLI Examples:

    .. code-block:: bash

        $ salt '*' lxd.snapshots_create test-container test-snapshot
    '''
    cont = container_get(
        container, remote_addr, cert, key, verify_cert, _raw=True
    )
    if not name:
        name = datetime.now().strftime('%Y%m%d%H%M%S')

    cont.snapshots.create(name)

    for c in snapshots_all(container).get(container):
        if c.get('name') == name:
            return {'name': name}

    return {'name': False}