Magellan to Buy Pipelines from Plains All American