It seems to me that the City might have the right to inspect rental property between tenants, or if the renter requested it. If the renter objects, wait until he moves out.
The 4th amendment means what it says, regardless of government lawyers trying to change the meaning of the words (i.e., “this is not a “search warrant”, it is a “code inspection.”)
So much liberty has been lost by this kind of dispicable redefinition (e.g., asset forfiture — the property committed the crime, not the owner, and property has no rights).
basically you cannot use the guise of regulation to deprive someone of their constitutional rights.