The beneficiary or trustee named in a deed of trust or mortgagee named in a mortgage with power of sale upon real property or any interest therein to secure a debt or other obligation, or if there be a successor or successors in interest of such beneficiary, trustee or mortgagee, then such successor or successors in interest, shall have the right to bring suit to foreclose the same in the manner and subject to the provisions, rights and remedies relating to the foreclosure of a mortgage upon such property.