Scalr\Model\Entity\FarmRole::setupRole PHP Method

setupRole() public method

public setupRole ( )
    public function setupRole()
    {
        if (empty($this->roleId)) {
            throw new InvalidEntityConfigurationException("Missed roleId");
        }
        if ($this->role->isDeprecated) {
            throw new InvalidEntityConfigurationException("Role '{$this->roleId}' is deprecated");
        }
        try {
            $this->role->getImage($this->platform, $this->cloudLocation);
        } catch (ImageNotFoundException $e) {
            throw new InvalidEntityConfigurationException($e->getMessage(), $e->getCode(), $e);
        }
    }