def RenewSliver(self, slice_urn, credentials, expiration_time):
        '''Renew the local sliver that is part of the named Slice
        until the given expiration time (in UTC with a TZ per RFC3339).
        Requires at least one credential that is valid until then.
        Return False on any error, True on success.'''

        self.logger.info('RenewSliver(%r, %r)' % (slice_urn, expiration_time))
        privileges = (RENEWSLIVERPRIV,)
        creds = self._cred_verifier.verify_from_strings(self._server.pem_cert,
                                                        credentials,
                                                        slice_urn,
                                                        privileges)
        # All the credentials we just got are valid
        if slice_urn in self._slivers:
            # If any credential will still be valid at the newly 
            # requested time, then we can do this.
            sliver = self._slivers.get(slice_urn)
            if sliver.status() == Resource.STATUS_SHUTDOWN:
                self.logger.info("Sliver %s not renewed because it is shutdown",
                                 slice_urn)
                return False
            requested = dateutil.parser.parse(str(expiration_time))
            # Per the AM API, the input time should be TZ-aware
            # But since the slice cred may not (per ISO8601), convert
            # it to naiveUTC for comparison
            requested = self._naiveUTC(requested)
            lastexp = 0
            for cred in creds:
                credexp = self._naiveUTC(cred.expiration)
                lastexp = credexp
                if credexp >= requested:
                    sliver.expiration = requested
                    self.logger.info("Sliver %r now expires on %r", slice_urn, expiration_time)
                    return True
                else:
                    self.logger.debug("Valid cred %r expires at %r before %r", cred, credexp, requested)

            # Fell through then no credential expires at or after
            # newly requested expiration time
            self.logger.info("Can't renew sliver %r until %r because none of %d credential(s) valid until then (last expires at %r)", slice_urn, expiration_time, len(creds), str(lastexp))
            # FIXME: raise an exception so the client knows what
            # really went wrong?
            return False

        else:
            self.no_such_slice(slice_urn)
dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/ext/geni/am.py/ReferenceAggregateManager.RenewSliver/original