Add swap functions to mount.py per #5364
Add mount.swap state function, fix #5364