def update_machine_state(state_path):
    """Update the machine state using the provided state declaration."""
    charmhelpers.contrib.templating.contexts.juju_state_to_yaml(
        salt_grains_path)
    subprocess.check_call([
        'salt-call',
        '--local',
        'state.template',
        state_path,
    ])
Update the machine state using the provided state declaration.